Mercurial: Include secret changes in a package?

Using Mercurial, how can I merge all change teams that are not known to be in another repository, including secret change tables?

I know that the option bundle --baseincludes secret changes, but I do not want behavior --base. (And it seems unusually strange that secret changes are always included in --base, but never included without it. Shouldn't there be a separate option?)

FYI, I usually want to back up all changesets that are only in my local repo before trying to rewrite a potentially dangerous history.

+5
source share
2 answers

, hg bundle . , hg outgoing .

, :

  • , ,

    $ hg bundle --base "parents(outgoing())"
    

    , . outgoing() , parents(outgoing() - . --base, (, ) .

  • , :

    $ secret=$(hg log --template "{rev} " -r "secret()"); \
      hg phase -d $secret; \
      hg bundle out.hg; \
      hg phase -f -s $secret
    

    ( Zsh, ${=secret} $secret, Zsh .)

    ; &&, reset , , hg bundle - hg bundle . , , , .

    :

    [alias]
    bundle-all = !secret=$(hg log --template "{rev} " -r "secret()");
                 hg phase -d $secret;
                 hg bundle $@;
                 hg phase -f -s $secret
    

    $@ Mercurial , hg bundle.

, - .

+5

, , :

hg bundle -r "not public()" --base public()

OTOH, , , :

hg bundle -r "not public()" --base null

, , , , push-. , . , .

- , :

hg log -r public() -l 1 --template "{rev}"

[0-9].

+1

All Articles