Commits

Yuya Nishihara committed a0ba784

fin, purge

  • Participants
  • Parent commits 7016ec6

Comments (0)

Files changed (3)

fctxa-contextfunc-exp.diff

-# HG changeset patch
-# Parent ccb64bf3a1e5e2ec5d66a81fc122f28cc4442b44
-
-diff --git a/tortoisehg/hgqt/filectxactions.py b/tortoisehg/hgqt/filectxactions.py
---- a/tortoisehg/hgqt/filectxactions.py
-+++ b/tortoisehg/hgqt/filectxactions.py
-@@ -95,6 +95,7 @@ class FilectxActions(QObject):
-             return self._repoagent
-         return self._repoagent.subRepoAgent(rpath)
- 
-+    # TODO: move isXxx funcs to instance method and specify in action decorator?
-     def _updateActions(self):
-         nosub = not self._curfd.repoRootPath() and not self._curfd.subrepoType()
-         real = self._curfd.rev() is not None and self._curfd.rev() >= 0

fctxa-fdarg-exp.diff

-# HG changeset patch
-# Parent 816a40b35f9a92b9707676d927bfca61440bf8be
-
-diff --git a/tortoisehg/hgqt/filectxactions.py b/tortoisehg/hgqt/filectxactions.py
---- a/tortoisehg/hgqt/filectxactions.py
-+++ b/tortoisehg/hgqt/filectxactions.py
-@@ -33,7 +33,12 @@ def _action(text, icon, shortcut, status
-     def decorate(func):
-         name = func.__name__
-         _actiondefs.append((name, text, icon, shortcut, statustip))
--        return pyqtSlot()(func)
-+        @pyqtSlot(name=name)
-+        def wrapped(self):
-+            if not self._selfds:
-+                return
-+            func(self, *self._selfds)  # XXX drop self._curfd completely?
-+        return wrapped
-     return decorate
- 
- def _lcanonpaths(fds):
-@@ -173,21 +178,21 @@ class FilectxActions(QObject):
- 
-     @_action(_('File &History'), 'hg-log', 'Shift+Return',
-              _('Show the history of the selected file'))
--    def navigate(self):
--        self._navigate(filedialogs.FileLogDialog)
-+    def navigate(self, fd):
-+        self._navigate(filedialogs.FileLogDialog, fd)
- 
-     @_action(_('Co&mpare File Revisions'), 'compare-files', None,
-              _('Compare revisions of the selected file'))
--    def diffNavigate(self):
--        self._navigate(filedialogs.FileDiffDialog)
-+    def diffNavigate(self, fd):
-+        self._navigate(filedialogs.FileDiffDialog, fd)
- 
--    def _navigate(self, dlgclass):
-+    def _navigate(self, dlgclass, fd):
-         repoagent = self._fdRepoAgent()
-         repo = repoagent.rawRepo()
--        filename = hglib.fromunicode(self._curfd.canonicalFilePath())
-+        filename = hglib.fromunicode(fd.canonicalFilePath())
-         if len(repo.file(filename)) > 0:
-             dlg = self._nav_dialogs.open(dlgclass, repoagent, filename)
--            dlg.goto(self._curfd.rev())
-+            dlg.goto(fd.rev())
- 
-     def _createnavdialog(self, dlgclass, repoagent, filename):
-         return dlgclass(repoagent, filename)
-@@ -198,33 +203,31 @@ class FilectxActions(QObject):
- 
-     @_action(_('Folder &History'), 'hg-log', None,
-              _('Show the history of the selected file'))
--    def filterfile(self):
-+    def filterfile(self, *fds):
-         """Ask to only show the revisions in which files on that folder are
-         present"""
--        if self._curfd.isNull():
--            return
--        pats = ["file('path:%s')" % fd.filePath() for fd in self._selfds]
-+        pats = ["file('path:%s')" % fd.filePath() for fd in fds]
-         self.filterRequested.emit(' or '.join(pats))
- 
-     @_action(_('&Diff to Parent'), 'visualdiff', 'Ctrl+D',
-              _('View file changes in external diff tool'))
--    def vdiff(self):
--        if self._curfd.rev() is not None and self._curfd.rev() < 0:
-+    def vdiff(self, *fds):
-+        fd = fds[0]
-+        if fd.rev() is not None and fd.rev() < 0:
-             QMessageBox.warning(self.parent(),
-                 _("Cannot display visual diff"),
-                 _("Visual diffs are not supported for unapplied patches"))
-             return
--        self._visualDiff(change=self._curfd.rev())
-+        self._visualDiff(change=fd.rev())
- 
-     @_action(_('Diff to &Local'), 'ldiff', 'Shift+Ctrl+D',
-              _('View changes to current in external diff tool'))
--    def vdifflocal(self):
--        assert self._curfd.rev() is not None
--        self._visualDiff(rev=['rev(%d)' % self._curfd.rev()])
-+    def vdifflocal(self, *fds):
-+        fd = fds[0]
-+        assert fd.rev() is not None
-+        self._visualDiff(rev=['rev(%d)' % fd.rev()])
- 
-     def _visualDiff(self, **opts):
--        if self._curfd.isNull():
--            return
-         repo = self._fdRepoAgent().rawRepo()
-         filenames = _lcanonpaths(self._selfds)
-         dlg = visdiff.visualdiff(repo.ui, repo, filenames, opts)
-@@ -233,11 +236,9 @@ class FilectxActions(QObject):
- 
-     @_action(_('&View at Revision'), 'view-at-revision', 'Shift+Ctrl+E',
-              _('View file as it appeared at this revision'))
--    def editfile(self):
--        if self._curfd.isNull():
--            return
-+    def editfile(self, *fds):
-         repo = self._fdRepoAgent().rawRepo()
--        filenames = _lcanonpaths(self._selfds)
-+        filenames = _lcanonpaths(fds)
-         if self._curfd.rev() is None:
-             qtlib.editfiles(repo, filenames, parent=self.parent())
-         else:
-@@ -249,45 +250,37 @@ class FilectxActions(QObject):
- 
-     @_action(_('&Save at Revision...'), None, 'Shift+Ctrl+S',
-              _('Save file as it appeared at this revision'))
--    def savefile(self):
--        if self._curfd.isNull():
--            return
-+    def savefile(self, *fds):
-         repo = self._fdRepoAgent().rawRepo()
--        filenames = _lcanonpaths(self._selfds)
-+        filenames = _lcanonpaths(fds)
-         rev = self._curfd.rev()
-         qtlib.savefiles(repo, filenames, rev, parent=self.parent())
- 
-     @_action(_('&Edit Local'), 'edit-file', None,
-              _('Edit current file in working copy'))
--    def editlocal(self):
--        if self._curfd.isNull():
--            return
-+    def editlocal(self, *fds):
-         repo = self._fdRepoAgent().rawRepo()
--        filenames = _lcanonpaths(self._selfds)
-+        filenames = _lcanonpaths(fds)
-         qtlib.editfiles(repo, filenames, parent=self.parent())
- 
-     @_action(_('&Open Local'), None, 'Shift+Ctrl+L',
-              _('Edit current file in working copy'))
--    def openlocal(self):
--        if self._curfd.isNull():
--            return
-+    def openlocal(self, *fds):
-         repo = self._fdRepoAgent().rawRepo()
--        filenames = _lcanonpaths(self._selfds)
-+        filenames = _lcanonpaths(fds)
-         qtlib.openfiles(repo, filenames)
- 
-     @_action(_('Copy &Path'), None, 'Shift+Ctrl+C',
-              _('Copy full path of file(s) to the clipboard'))
--    def copypath(self):
--        paths = [fd.absoluteFilePath() for fd in self._selfds]
-+    def copypath(self, *fds):
-+        paths = [fd.absoluteFilePath() for fd in fds]
-         QApplication.clipboard().setText(os.linesep.join(paths))
- 
-     @_action(_('&Revert to Revision...'), 'hg-revert', 'Shift+Ctrl+R',
-              _('Revert file(s) to contents at this revision'))
--    def revertfile(self):
--        if self._curfd.isNull():
--            return
-+    def revertfile(self, *fds):
-         repoagent = self._fdRepoAgent()
--        fileSelection = _lcanonpaths(self._selfds)
-+        fileSelection = _lcanonpaths(fds)
-         rev = self._curfd.rev()
-         if rev is None:
-             repo = repoagent.rawRepo()
-@@ -298,8 +291,7 @@ class FilectxActions(QObject):
- 
-     @_action(_('Open S&ubrepository'), 'thg-repository-open', None,
-              _('Open the selected subrepository'))
--    def opensubrepo(self):
--        fd = self._curfd
-+    def opensubrepo(self, fd):
-         if fd.subrepoType() != 'hg':
-             return
-         ctx = fd.rawContext()
-@@ -310,14 +302,14 @@ class FilectxActions(QObject):
- 
-     @_action(_('E&xplore Folder'), 'system-file-manager', None,
-              _('Open the selected folder in the system file manager'))
--    def explore(self):
--        if self._curfd.isDir():
--            qtlib.openlocalurl(self._curfd.absoluteFilePath())
-+    def explore(self, fd):
-+        if fd.isDir():
-+            qtlib.openlocalurl(fd.absoluteFilePath())
- 
-     @_action(_('Open &Terminal'), 'utilities-terminal', None,
-              _('Open a shell terminal in the selected folder'))
--    def terminal(self):
--        if self._curfd.isDir():
-+    def terminal(self, fd):
-+        if fd.isDir():
-             root = hglib.fromunicode(self._curfd.absoluteFilePath())
-             currentfile = hglib.fromunicode(self._curfd.filePath())
-             qtlib.openshell(root, currentfile, self._ui)
 repoview-resizebyitself.diff
 graph-path.diff
 rebase-optdict-incomplete.diff
-fctxa-fdarg-exp.diff
-fctxa-contextfunc-exp.diff
 graph-yellowbg.diff #+debug
 cmd-nouierror.diff
 pipeui-mimicuierror.diff