hg export question

Josh Malinski JMalinski at anasazisoftware.com
Thu May 12 16:56:42 UTC 2011


Thanks Matt, that was exactly what I was looking for. Didn't think to look under revsets.

--Josh


-----Original Message-----
From: Matt Mackall [mailto:mpm at selenic.com] 
Sent: Thursday, May 12, 2011 9:47 AM
To: Josh Malinski
Cc: mercurial at selenic.com
Subject: Re: hg export question

On Thu, 2011-05-12 at 08:27 -0700, Josh Malinski wrote:
> I am trying to export a range of revisions for a given branch (for
> example purposes I'll use default). I want to use these patches against
> a test repo for validation and compiling purposes. I know if I use
> something like the following hg export --git -o %h.patch 1:5 I will get
> all of the revisions from 1 to 5, but only 2 of the patches are on
> default and I don't want to include the others as they are on other
> branches. 

With vaguely recent hg, you can use '1::5'. '1::' means 1 and all its
descendants, '::5' mean 5 and all its ancestors, together it means all
changesets that are descendants of 1 and ancestors of 5 (inclusive).

See 'hg help revsets' for much more information about specifying
revisions.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial mailing list