[PATCH 1 of 2] mq/qqueue: split _setactive

Yann E. MORIN yann.morin.1998 at anciens.enib.fr
Sun Aug 15 11:04:08 CDT 2010


# HG changeset patch
# User "Yann E. MORIN" <yann.morin.1998 at anciens.enib.fr>
# Date 1281883688 -7200
# Node ID 2590b0f66bc63fbc7835a9e6b6f55f163d5795fc
# Parent  7fa36341e7a01a637f397673a11d09241cda8c7a
mq/qqueue: split _setactive

Prepare _setactive to be called without checking for applied patches.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at anciens.enib.fr>

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -2662,7 +2662,9 @@
     def _setactive(name):
         if q.applied:
             raise util.Abort(_('patches applied - cannot set new queue active'))
-
+        _setactivenocheck(name)
+
+    def _setactivenocheck(name):
         fh = repo.opener(_activequeue, 'w')
         if name != 'patches':
             fh.write(name)


More information about the Mercurial-devel mailing list