[darcs-users] [darcs #473] A suggestion for the "unpull" command

dagit at codersbase.com dagit at codersbase.com
Mon Aug 1 21:12:56 UTC 2005


Erik Schnetter <schnetter at aei.mpg.de> writes:

> On Monday 01 August 2005 21:02, Yuval Kogman wrote:
>> On Mon, Aug 01, 2005 at 07:09:17 -0400, David Roundy wrote:
>> > I like this idea! (with a little modification) We store a list of
>> > repositories we've accessed in _darcs/prefs/repos, so we could just
>> > check all those repositories until we've found one that has the
>> > selected patches. It would slow down unpull, but would make it
>> > (almost) completely safe.
>>
>> How about unpull putting the patch in a stowaway place, where it can
>> be retrieved from, a bit like CVS's attic but more elegant.
>>
>> You can go through this "attic" if you really want to zap something
>> completely, and then it's your responsibility.
>>
>> I don't like unpull relying on other repos because it is less
>> distributed, by being dependant on external resources.

When I'm on the road with my laptop, this would be really bad.
Sometimes my other repos can be contacted, and sometimes I have no
'net access.

>> Furthermore, the performance hit will be REAAAALLLLLYYY painful.
>
> The problem with relying on other repositories is that they may go away.  
> If I play around with some patches, I often create some local 
> repositories -- this is very fast with darcs get.  It is equivalent to 
> a quick throwaway branch, which doesn't exist in CVS.  After I'm done 
> with the branch, a quick rm -rf gets rid of it.

I'd like to mention that not all repositories are fast to fetch with
get, take darcs's own repository. I have a repo that takes about 8
hours to 'get'.  I'd hate to have to create copies of it just to be
able to unpull.

I've used unpull for expirementing with functionality in a program I'm
writing, arguablely in this case I could have used 'get' to create
another copy and played there, but it was nice to be able to record
changes as often as I wanted and then 'unpull' them when I realized I
don't like them.  Another use is contributing to darcs.  If I send in
some patches, and then they are not accepted there is a good chance I
won't want them in my copy anymore (Perhaps I learned a better way),
in that case I'd like to unpull them.  Just make those changes go
away, that's often easier than applying new patches that take you back
to the old code.

> I'd prefer a safe copy within the repository.  It's fast and doesn't 
> take much space.  If it is stored in the "darcs send -o" format, then 
> people can access it using normal shell tools.

I think that sounds good too.  I have at least once, unpulled
something and then realized that I shouldn't have.  I try to use darcs
revert, but sometimes you need to record and once you do that, revert
just isn't enough if you change your mind.  This would also give a way
to either apply them directly, or examine their contents and manually
hack it back into their working copy.

Jason





More information about the darcs-users mailing list