[darcs-devel] Patch for revert --hard

Eric Y. Kow eric.kow at gmail.com
Sat Mar 3 01:30:53 PST 2007


Thanks Dario and David,

Dario, sorry but I don't think I will be taking this patch.  I'll
confess that I haven't looked very deeply into the code, and am
basing this more on your description than anything else.

Dario said:
> This makes revert work on any file in the directory reverting them
> all and deleting the files not present in the darcs manifest.

You might be able to accomplish the same thing by doing a rm -rf * and
then a darcs revert (i.e. you revert the removal of the files, thus
adding back the good ones).  Counterintuitive as this might be, is it
equivalent to the functionality of your patch?

Likewise, David's suggestions are worth considering if you think the
functionality is truly useful and you would like to resubmit.  Note
that whenever a new feature gets introduced, I try to be poll devel
and maybe users for 'objections in principle', i.e. without looking at
the code, if anybody would actually object to the new functionality
being added to darcs.  You can probably expect me to do the same for
the new revert --look-for-adds should you choose to submit one.

Also, your patch depends on a 'Initial import' patch, which I do not
have; were you submitting against the official repository, or did you
import the code from a source tarball?  You can get the official
unstable repo with
   darcs get --partial http://abridgegame.org/repos/darcs-unstable

David said:
> I don't really care for the flag name, and am not sure I really like
> sticking this functionality into revert.  A revert --look-for-adds would be
> almost like revert --hard, although wouldn't revert boring files.  Revert
> --look-for-adds would have the advantage of doing what you want, if you
> usually record with the --look-for-adds flag.  If we wanted to remove all
> files not in the manifest, perhaps adding both a --boring flag and a
> --look-for-adds flag would do the trick, so that revert --hard would be
> equivalent to revert --look-for-adds --boring.

-- 
Eric Kow                     http://www.loria.fr/~kow
PGP Key ID: 08AC04F9         Merci de corriger mon français.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-devel/attachments/20070303/893eb65a/attachment.pgp


More information about the darcs-devel mailing list