On Sat, Aug 09, 2008 at 04:06:27AM +0900, Stephen J. Turnbull wrote:
> Alex Lance writes:
>  > On Sat, Aug 09, 2008 at 12:38:49AM +0900, Stephen J. Turnbull wrote:
>  > > Alex Lance writes:
> 
> If there is a "safe" version of unpull/obliterate (ie, it checks to
> find the patch in the parent repo), then it should be called "unpull".


IMO developing the functionality of making unpull/obliterate phone home
to the parent repo is a poor solution to the problem. What is the actual
problem that has led to the proposal of this solution?

A: The idea that someone might accidentally unpull patches that they
only have a single copy of, thus perhaps accidentally deleting important
data.

So to my mind the actual problem is not, "How do we make unpull work
more safely?" the problem is: "How can we ensure that important patches are
not accidentally lost?"

I would like to revise my previously suggested solution:

1) Remove the "unpull" command altogether, it is an ambiguous name that
does not strictly reflect the purpose of the command. I.e. a command that
is called unpull should logically only allow you to unpull patches that
have previously been pulled. I do not think this is an unusual assumption.

2) Change the behaviour of the "obliterate" command so that:

  a) Instead of un-applying and then deleting a patch, it un-applies a
     patch and then moves the patch bundle into a "trash" directory within the
     repo.

  b) Add a new switch to the "obliterate" command: --forever which allows
     obliterate to function as it does right now, i.e. completely and
     permanently deletes a patch (instead of moving the patch to the trash).

3) Instead of introducing another command ("unobliterate" or "unstash"
   etc), simply allow the patches that are in the "trash" directory to be
   manually rescued with the darcs "apply" command. I.e. probably no
   modification necessary.

Of course it's not like I'm volunteering to take on this work, so I'm
not holding my breathe for an implementation. I am only suggesting it
because I think it would make darcs a little safer for new users.

Cheers,
Alex

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to