Commits

Yuya Nishihara committed 1910627

rename: move check of command name out of RenameDialog

RenameDialog should be usable without the knowledge of command-line.

  • Participants
  • Parent commits 35febb9
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/rename.py

     makeLogVisible = pyqtSignal(bool)
     progress = pyqtSignal(QString, object, QString, QString, object)
 
-    def __init__(self, ui, pats, parent=None, **opts):
+    def __init__(self, ui, pats, parent=None, iscopy=False):
         super(RenameDialog, self).__init__(parent)
-        self.iscopy = (opts.get('alias') == 'copy')
+        self.iscopy = iscopy
         # pats: local; src, dest: unicode
         src, dest = self.init_data(ui, pats)
         self.init_view(src, dest)
         s.setValue('rename/geom', self.saveGeometry())
 
 def run(ui, *pats, **opts):
-    return RenameDialog(ui, pats, **opts)
+    iscopy = (opts.get('alias') == 'copy')
+    return RenameDialog(ui, pats, iscopy=iscopy)