##// END OF EJS Templates
bookmarks: add a `ignore` variant of the bookmark mode...
marmoute -
r49058:b56858d8 default
parent child Browse files
Show More
@@ -775,6 +775,9 def merging_from_remote(ui, repo, remote
775 775 def updatefromremote(
776 776 ui, repo, remotemarks, path, trfunc, explicit=(), mode=None
777 777 ):
778 if mode == b'ignore':
779 # This should move to an higher level to avoid fetching bookmark at all
780 return
778 781 ui.debug(b"checking for updated bookmarks\n")
779 782 if mode == b'mirror':
780 783 changed = mirroring_remote(ui, repo, remotemarks)
@@ -793,6 +796,9 def updatefromremote(
793 796
794 797 def incoming(ui, repo, peer, mode=None):
795 798 """Show bookmarks incoming from other to repo"""
799 if mode == b'ignore':
800 ui.status(_(b"bookmarks exchange disabled with this path\n"))
801 return 0
796 802 ui.status(_(b"searching for changed bookmarks\n"))
797 803
798 804 with peer.commandexecutor() as e:
@@ -1757,6 +1757,9 The following sub-options can be defined
1757 1757 - ``mirror``: when pulling, replace local bookmarks by remote bookmarks. This
1758 1758 is useful to replicate a repository, or as an optimization.
1759 1759
1760 - ``ignore``: ignore bookmarks during exchange.
1761 (This currently only affect pulling)
1762
1760 1763 The following special named paths exist:
1761 1764
1762 1765 ``default``
@@ -769,6 +769,7 def pushrevpathoption(ui, path, value):
769 769 SUPPORTED_BOOKMARKS_MODES = {
770 770 b'default',
771 771 b'mirror',
772 b'ignore',
772 773 }
773 774
774 775
@@ -1,7 +1,5
1 1 # This file is automatically @generated by Cargo.
2 2 # It is not intended for manual editing.
3 version = 3
4
5 3 [[package]]
6 4 name = "adler"
7 5 version = "0.2.3"
@@ -523,6 +523,21 mirroring bookmarks
523 523 X@foo 000000000000 removed
524 524 foo 000000000000 removed
525 525 foobar 000000000000 removed
526 $ hg incoming --bookmark -v ../a --config 'paths.*:bookmarks.mode=ignore'
527 comparing with ../a
528 bookmarks exchange disabled with this path
529 $ hg pull ../a --config 'paths.*:bookmarks.mode=ignore'
530 pulling from ../a
531 searching for changes
532 no changes found
533 $ hg book
534 @ 1:9b140be10808
535 @foo 2:0d2164f0ce0d
536 X@foo 2:0d2164f0ce0d
537 Y 0:4e3505fd9583
538 Z 2:0d2164f0ce0d
539 foo -1:000000000000
540 * foobar 1:9b140be10808
526 541 $ hg pull ../a --config 'paths.*:bookmarks.mode=mirror'
527 542 pulling from ../a
528 543 searching for changes
@@ -1908,6 +1908,8 Test section lookup
1908 1908 "merged" on push/pull.
1909 1909 - "mirror": when pulling, replace local bookmarks by remote bookmarks.
1910 1910 This is useful to replicate a repository, or as an optimization.
1911 - "ignore": ignore bookmarks during exchange. (This currently only
1912 affect pulling)
1911 1913
1912 1914 The following special named paths exist:
1913 1915
General Comments 0
You need to be logged in to leave comments. Login now