[darcs-users] basic patch-juggling question

Peter B. West lists at pbw.id.au
Sun Feb 25 23:45:51 UTC 2007


Zachary Pincus wrote:
> On Feb 25, 2007, at 8:40 AM, Albert Reiner wrote:
> 
>> [Zachary Pincus <zpincus at stanford.edu>, Sun, 25 Feb 2007 05:57:55 -0800]:
>>> I would like to selectively un-do a patch (in part or in whole) from
>>> the *working copy*. I can't figure out an easy way to do this, though.
>>
>> If I were you, I wouldn't go about it this way.  Instead, I would just
>> create a new repo (`darcs get original temporary'), and then I would
>> just throw away the patch in the temporary repo (`cd temporary; darcs
>> unpull').
> 
> Thanks for the information. After unpulling, etc, what's the best way to
> record those changes as a patch that I can apply to the master
> repository? (After all, the goal is still to get a file in the master
> repository to look like an arbitrary past version.)
> 
> If I recall correctly, a basic unpull operation isn't something that's
> recorded as a patch -- and so couldn't be 'recorded' and 'pushed' to the
> master repository. In addition, if I unpull in a temp repository and
> then modify some file and record that patch, will that patch apply
> cleanly to the master repository, where the context is different?

Another suggestion for the 'switch verbosity on and off' case.  Keep two
repositories - verbose and quiet - with the appropriate particular
patches applied in each.  As you make changes in either, you can pull
the patches into the other repository.  Your essential code base is
easily kept in synchronization without having to constantly do housekeeping.

>From my limited experience, one of the keys to the darcs mindset is to
free yourself from the idea of _the_ repository. If you are releasing a
finished product, there may indeed be such a beast, but in terms of your
working environment, set up the trees that you need. Verbose/quiet is an
ideal candidate.

Peter

-- 
Peter B. West <http://cv.pbw.id.au/>
Folio <http://defoe.sourceforge.net/folio/>



More information about the darcs-users mailing list