How to unhide a hidden (obsolete) changeset?

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sun Feb 2 00:41:17 UTC 2014


quick answer:

1) do not use strip
2) see `hg help touch` for a way to make it non-obsolete again.



On 02/01/2014 04:31 PM, Michael McNeil Forbes wrote:
> How can I unhide a change set?
>
> Consider this example (using the rebase and evolve extensions):
>
> hg init a
> cd a
> touch A0.txt
> hg add
> hg com -m "A0"
> touch A1.txt
> hg add
> hg com -m "A1"
>
> hg up 0
> touch B0.txt
> hg add
> hg com -m "B0"
>
> cd ..
> hg clone a b
> cd b
> hg phase -fd 2
> hg rebase -s 2 -d 1
>
> # Repo a has:
> hg glog -q
> @  2:cd21b5c368bd
> |
> | o  1:06898f86274e
> |/
> o  0:9bfb043e4c4a
>
> # Repo b has:
> hg --hidden glog -q
> @  3:063f76a41d36
> |
> | x  2:cd21b5c368bd
> | |
> o |  1:06898f86274e
> |/
> o  0:9bfb043e4c4a
>
> # Now, suppose I decide I do not want to do this, so I strip changesets 3 (and 2 for good measure) and pull again:
>
> cd b
> hg strip 3
> hg --hidden strip 2
> hg pull
> hg --hidden glog -q
> o  2:cd21b5c368bd
> |
> | @  1:06898f86274e
> |/
> o  0:9bfb043e4c4a
>
> # So far so good, but if I make changeset 2 draft again to edit it, it is still hidden
> hg phase -fd 2
> hg --hidden glog -q
> x  2:cd21b5c368bd
> |
> | @  1:06898f86274e
> |/
> o  0:9bfb043e4c4a
>
> # How do I unhide changeset 2 so that repo b behaves like a repo a?
>
> Michael.



More information about the Mercurial mailing list