[darcs-users] Context equivalent to tag

David Roundy droundy at darcs.net
Mon Oct 3 11:55:48 UTC 2005


On Mon, Oct 03, 2005 at 01:45:58PM +0200, Aaron Kaplan wrote:
> On Sat, Oct 01, 2005 at 01:50:42PM +0200, Aaron Kaplan wrote:
> > I'm looking for a way to get a context file that describes a tagged
> > version.  I could do it with "darcs get --tag=foo" and then "darcs
> > changes --context", but that seems like a rather wasteful way to get at
> > information [that], in principle, could be read directly from the
> > original repository.  Is there a more direct way?
> 
> On Mon, 3 Oct 2005 06:46:04 -0400, "David Roundy" <droundy at darcs.net>
> replied:
> > 
> > darcs changes --context --tags=foo
> 
> That lists just one patch, namely the one that applies the tag "foo" (at
> least in 1.0.3).  (Ah, come to think of it, so does the wasteful method
> I suggested.)  This is perfectly logical, but it's not what I was
> looking for.  I wanted a list of the patches on which the tag depends.

I believe

darcs changes --to-tag 1.0 --reverse

gives you what you want.

> But I think --reorder-patches may give me what I need, so this might be
> a moot point.  I'm modifying tailor so that it will sync tags from darcs
> to cvs.  Ordinarily, tailor simply applies darcs patches to the cvs
> working directory in the order that they're listed in the darcs change
> history, but this isn't necessarily correct if there are tags involved:
> it's possible that tag P2 follows patch P1 in the darcs history, yet
> doesn't depend on P1.  In that case, if I apply P1 and then P2 in cvs, I
> will have tagged the wrong version.  By doing --reorder-patches after
> each time I pull a tag into the darcs repo, will I ensure that the
> change history is in the right order to be applied in cvs?  Obviously if
> P1 has already been checked into cvs before P2 is pulled into darcs,
> then I'll have to do something more complicated, but at least this is a
> condition I can detect.

Yes, --reorder after pulling a tag will put that tag into its appropriate
order.  This *doesn't* work if you pull two tags at once.  And keep in mind
that calling --reorder may mess up the order of existing tags (since it's
often impossible to have all tags in "canonical" order).
-- 
David Roundy
http://www.darcs.net




More information about the darcs-users mailing list