eric6/Plugins/VcsPlugins/vcsMercurial/hg.py

changeset 8108
a42ae6be4cc3
parent 7979
54b73174ab61
child 8142
43248bafe9b2
child 8143
2c730d5fd177
diff -r 7d3932bde11b -r a42ae6be4cc3 eric6/Plugins/VcsPlugins/vcsMercurial/hg.py
--- a/eric6/Plugins/VcsPlugins/vcsMercurial/hg.py	Tue Feb 16 17:12:48 2021 +0100
+++ b/eric6/Plugins/VcsPlugins/vcsMercurial/hg.py	Tue Feb 16 18:25:47 2021 +0100
@@ -3226,7 +3226,7 @@
             if res:
                 dia.exec()
     
-    def hgBookmarkPush(self, current=False, bookmark=None):
+    def hgBookmarkPush(self, current=False, bookmark=None, allBookmarks=False):
         """
         Public method to push a bookmark to a remote repository.
         
@@ -3234,11 +3234,13 @@
         @type bool
         @param bookmark name of the bookmark
         @type str
+        @param allBookmarks flag indicating to push all bookmarks
+        @type bool
         """
         if current:
             bookmark = "."
             ok = True
-        elif bookmark:
+        elif bookmark or allBookmarks:
             ok = True
         else:
             bookmarks = self.__getInOutBookmarks(False)
@@ -3249,10 +3251,13 @@
                 [""] + sorted(bookmarks),
                 0, True)
         
-        if ok and bookmark:
+        if ok and (bool(bookmark) or all):
             args = self.initCommand("push")
-            args.append('--bookmark')
-            args.append(bookmark)
+            if allBookmarks:
+                args.append('--all-bookmarks')
+            else:
+                args.append('--bookmark')
+                args.append(bookmark)
             
             dia = HgDialog(self.tr(
                 'Pushing bookmark to a remote Mercurial repository'),

eric ide

mercurial