[darcs-users] reviewing and testing pulls

David Roundy droundy at abridgegame.org
Wed Apr 28 11:48:14 UTC 2004


On Tue, Apr 27, 2004 at 11:47:10AM -0400, Andrew Pimlott wrote:
> On Tue, Apr 27, 2004 at 08:53:51AM -0400, David Roundy wrote:
> > It's a bit more of a pain to output patches with context, but is
> > definitely doable, and patches with context are still valid darcs
> > patches (darcs currently just ignores the context, although it could be
> > used for redundant checks).  Adding -u support to send is something
> > I've wanted to do, but never got around to.
> 
> If I understand what you're proposing, the problem with this is that the
> hunks would still be divided among multiple patches.  If multiple patches
> touch one file, I'd like to see the cumulative change.  This is why I
> said that the human-readable form of send doesn't have to be suitable for
> applying the patches.

I've just now gotten around to adding the -u option to send, by the way.

Hmmm.  So your concern is that when multiple patches are sent which modify
the same file, each modification is displayed in order, which could be
confusing/hard to read.

I would contend that if darcs (or any other SCM) is used *properly*
(properly here being an aesthetic distinction) it should be easier to view
the changes separately.  That way each change has its name and comments
along with it so you can see what each change was intended to do.  As long
as the names are useful and the patches are self-contained (e.g. not a
string of "oops" patches for a single change), I believe that it should be
easier to view the changes on a change-by-change basis than in a
file-by-file ordering.

On the other hand, creating a single mega-patch to go along with the send
wouldn't be hard.  I'd probably lean towards sticking it in the user-edited
description (--edit-description) section, where you could then intersperse
comments between the changes.  Of course, by point above was that the
patch names and comments themselves "should" be such that you don't need to
intersperse comments.  On the third (or is it fourth now?) hand, you might
want to intersperse questions, if you are unsure about particular bits of
code...

> > > Although I could use a separate tree, and throw it away to undo the
> > > pull, it would be nice for darcs to remember which patches were added in
> > > the same batch, and let me unpull the whole batch.
> > 
> > To me, this doesn't seem like it would be a very useful feature.  I'd say
> > that if you are likely to want to unpull a bunch of patches that you pulled
> > all at once, you should pull into a temporary repo.  Of course, you may not
> > know beforehand that you won't want the changes, but it doesn't seem *that*
> > hard to just run unpull a bunch of times.
> 
> Would it be feasible to unpull back to a tag?  Right now, unpull
> option.  But if I could unpull to a tag, I'd just tag, pull, and unpull
> to the tag to reject.

Hmmmm.  It is certainly doable, but a bit scary (what if you mistype the
tag?).  You can also accomplish this with a darcs get --tag-name followed
by a directory delete and rename.  On the other hand, this doesn't have
much of an advantage over just doing the pull into a temporary repo in the
first place.
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list