Push secret changesets

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

    It seems like phases are still relatively new and some workflows, such as this, don't seem to be included, yet. As of 2013-03-19, I believe the only way you can do this is manually changing the phases from secret to public.

    You can use these commands from the command line:

    for /f "delims=" %a in ('hg log --template "{rev} " -r "secret()"') do @set secret=%a
    hg phase -d %secret%
    hg push -f
    hg phase -sf %secret%
    

    This doesn't change the commits to secret on the repository you are pushing to, I tried to change the push to do this (but was unsuccessful):

    hg push -f --remotecmd hg phase -sf %secret%
    

    The commits would have to match exactly for the remote hg command to work, but I couldn't get it to change on the remote repository anyway.

    ============================================================

    If you want to use a GUI like TortoiseHG Workbench you will have to do this all manually (change the phases in the GUI on any repositories you want to) at the moment. Sorry, and hopefully, we can find a better solution, soon!

提交回复
热议问题