update symlinks when target is moved
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Wishlist
|
Unassigned | ||
Breezy |
Triaged
|
Low
|
Unassigned |
Bug Description
I understand bzr uses file-IDs to identify each file as an entity (just as I, and probably most people, think of it).
Then it could auto-update symlinks if their target is bzr mv'ed. This would be a killer feature, and distinguish bzr (eg git couldn't do it).
What I mean is:
$ bzr init .
$ echo "hello world" > textfile.txt
$ ln -s textfile.txt link2text
$ bzr add *
$ bzr ci -m "set up"
$ bzr mv textfile.txt text.txt
$ bzr ci -m "commit a mv of file which is linked to (within branch)."
NOW I'd love to see
$ cat link2text
hello world
with this implemented bazaar would be THE vcs for me (and probably many others)
PS: I'm not sure where/how to post this feature request, but I thought if I "ask a question" it might end up in the right place :)
Changed in bzr: | |
status: | New → Confirmed |
tags: | added: symlink |
tags: | added: check-for-breezy |
tags: | removed: check-for-breezy |
Changed in brz: | |
status: | New → Triaged |
importance: | Undecided → Low |
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.