On Tue, Nov 21, 2006 at 06:59:44PM +0100, Tommy Pettersson wrote: > On Tue, Nov 21, 2006 at 10:37:36AM +0100, Matthias Fischmann wrote: > > > $ rm file && darcs record > > if i recreate the file, darcs will find it and keep track of the > > changes in the new file without having to be told. > > > > $ darcs remove file && rm file > > after recording, creating the new file will not leave any traces in > > the repo: if i want darcs to control it again, i have to add it again. > > Not quite. When Record looks for changes (hunks) to record, it > sees if the file is completely removed, and constructs a rmfile > patch which it offers you to record. The Remove command just > constructs such a rmfile patch in pending, where you can later > record it, but it doesn't remove the file from your working > copy. The recorded change is the same in both cases, and if you > manually delete the file after you 'darcs remove' it, there > should be no difference at all.
Ah, maybe I should add something to this explanation. If a file is deleted, Whatsnew will show a rmfile patch, and Record will offer to record it, but...! this rmfile patch is not persistent; it is created on the fly and only exist during the execution of Whatsnew or Record. So if the "suggested" rmfile patch is _not_ recorded, and the file is recreated, later invocations of Whatsnew and Record will not find the file missing any more, and therefore do a normal diff on it, thus darcs needs not be told it's back. The Remove command, on the other hand, inserts a persistent rmfile patch in pending, which has to be "canceled" with the Add command (which constructs an addfile patch that cancels out with the rmfile patch in pending). So after Remove followed by Add, there should be nothing to record. -- Tommy Pettersson <[EMAIL PROTECTED]> _______________________________________________ darcs-users mailing list [email protected] http://www.abridgegame.org/mailman/listinfo/darcs-users
