Plugins/VcsPlugins/vcsMercurial/hg.py

changeset 5514
1aa13333eb9f
parent 5512
f148796813d4
child 5548
95b188f96d3d
--- a/Plugins/VcsPlugins/vcsMercurial/hg.py	Sun Feb 12 11:40:10 2017 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/hg.py	Sun Feb 12 17:42:42 2017 +0100
@@ -2643,13 +2643,17 @@
             self.logBrowserIncoming.raise_()
             self.logBrowserIncoming.start(name, bundle=file)
     
-    def hgUnbundle(self, name):
+    def hgUnbundle(self, name, files=None):
         """
         Public method to apply changegroup files.
         
-        @param name directory name (string)
+        @param name directory name
+        @type str
+        @param files list of bundle files to be applied
+        @type list of str
         @return flag indicating, that the update contained an add
-            or delete (boolean)
+            or delete
+        @rtype bool
         """
         dname, fname = self.splitPath(name)
         
@@ -2661,11 +2665,13 @@
                 return
         
         res = False
-        files = E5FileDialog.getOpenFileNames(
-            None,
-            self.tr("Apply changegroups"),
-            self.__lastChangeGroupPath or repodir,
-            self.tr("Mercurial Changegroup Files (*.hg);;All Files (*)"))
+        if not files:
+            files = E5FileDialog.getOpenFileNames(
+                None,
+                self.tr("Apply changegroups"),
+                self.__lastChangeGroupPath or repodir,
+                self.tr("Mercurial Changegroup Files (*.hg);;All Files (*)"))
+        
         if files:
             self.__lastChangeGroupPath = os.path.dirname(files[0])
             
@@ -2687,6 +2693,7 @@
                 dia.exec_()
                 res = dia.hasAddOrDelete()
             self.checkVCSStatus()
+        
         return res
     
     def hgBisect(self, name, subcommand):

eric ide

mercurial