Bookmaks moving backwards on pull?

Kevin Bullock kbullock+mercurial at ringworld.org
Fri Oct 19 19:57:49 UTC 2012


On Oct 19, 2012, at 2:51 PM, Arne Babenhauserheide wrote:

> At Thu, 18 Oct 2012 00:40:17 +0300,
> Ciprian Dorin Craciun wrote:
>>    Moreover Mercurial doesn't have "remote" bookmarks in the sense
>> that I can choose to "rename" yours somehow different from mine and
>> don't let any public repository clobber my bookmarks as I've described
>> earlier...
> 
> That a bookmark can be rewritten backwards in time looks like a bug to
> me…

Maybe, but not necessarily. Remember, tracking branch heads is only one of the use cases for bookmarks. Another is marking older changes that you want to keep track of. (This also applies to branch heads that were merged in, but you want to continue to track where the branch head was just before it was merged.)

But we do have the divergent-bookmarks machinery, so maybe we should say that if a pull moves a bookmark back, it should be marked as divergent?

> Also I cannot find that case in our tests, so it probably just slipped through.
> 
> -> http://selenic.com/hg/file/e99a451270e6/tests/test-bookmarks-pushpull.t
> 
> @all: I could verify that I can kill a bookmark on pull by just setting it to null:
> 
> hg -R remote boo -f remote_bookmark -r null
> hg -R myrepo pull remote
> 
> -> bookmark set to the null revision in my repo, too: I just killed my bookmark.

That doesn't actually kill the bookmark (check `hg bookmarks`)—only `hg bookmark -d` does that.

pacem in terris / мир / शान्ति / ‎‫سَلاَم
Kevin R. Bullock




More information about the Mercurial mailing list