Plugins/VcsPlugins/vcsMercurial/ProjectBrowserHelper.py

branch
Py2 comp.
changeset 2847
1843ef6e2656
parent 2525
8b507a9a2d40
parent 2841
1f79e88f18b7
child 3057
10516539f238
equal deleted inserted replaced
2846:b852fe4d153a 2847:1843ef6e2656
229 self.vcsMenuActions.append(act) 229 self.vcsMenuActions.append(act)
230 menu.addSeparator() 230 menu.addSeparator()
231 act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"), 231 act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
232 self.trUtf8('Show difference'), self._VCSDiff) 232 self.trUtf8('Show difference'), self._VCSDiff)
233 self.vcsMenuActions.append(act) 233 self.vcsMenuActions.append(act)
234 act = menu.addAction(UI.PixmapCache.getIcon("vcsSbsDiff.png"),
235 self.trUtf8('Show difference side-by-side'), self.__HgSbsDiff)
236 self.vcsMenuActions.append(act)
234 act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"), 237 act = menu.addAction(UI.PixmapCache.getIcon("vcsDiff.png"),
235 self.trUtf8('Show difference (extended)'), 238 self.trUtf8('Show difference (extended)'),
236 self.__HgExtendedDiff) 239 self.__HgExtendedDiff)
240 self.vcsMenuActions.append(act)
241 act = menu.addAction(UI.PixmapCache.getIcon("vcsSbsDiff.png"),
242 self.trUtf8('Show difference side-by-side (extended)'),
243 self.__HgSbsExtendedDiff)
237 self.vcsMenuActions.append(act) 244 self.vcsMenuActions.append(act)
238 self.annotateAct = menu.addAction(self.trUtf8('Show annotated file'), 245 self.annotateAct = menu.addAction(self.trUtf8('Show annotated file'),
239 self.__HgAnnotate) 246 self.__HgAnnotate)
240 self.vcsMenuActions.append(self.annotateAct) 247 self.vcsMenuActions.append(self.annotateAct)
241 menu.addSeparator() 248 menu.addSeparator()
567 names.append(itm.fileName()) 574 names.append(itm.fileName())
568 except AttributeError: 575 except AttributeError:
569 names.append(itm.dirName()) 576 names.append(itm.dirName())
570 self.vcs.hgExtendedDiff(names) 577 self.vcs.hgExtendedDiff(names)
571 578
579 def __HgSbsDiff(self):
580 """
581 Private slot called by the context menu to show the difference of a file to
582 the repository side-by-side.
583 """
584 itm = self.browser.currentItem()
585 fn = itm.fileName()
586 self.vcs.hgSbsDiff(fn)
587
588 def __HgSbsExtendedDiff(self):
589 """
590 Private slot called by the context menu to show the difference of a file to
591 the repository side-by-side allowing the selection of revisions to compare.
592 """
593 itm = self.browser.currentItem()
594 fn = itm.fileName()
595 self.vcs.hgSbsDiff(fn, extended=True)
596
572 def __HgAnnotate(self): 597 def __HgAnnotate(self):
573 """ 598 """
574 Private slot called by the context menu to show the annotations of a file. 599 Private slot called by the context menu to show the annotations of a file.
575 """ 600 """
576 itm = self.browser.currentItem() 601 itm = self.browser.currentItem()
582 Private slot called by the context menu to show the log browser for a file. 607 Private slot called by the context menu to show the log browser for a file.
583 """ 608 """
584 itm = self.browser.currentItem() 609 itm = self.browser.currentItem()
585 try: 610 try:
586 fn = itm.fileName() 611 fn = itm.fileName()
612 isFile = True
587 except AttributeError: 613 except AttributeError:
588 fn = itm.dirName() 614 fn = itm.dirName()
589 self.vcs.hgLogBrowser(fn) 615 isFile = False
616 self.vcs.hgLogBrowser(fn, isFile=isFile)
590 617
591 def __HgResolve(self): 618 def __HgResolve(self):
592 """ 619 """
593 Private slot called by the context menu to resolve conflicts of a file. 620 Private slot called by the context menu to resolve conflicts of a file.
594 """ 621 """

eric ide

mercurial