[darcs-users] Removing a file in darcs

David Roundy droundy at abridgegame.org
Fri Feb 27 11:33:59 UTC 2004


On Thu, Feb 26, 2004 at 05:58:57PM +0100, Samuel Tardieu wrote:
> When one records a removed file in darcs, why does darcs first propose
> a change which empties the file then a change which removes the file?
> 
> It seems to be that those two operations are different. If a file has
> been removed (instead of emptied), it may be for a good reason.
> 
> I just got hit by that when I removed a very big file. darcs took ages
> to print the difference against an empty file (it was very slow for
> every line). And I couldn't use "darcs record -a" as I had a lot of
> other uncommitted and unrelated changes in my repository.

With darcs 0.9.17 or later, you can specify one or more files or
directories for the record and whatsnew commands, and it will only prompt
you for changes in those files (or files in those directories).  So you
could use "darcs record -a deleted_file" to avoid displaying the content
patch.

On the other hand, you are right that record should only prompt you for the
remove operation, not for both.  Internally remove is (and should be)
composed of two parts, but there's no reason to let the user know that.  I
just added this to my TODO list.  It's a bit of a pain to implement,
because in every other case (other than additions and deletions) Record can
deal with each primitive patch on a separate basis.
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list