I'm wondering though what the performance consequences of this would be, as we'd have to scan the tree for any symlinks that point to a file when that file is renamed.
I also wonder if there are perhaps situations in which you don't want the symlink to be updated automatically. E.g. what happens if you replace a file with another:
$ echo foo > bar
$ bzr add bar
$ ln -s bar link
$ bzr add link
$ bzr ci
$ bzr mv bar bla
$ echo hi > bar
$ bzr add bar
$ bzr ci
You might just want to keep link pointing at bar in this case.
This is an interesting idea.
I'm wondering though what the performance consequences of this would be, as we'd have to scan the tree for any symlinks that point to a file when that file is renamed.
I also wonder if there are perhaps situations in which you don't want the symlink to be updated automatically. E.g. what happens if you replace a file with another:
$ echo foo > bar
$ bzr add bar
$ ln -s bar link
$ bzr add link
$ bzr ci
$ bzr mv bar bla
$ echo hi > bar
$ bzr add bar
$ bzr ci
You might just want to keep link pointing at bar in this case.