Re: [fossil-users] mv after add breaks
On Tue, Jun 26, 2012 at 11:44 AM, Jacek Cała wrote: > I moved a file (say file1.txt) from one dir to another and, in the > same time, changed its name (say, to dir1\file2.txt); it was > relatively long so I forgot about the move. Then I tapped (all names > changed for clarity): > The combinations of add-then-move and move-then-edit (without a commit between the operations) have both historically been problematic for Fossil. i _suspect_ the reason it hasn't ever been "fixed" is because that particular case is "highly philosophical," with no 100% correct behaviour (IMO) and does not cause any data loss (just a bit of confusion the first time it happens and then one doesn't do it again). I may be wrong but think that moves of an added file should be > possible, shouldn't they? > i can't personally say _why_ it's been problematic (design limitation or just an oversight?), but i can assure you that this problem has come up several times in the past few years. i unfortunately cannot suggest a workaround better than what you demonstrated. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] mv after add breaks
Hi All, I moved a file (say file1.txt) from one dir to another and, in the same time, changed its name (say, to dir1\file2.txt); it was relatively long so I forgot about the move. Then I tapped (all names changed for clarity): >fossil extra dir1/file2.txt >fossil add dir1 ADDED dir1/file2.txt >fossil chan MISSING file1.txt ADDED dir1/file2.txt At this moment I realized that file1.txt was actually changed to dir1/file2.txt, so I happily issued: >fossil mv file1.txt dir1/file2.txt RENAME file1.txt dir1/file2.txt d:\usr\local\fossil\fossil.exe: SQLITE_CONSTRAINT: abort at 42 in [UPDATE vfile SET pathname='dir1/file2.txt' WHERE pathname='... ' d:\usr\local\fossil\fossil.exe: columns pathname, vid are not unique UPDATE vfile SET pathname='dir1/file2.txt' WHERE pathname='file1.txt' AND vid=1749 If you have recently updated you fossil executable, you might need to run "fossil all rebuild" to bring teh repository schemas up to date. > ... Then less happily I did: >fossil del dir1/file2.txt DELETED dir1/file2.txt and followed my usual way in such cases: >fossil mv file1.txt dir1/file2.txt RENAME file1.txt dir1/file2.txt which went fine. I may be wrong but think that moves of an added file should be possible, shouldn't they? Cheers, Jacek ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users