bzr missing "cp" command for forking files /w history
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned | ||
Breezy |
Fix Released
|
Wishlist
|
Jelmer Vernooij |
Bug Description
Bazaar-NG SCM is almost a full replacement for Mercurial or Subversion SCMs, but not quite.
There is one big thing left which bzr is unable to do: Copying files within the repository, creating a new fork of the file which has a new file-id, but gets a copy of the history of the original file up to the commit which forked the file.
I. e. it should be possible to do the following:
$ bzr init-repo demo
$ cd demo
$ mkdir prj1
$ touch prj1/Makefile
$ bzr add
$ bzr ci -m "Makefile of primary project"
$ bzr mkdir prj1
$ bzr cp prj1/Makefile prj2/
$ bzr ci -m "Makefile of secondary project forked from primary one"
Currently, the only way of achieving a similar effect in bzr is to manually copy the file to be "forked" independent of bzr, and then add the copied file as if it were a completely new file.
While this approach works, all the inheritance relationship and thus all the history associated with the new file before it has been cloned will be lost.
This is a severe loss of historic information!
In a highly-productive environment it is often important to be able to find out where new files have originated from, especially if the origin is another file in the same repository which is already version controlled!
I consider this missing functionality bzr's greatest (and actually only disadvantage) when being compared to svn or hg.
This should really be addressed by some forthcoming version of bzr!
BTW, the inability to track file histories across file duplications proves the manual's assertion a lie "that bzr keeps more metadata than most other SCMs" (not literally, but according to the meaning).
Changed in bzr: | |
importance: | Undecided → Medium |
tags: | added: copy |
Changed in bzr: | |
assignee: | nobody → Tomasz Magulski (magul) |
Changed in bzr: | |
assignee: | Tomasz Magulski (magul) → nobody |
Changed in brz: | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
Changed in brz: | |
assignee: | nobody → Jelmer Vernooij (jelmer) |
Changed in brz: | |
status: | Fix Committed → Fix Released |
Strictly speaking, this is an enhancement request, not a bug report.
However, it might also be considered a "documentation bug" or "advertisement bug", because in the manual bzr is advertised as being a replacement for svn or hg which "preserves as many metadata as possible, and more than most other SCMs" during the migration.
As long as there is no "bzr cp" (or a suitable work-around for emulating such a command using other bzr commands), this is simply not true, as its closest competitors all provide this feature, and only bzr does not.
As this seems to be the *ONLY* real shortcoming of bzr compared to hg or svn, it might be be worth being addressed before adding any additional new features are introduced to bzr. (Bug fixing should still have a higher importance, of course.)