Can Mercurial pull without getting bookmarks?

耗尽温柔 提交于 2019-12-13 19:41:21

问题


Every time I pull from a repository I get not only the changesets but also all the bookmarks from that repository. In some situations this is quite annoying. Is there a way to pull without getting bookmarks?

(I'm actually using TortoiseHG, but information about plain Mercurial command line is useful and appreciated as well.)

(Background: In TortoiseHG having many bookmarks gets cluttered quickly. That doesn't matter in the remote repository where the bookmarks should remain for future reference. But locally I don't need or want them. So after each pull from the remote repository I have to delete each bookmark individually. This gets old fast...)


回答1:


I don't think that push copies bookmarks, so why not go to the remote repository and from there push into yours?

Alternatively, .hg/bookmarks is just a text file, what happens if you copy it, pull, and then restore the original?




回答2:


Is there a way to pull without getting bookmarks?

No. You get all remote bookmarks from remote repository every time

In TortoiseHG having many bookmarks gets cluttered quickly

How?! Not active "external" bookmark will remain invisible in the past history quickly

but... you can rename your local, important bookmarks (give some unique prefix) and after it deleting remote bookmarks after each pull can be a lot easier: grep -v PREFIX for content of .hg/bookmarks file



来源:https://stackoverflow.com/questions/31377026/can-mercurial-pull-without-getting-bookmarks

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!