Commits

Yuya Nishihara committed b18502c

rename to mqutil

Comments (0)

Files changed (2)

 # HG changeset patch
-# Parent 51cabf09d8857c4988b7929850ea72178e4cbff1
+# Date 1349796563 -32400
+# Parent f0e8c62c56e22ced9243b313ddf39b58e61bdda7
 chunks: improve confirmation message for revertall
 
 It asks whether to revert file completely or to remove chunks but keep file
 # HG changeset patch
 # Date 1349673988 -32400
 # Parent 11cf6cb25df95ef1a4528867f9457f5ab524ff95
-mq: split core functions to mqlib in order to avoid circular import
+mq: split core functions to mqutil in order to avoid circular import
 
 The original code has circular import path, commit -> mq -> thgimport
 -> commit.
  from tortoisehg.hgqt.messageentry import MessageEntry
  from tortoisehg.hgqt import qtlib, qscilib, status, cmdui, branchop, revpanel
 -from tortoisehg.hgqt import hgrcutil, mq, lfprompt, i18n
-+from tortoisehg.hgqt import hgrcutil, mqlib, lfprompt, i18n
++from tortoisehg.hgqt import hgrcutil, mqutil, lfprompt, i18n
  
  from PyQt4.QtCore import *
  from PyQt4.QtGui import *
              self.pnlabel = QLabel()
              pnhbox.addWidget(self.pnlabel)
 -            self.pnedit = mq.getPatchNameLineEdit()
-+            self.pnedit = mqlib.getPatchNameLineEdit()
++            self.pnedit = mqutil.getPatchNameLineEdit()
              self.pnedit.setMaximumWidth(250)
              pnhbox.addWidget(self.pnedit)
              pnhbox.addStretch()
              self.pnedit.setVisible(True)
              self.pnedit.setFocus()
 -            self.pnedit.setText(mq.defaultNewPatchName(self.repo))
-+            self.pnedit.setText(mqlib.defaultNewPatchName(self.repo))
++            self.pnedit.setText(mqutil.defaultNewPatchName(self.repo))
              self.pnedit.selectAll()
              self.stwidget.setPatchContext(None)
              refreshwctx = refresh and oldpctx is not None
 -                                          curraction._name == 'qnew',
 -                                          self.stwidget, self.pnedit,
 -                                          self.msgte.text(), self.opts, olist)
-+        cmdlines = mqlib.mqNewRefreshCommand(self.repo,
-+                                             curraction._name == 'qnew',
-+                                             self.stwidget, self.pnedit,
-+                                             self.msgte.text(), self.opts,
-+                                             olist)
++        cmdlines = mqutil.mqNewRefreshCommand(self.repo,
++                                              curraction._name == 'qnew',
++                                              self.stwidget, self.pnedit,
++                                              self.msgte.text(), self.opts,
++                                              olist)
          if not cmdlines:
              return
          wholecmdlines.extend(cmdlines)
  from tortoisehg.hgqt.i18n import _
  from tortoisehg.hgqt import qtlib, cmdui, rejects, qscilib, thgrepo, status
 -from tortoisehg.hgqt import qqueue, qreorder, thgimport, messageentry
-+from tortoisehg.hgqt import qqueue, qreorder, thgimport, messageentry, mqlib
++from tortoisehg.hgqt import qqueue, qreorder, thgimport, messageentry, mqutil
  from tortoisehg.hgqt.qtlib import geticon
  
  # TODO
          mtbarhbox.setContentsMargins(0, 0, 0, 0)
          self.newCheckBox = QCheckBox(_('New Patch'))
 -        self.patchNameLE = getPatchNameLineEdit()
-+        self.patchNameLE = mqlib.getPatchNameLineEdit()
++        self.patchNameLE = mqutil.getPatchNameLineEdit()
          mtbarhbox.addWidget(self.newCheckBox)
          mtbarhbox.addWidget(self.patchNameLE, 1)
  
  
      def getUserOptions(self, *optionlist):
 -        return getUserOptions(self.opts, *optionlist)
-+        return mqlib.getUserOptions(self.opts, *optionlist)
++        return mqutil.getUserOptions(self.opts, *optionlist)
  
      @pyqtSlot()
      def onConfigChanged(self):
 -                                       self.stwidget, self.patchNameLE,
 -                                       self.messageEditor.text(), self.opts,
 -                                       optionlist)
-+        cmdlines = mqlib.mqNewRefreshCommand(self.repo, self.newCheckBox.isChecked(),
-+                                             self.stwidget, self.patchNameLE,
-+                                             self.messageEditor.text(), self.opts,
-+                                             optionlist)
++        cmdlines = mqutil.mqNewRefreshCommand(self.repo, self.newCheckBox.isChecked(),
++                                              self.stwidget, self.patchNameLE,
++                                              self.messageEditor.text(), self.opts,
++                                              optionlist)
          self.repo.incrementBusyCount()
          self.cmd.run(*cmdlines)
  
              self.patchNameLE.setEnabled(True)
              self.patchNameLE.setFocus()
 -            self.patchNameLE.setText(defaultNewPatchName(self.repo))
-+            self.patchNameLE.setText(mqlib.defaultNewPatchName(self.repo))
++            self.patchNameLE.setText(mqutil.defaultNewPatchName(self.repo))
              self.patchNameLE.selectAll()
              self.setMessage('')
          else:
-diff --git a/tortoisehg/hgqt/mqlib.py b/tortoisehg/hgqt/mqlib.py
+diff --git a/tortoisehg/hgqt/mqutil.py b/tortoisehg/hgqt/mqutil.py
 new file mode 100644
 --- /dev/null
-+++ b/tortoisehg/hgqt/mqlib.py
++++ b/tortoisehg/hgqt/mqutil.py
 @@ -0,0 +1,66 @@
-+# mqlib.py - Core functionality for TortoiseHg MQ widget
++# mqutil.py - Core functionality for TortoiseHg MQ widget
 +#
 +# Copyright 2011 Steve Borho <steve@borho.org>
 +#