"hg export outgoing"

Matt Mackall mpm at selenic.com
Thu Jan 3 21:45:58 CST 2008


On Fri, 2008-01-04 at 03:23 +0000, Mark Williamson wrote:
> Hi all,
> 
> I've had a poke around and failed to figure this out for myself...  Maybe 
> somebody here can confirm / deny this feature.
> 
> Basically I want a simple way to get an "hg export"-style patch of all 
> outgoing changes, which can then be e-mailed.  Another way to look at this is 
> as an implementation of "hg bundle" that outputs plain patch files.
> 
> Am I right that there's not a shorthand for doing this at the moment?  Is 
> there any particular reason to that?  What would be the preferred command to 
> add it to (option to hg export, option to hg outgoing, or ...?).
> 
> I could easily knock up a script which would do this for me but it seems like 
> something that could usefully be in the core for others to use too...

Look at the patchbomb extension, which will do all of this, including
actually emailing it.

But here's how you might do it by hand:

 hg export -o %r.patch `hg outgoing -q --template "{rev} "`

Or, for those without a nickel to buy a proper operating system:

 hg out -q --template "hg ex -o %n.patch {rev}\n" > revisions.bat
 revisions.bat

In the general case, there's not necessarily an easy way to import all
those changes, as they might be on different branches, etc.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial mailing list