Plugins/VcsPlugins/vcsMercurial/hg.py

changeset 2841
1f79e88f18b7
parent 2838
0f1423054184
child 2842
8dfee488b176
equal deleted inserted replaced
2840:10a133f3a5e8 2841:1f79e88f18b7
762 Mercurial repository. 762 Mercurial repository.
763 763
764 @param name file/directory name to show the log of (string) 764 @param name file/directory name to show the log of (string)
765 """ 765 """
766 dname, fname = self.splitPath(name) 766 dname, fname = self.splitPath(name)
767 isFile = os.path.isfile(name)
767 768
768 # find the root of the repo 769 # find the root of the repo
769 repodir = dname 770 repodir = dname
770 while not os.path.isdir(os.path.join(repodir, self.adminDir)): 771 while not os.path.isdir(os.path.join(repodir, self.adminDir)):
771 repodir = os.path.dirname(repodir) 772 repodir = os.path.dirname(repodir)
787 showLimit=True, 788 showLimit=True,
788 limitDefault=self.getPlugin().getPreferences("LogLimit")) 789 limitDefault=self.getPlugin().getPreferences("LogLimit"))
789 if dlg.exec_() == QDialog.Accepted: 790 if dlg.exec_() == QDialog.Accepted:
790 revs, noEntries = dlg.getRevisions() 791 revs, noEntries = dlg.getRevisions()
791 from .HgLogDialog import HgLogDialog 792 from .HgLogDialog import HgLogDialog
792 self.log = HgLogDialog(self) 793 self.log = HgLogDialog(self, isFile=isFile)
793 self.log.show() 794 self.log.show()
794 self.log.start(name, noEntries=noEntries, revisions=revs) 795 self.log.start(name, noEntries=noEntries, revisions=revs)
795 796
796 def vcsDiff(self, name): 797 def vcsDiff(self, name):
797 """ 798 """
1751 from UI.CompareDialog import CompareDialog 1752 from UI.CompareDialog import CompareDialog
1752 self.sbsDiff = CompareDialog() 1753 self.sbsDiff = CompareDialog()
1753 self.sbsDiff.show() 1754 self.sbsDiff.show()
1754 self.sbsDiff.compare(output1, output2, name1, name2) 1755 self.sbsDiff.compare(output1, output2, name1, name2)
1755 1756
1756 def hgLogBrowser(self, path): 1757 def hgLogBrowser(self, path, isFile=False):
1757 """ 1758 """
1758 Public method used to browse the log of a file/directory from the 1759 Public method used to browse the log of a file/directory from the
1759 Mercurial repository. 1760 Mercurial repository.
1760 1761
1761 @param path file/directory name to show the log of (string) 1762 @param path file/directory name to show the log of (string)
1763 @keyparam isFile flag indicating log for a file is to be shown (boolean)
1762 """ 1764 """
1763 from .HgLogBrowserDialog import HgLogBrowserDialog 1765 from .HgLogBrowserDialog import HgLogBrowserDialog
1764 self.logBrowser = HgLogBrowserDialog(self) 1766 self.logBrowser = HgLogBrowserDialog(self, isFile=isFile)
1765 self.logBrowser.show() 1767 self.logBrowser.show()
1766 self.logBrowser.start(path) 1768 self.logBrowser.start(path)
1767 1769
1768 def hgIncoming(self, name): 1770 def hgIncoming(self, name):
1769 """ 1771 """

eric ide

mercurial