Question

I'd like to move the "tip" tag to revision 272 on the following graph. Is it possible without commiting on that head?

o  changeset:   273:40cf2237a3d5
|  bookmark:    push-notification
|  tag:         tip
|  parent:      271:3640ade1df38
|  user:        xxxxxxxxx <xxxxx@zzzz.com>
|  date:        Mon May 12 16:11:01 2014 -0300
|  summary:     Lorem
|
| @  changeset:   272:70f0a3f3b74a
| |  parent:      269:b125e398bd69
| |  user:        yyyyyyyy <yyyyyyy@zzzzz.com>
| |  date:        Fri May 09 17:58:35 2014 -0300
| |  summary:     Ipsum
| |
o |  changeset:   271:3640ade1df38
| |  user:        yyyyyyyy <yyyyyyy@zzzzz.com>
| |  date:        Fri May 09 17:58:35 2014 -0300
| |  summary:     Dolor
| |
o |  changeset:   270:d064bf9ffad6
| |  parent:      268:01563b587c71
| |  user:        xxxxxxxxx <xxxxx@zzzz.com>
| |  date:        Fri May 09 11:00:47 2014 -0300
| |  summary:     Sit
| |
| o  changeset:   269:b125e398bd69
| |  parent:      267:602390d3eeb1
| |  user:        xxxxxxxxx <xxxxx@zzzz.com>
| |  date:        Fri May 09 08:13:06 2014 -0300
| |  summary:     Amet
| |
o |  changeset:   268:01563b587c71
|/   user:        xxxxxxxxx <xxxxx@zzzz.com>
|    date:        Tue May 06 17:47:32 2014 -0300
|    summary:     Consectur
|
o  changeset:   267:602390d3eeb1
|  user:        yyyyyyyy <yyyyyyy@zzzzz.com>
|  date:        Fri May 02 14:24:29 2014 -0300
|  summary:     Abc
|
Was it helpful?

Solution

You can't. tip is simply "most recent commit". If you want the branch with the head at 272, you should give it another bookmark. It's definitely advisable to just ignore tip completely.

OTHER TIPS

As @moswald said, it is not possible to change the tip in itself, as it is pointing to the tipmost changeset of your repository. As such, tip is not necessarily a good reference to use.

However, there is something that you can do, to change the tip here. This has no real value, but I explain it for theoretical reasons only. The solution to your problem, without doing any other commit on the other branch, is to push (for backup, e.g. you need a cloned or main repo), strip and re-pull the commit you want as tip.

hg push  -r 70f0a3f3b74a
hg strip -r 70f0a3f3b74a
hg pull  -r 70f0a3f3b74a

Then, simply update again to the same changeset, if needed, and you can either do

hg update -r 70f0a3f3b74a

Or...

hg update -r tip
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top