mercurialbundledvcsmercurial-phases

Mercurial: Include secret changesets in bundle?


Using Mercurial, how can I bundle all changesets not known to be in another repository, including secret changesets?

I know bundle's --base option happens to include secret changesets, but I don't want the --base behavior. (And it seems unusually weird that secret changesets are always included with --base but are never included without it. Shouldn't there be a separate option?)

FYI, I commonly want to make a backup of all changesets which are only in my local repo before attempting a potentially dangerous history rewrite.


Solution

  • You are correct that hg bundle will normally exclude secret changesets. This is because it's just running the equivalent of hg outgoing and bundling these changesets.

    So some work-arounds:

    Note that phase information cannot be stored in bundles — the bundle format has not been changed to accommodate it.