comparison mercurial/exchange.py @ 48242:4d2ab365699e

bookmarks: move the `mirror` option to the `paths` section A new `bookmarks` section with a `mirror` option have been added. That option has never been released yet. This new options is limited since it affect all paths without distinction. In case where a repository is interacting with multiple peers, being able to control behavior on a path basis can be quite valuable. In addition, having more variant of behavior would be interesting, especially a mode where no bookmark exchanged is tried at all. Such new mode (implemented later) make a lot of sense for configuration on a path-basis. Configuration of the default behavior is still possible through the usage of generic path configuration. The "old" config, becomes: [bookmarks] mirror=True becomes: [path] *:bookmarks.mode=mirror Differential Revision: https://phab.mercurial-scm.org/D11675
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 15 Oct 2021 03:49:05 +0200
parents 7d1e60244561
children aad84024660f
comparison
equal deleted inserted replaced
48241:7d1e60244561 48242:4d2ab365699e
2026 if b'bookmarks' in pullop.stepsdone: 2026 if b'bookmarks' in pullop.stepsdone:
2027 return 2027 return
2028 pullop.stepsdone.add(b'bookmarks') 2028 pullop.stepsdone.add(b'bookmarks')
2029 repo = pullop.repo 2029 repo = pullop.repo
2030 remotebookmarks = pullop.remotebookmarks 2030 remotebookmarks = pullop.remotebookmarks
2031 bookmarks_mode = None
2032 if pullop.remote_path is not None:
2033 bookmarks_mode = pullop.remote_path.bookmarks_mode
2031 bookmod.updatefromremote( 2034 bookmod.updatefromremote(
2032 repo.ui, 2035 repo.ui,
2033 repo, 2036 repo,
2034 remotebookmarks, 2037 remotebookmarks,
2035 pullop.remote.url(), 2038 pullop.remote.url(),
2036 pullop.gettransaction, 2039 pullop.gettransaction,
2037 explicit=pullop.explicitbookmarks, 2040 explicit=pullop.explicitbookmarks,
2041 mode=bookmarks_mode,
2038 ) 2042 )
2039 2043
2040 2044
2041 def _pullobsolete(pullop): 2045 def _pullobsolete(pullop):
2042 """utility function to pull obsolete markers from a remote 2046 """utility function to pull obsolete markers from a remote