Push secret changesets

前端 未结 6 1221
孤独总比滥情好
孤独总比滥情好 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:24

    No need to mark anything secret. If you only want to push one branch, use:

    hg push -r REV
    

    This will push REV and its ancestors only.

    Secret is good for Mercurial patch queue revisions, since they can't be pushed anyway and it prevents a local clone from copying them.

    Draft is good for tracking unpushed changes. If you still want to back them up, pushing them will flip them to Public, but you can reset them back to draft (as compared to another repository) with:

    hg phase -fd 'outgoing(URL)'
    

    (URL can be blank for the default push repo).

提交回复
热议问题