Comment 11 for bug 269095

Revision history for this message
Guenther Brunthaler (gb-about-gnu) wrote :

Hi Per,

Bazaar'r "mv" command is fine.

But there is no way to duplicate files with "mv" - you can move or rename a file; but it will still be a single file.

In order to better explain when "cp" would come handy, just imagine you have a template file under version control which just contains the boilerplate text (copyleft etc.) each new source file should start with.

The contents of that template file might change over time for the project (for instance the year in the copyleft notice), and new source files will always be "cloned" from the current contents of this template file.

This cloning operation would be an ideal candidate for a "bzr cp" command - you can't use "bzr mv" for this because then there would no more template file.

Of course, one could just copy the file using the shell and then do an "bzr add" - but doing so would not record the information where the original of the new file came from.

Of course, you might be lucky and correctly guess it has come from the template file - but with a dedicated "bzr cp" command no luck would be needed to find out - "bzr log -v" would show this information.

BTW, there is an interesting new SCM named "fossil" which combines ideas from git and Bazaar (and Trac), and its data structures are well prepared for later addition of a "cp" command (although it does not yet exist). However, it is not nearly as mature as Bazaar and won't be a serious competitor for some time.