[prev in list] [next in list] [prev in thread] [next in thread]
List: mercurial
Subject: Re: Creating a tagged snapshot for changegroup
From: Matt Mackall <mpm () selenic ! com>
Date: 2015-03-31 13:23:17
Message-ID: 1427808197.488.151.camel () selenic ! com
[Download RAW message or body]
On Tue, 2015-03-31 at 15:13 +0200, tg@gmplib.org wrote:
> Matt Mackall <mpm@selenic.com> writes:
>
> On Mon, 2015-03-30 at 18:58 +0200, tg@gmplib.org wrote:
> > I'd like to create a snapshot (i.e., a tar file) for each changegroup
> > push into our main GMP repo. Surely this is possible, and has been
> > done? (Have googled for it for a while, found nothing relevant.)
> >
> > I'd prefer to name the repo with the incremented version number (of the
> > last change set).
>
> What you want is called a hook. Look for "changegroup" in the "hooks"
> section of "hg help config". That hook should then call something like:
>
> hg archive -r $HG_NODE if-disk-full-delete-this-first-$HG_NODE.tar.gz
>
> Thanks, this works fine for me!
>
> $HG_NODE expands to a 40 char long string, somewhat inconvenient for
> snapshot naming. Is there a magic variable for the checkin sequence
> number? (I couldn't find $HG_NODE in the "hg help environment".)
>
> E.g., my tip is listed as 16565:cf1afda5661e by some commands, the
> $HG_NODE becomes cf1afda5661ef5704902a16d08b93efef7efff6b (with 12 chars
> in common). I'd like to get "16565" in this case.
If you read 'hg help archive', it'll point you to 'hg help export' to
explain its magic filename sauce (look for %r).
$HG_NODE is explained in 'hg help config' as it's specific to the hook.
--
Mathematics is the supreme nostalgia of our time.
_______________________________________________
Mercurial mailing list
Mercurial@selenic.com
http://selenic.com/mailman/listinfo/mercurial
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic