Push secret changesets

前端 未结 6 1224
孤独总比滥情好
孤独总比滥情好 2021-02-13 18:52

That may look paradoxical, I know that secret changesets are meant to be private, but what if I want to backup those secret changesets?

I work with some branches in para

6条回答
  •  孤独总比滥情好
    2021-02-13 19:35

    This is the best I have come up with so far. I think its essentially equivalent to what you want push/pull to be able to do.

    1. Mark all the secret changesets you want to transfer as draft
    2. In the source repo run hg bundle -r last_draft_rev bundlefile.hg path\to\backup\repo
    3. In the destination repo run hg unbundle bundlefile.hg
    4. The changesets will come into the backup as DRAFT
    5. Mark the first draft changeset as secret, and all its descendants will be marked thusly

    I couldn't get #2 to work if the changesets were still marked secret.

提交回复
热议问题