On May 14, 2016, at 4:11 AM, Stephan Beal <sgb...@googlemail.com> wrote:

> Fossil does have an 'mv' command which does retain history.

Kind of.  f mv breaks anything that’s keyed off the file name, since files in 
Fossil are identified by their path within the repo.

I’ve run into two main flavors of this problem, but I wouldn’t be surprised to 
learn that there are more:

1. f finfo can’t trace file history back through a rename.  The web version of 
this (f ui > Files > Ancestry) does manage to report the rename, but it doesn’t 
trace history back through that link to the old name.  Why would I want file 
history to cut off just because I renamed it?

2. If you attempt to merge a change between branches where one of the changed 
files was renamed after the branch point, Fossil will *silently* drop all 
changes to that file.  Then it will lie to you, telling you the merge was 
successful!  If the resulting partial merge compiles and runs, you might not 
immediately notice that you didn’t get 100% of the feature/fix.  (This happened 
to me just a week or two ago!)

There’s a straightforward fix for this, though it’ll probably have to wait for 
Fossil 2: identify files by UUID instead, and store the file name as a 
versioned attribute of the file.

Fossil and Git are the only modern SCMs I know of with this weakness.  hg and 
bk cope much better with file renames.  I seem to recall that even svn did 
better than Fossil in this regard.

> consider:
> 
> scm cp a b
> 
> now my history looks like 'b' has existed as long as 'a’ has

Yes, f fino should show the two files as sharing some history, because that is 
the truth of the matter.

If you “f up 2015-01-01” b should disappear because it didn’t exist back then.

If you then change b and check that in, then:

   f finfo a > a.log
   f finfo b > b.log
   diff a.log b.log

…should show that b has a checkin that a does not.

And if you then “f rm --hard a && f ci", b should continue to exist, and Fossil 
should continue to show all of the history that b inherited from a.
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to