[darcs-users] short options and long names (VOTE!)

Andrew Pimlott andrew at pimlott.net
Tue Jul 27 21:06:41 UTC 2004


On Tue, Jul 27, 2004 at 07:28:02AM -0400, David Roundy wrote:
> On Tue, Jul 27, 2004 at 03:11:50AM -0400, Andrew Pimlott wrote:
> > As preface, I think some of it stems from the fact that a range of
> > patches is an ill-defined concept
> 
> I think I disagree here.  Operationally, the "order" of patches is a
> well-defined property, even though it is mutable and not really important.
> And in gives a very useful way to select patches.  "changes" shows the
> order, so it needn't give a surprise.

Ok, you know darcs pretty well, so I'll trust you.  :-)

> The "last" matching patch is well-defined, and is useful, since it means
> you can easily run a changes, see the patch you want, see a word in it that
> doesn't show up in any more recent patches and run with --patch "word" and
> know that it's what you want.

right

> > - pull, push, and send take --patches (implying these patches and their
> >   dependents).  The discrepancy with get jumps out at me: if it makes
> >   sense to get a range with get, why not with pull?  Or ask the question
> >   the other way around.
> 
> No, the plural here doesn't indicate the dependencies, but rather the fact
> that these commands don't operate on the "last" matching patch, but rather
> on *all* matching patches.

Right, I wasn't clear in my phrasing.

> Here I'll explain how I think about annotate.
> 
> Annotate *always* describes a single patch.  By default it is the most
> recent patch.

I still think it is more accurate to say that with a directory or file,
annotate describes the range from the beginning to that patch.  Though I
see it does treat the specified patch specially, and that it gives you
information about that patch you couldn't easily get otherwise.  I guess
it's a doc and preconception issue.

Maybe my view of annotate is unreliable, because I don't usually use it.
When I have, it has usually been to see which patch the code I'm looking
at was changed in; then I go look at that patch.  I prefer to cut out a
step: search the patches directly.  When I used clearcase, I had a
script called grepdiffs that took a file and a pattern, and showed me
the diffs of all the revisions that matched the pattern.  This not only
takes me directly to the patches, but shows me older patches and patches
that remove my pattern.

To do this in darcs, I would want to see the text of all patches
affecting a file, which annotate can't give me (and which changes
potentially could).

> > - Remove all [pm]atch options from get.  You can only get tags.  I
> >   assume (didn't test) that --tag is interpreted as a range, just like
> >   (The two behaviors are usually indistinguishable, but I think if tags
> >   were created in separate repositories, they might not be.)
> 
> Instead I changed then to --to-[pm]atch.  --tag is not interpereted as a
> range, but rather as a "tag".  That is, a specific version.

Great, sorry for doubting you.  ;-)

Andrew




More information about the darcs-users mailing list