Plugins/VcsPlugins/vcsMercurial/hg.py

changeset 5452
9f89364d9ffd
parent 5389
9b1c800daff3
child 5496
d157a2319073
--- a/Plugins/VcsPlugins/vcsMercurial/hg.py	Sat Jan 28 18:04:14 2017 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/hg.py	Sat Jan 28 19:21:31 2017 +0100
@@ -828,39 +828,6 @@
                         project.removeFile(name)
         return res
     
-    def vcsLog(self, name):
-        """
-        Public method used to view the log of a file/directory from the
-        Mercurial repository.
-        
-        @param name file/directory name to show the log of (string)
-        """
-        dname, fname = self.splitPath(name)
-        isFile = os.path.isfile(name)
-        
-        # find the root of the repo
-        repodir = dname
-        while not os.path.isdir(os.path.join(repodir, self.adminDir)):
-            repodir = os.path.dirname(repodir)
-            if os.path.splitdrive(repodir)[1] == os.sep:
-                return
-        
-        from .HgMultiRevisionSelectionDialog import \
-            HgMultiRevisionSelectionDialog
-        dlg = HgMultiRevisionSelectionDialog(
-            self.hgGetTagsList(repodir),
-            self.hgGetBranchesList(repodir),
-            self.hgGetBookmarksList(repodir),
-            emptyRevsOk=True,
-            showLimit=True,
-            limitDefault=self.getPlugin().getPreferences("LogLimit"))
-        if dlg.exec_() == QDialog.Accepted:
-            revs, noEntries = dlg.getRevisions()
-            from .HgLogDialog import HgLogDialog
-            self.log = HgLogDialog(self, isFile=isFile)
-            self.log.show()
-            self.log.start(name, noEntries=noEntries, revisions=revs)
-    
     def vcsDiff(self, name):
         """
         Public method used to view the difference of a file/directory to the
@@ -1938,19 +1905,13 @@
         
         @param name file/directory name to show the log of (string)
         """
-        if self.getPlugin().getPreferences("UseLogBrowser"):
-            if self.logBrowserIncoming is None:
-                from .HgLogBrowserDialog import HgLogBrowserDialog
-                self.logBrowserIncoming = HgLogBrowserDialog(
-                    self, mode="incoming")
-            self.logBrowserIncoming.show()
-            self.logBrowserIncoming.raise_()
-            self.logBrowserIncoming.start(name)
-        else:
-            from .HgLogDialog import HgLogDialog
-            self.log = HgLogDialog(self, mode="incoming")
-            self.log.show()
-            self.log.start(name)
+        if self.logBrowserIncoming is None:
+            from .HgLogBrowserDialog import HgLogBrowserDialog
+            self.logBrowserIncoming = HgLogBrowserDialog(
+                self, mode="incoming")
+        self.logBrowserIncoming.show()
+        self.logBrowserIncoming.raise_()
+        self.logBrowserIncoming.start(name)
     
     def hgOutgoing(self, name):
         """
@@ -1959,19 +1920,13 @@
         
         @param name file/directory name to show the log of (string)
         """
-        if self.getPlugin().getPreferences("UseLogBrowser"):
-            if self.logBrowserOutgoing is None:
-                from .HgLogBrowserDialog import HgLogBrowserDialog
-                self.logBrowserOutgoing = HgLogBrowserDialog(
-                    self, mode="outgoing")
-            self.logBrowserOutgoing.show()
-            self.logBrowserOutgoing.raise_()
-            self.logBrowserOutgoing.start(name)
-        else:
-            from .HgLogDialog import HgLogDialog
-            self.log = HgLogDialog(self, mode="outgoing")
-            self.log.show()
-            self.log.start(name)
+        if self.logBrowserOutgoing is None:
+            from .HgLogBrowserDialog import HgLogBrowserDialog
+            self.logBrowserOutgoing = HgLogBrowserDialog(
+                self, mode="outgoing")
+        self.logBrowserOutgoing.show()
+        self.logBrowserOutgoing.raise_()
+        self.logBrowserOutgoing.start(name)
     
     def hgPull(self, name):
         """
@@ -2651,19 +2606,13 @@
         if file:
             self.__lastChangeGroupPath = os.path.dirname(file)
             
-            if self.getPlugin().getPreferences("UseLogBrowser"):
-                if self.logBrowserIncoming is None:
-                    from .HgLogBrowserDialog import HgLogBrowserDialog
-                    self.logBrowserIncoming = \
-                        HgLogBrowserDialog(self, mode="incoming")
-                self.logBrowserIncoming.show()
-                self.logBrowserIncoming.raise_()
-                self.logBrowserIncoming.start(name, bundle=file)
-            else:
-                from .HgLogDialog import HgLogDialog
-                self.log = HgLogDialog(self, mode="incoming", bundle=file)
-                self.log.show()
-                self.log.start(name)
+            if self.logBrowserIncoming is None:
+                from .HgLogBrowserDialog import HgLogBrowserDialog
+                self.logBrowserIncoming = \
+                    HgLogBrowserDialog(self, mode="incoming")
+            self.logBrowserIncoming.show()
+            self.logBrowserIncoming.raise_()
+            self.logBrowserIncoming.start(name, bundle=file)
     
     def hgUnbundle(self, name):
         """

eric ide

mercurial