changeset 10558:6505773080e4 stable

mq: simplify --mq handling / keep compatibility with other extensions reported by edgimar on IRC
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 28 Feb 2010 19:43:21 +0100
parents 9bd0bd785696
children b1339234080e
files hgext/mq.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Sun Feb 28 18:02:20 2010 +0100
+++ b/hgext/mq.py	Sun Feb 28 19:43:21 2010 +0100
@@ -2629,8 +2629,7 @@
     return orig(ui, repo, *args, **kwargs)
 
 def mqinit(orig, ui, *args, **kwargs):
-    mq = kwargs['mq']
-    del kwargs['mq']
+    mq = kwargs.pop('mq', None)
 
     if not mq:
         return orig(ui, *args, **kwargs)
@@ -2643,8 +2642,7 @@
     """Add --mq option to operate on patch repository instead of main"""
 
     # some commands do not like getting unknown options
-    mq = kwargs['mq']
-    del kwargs['mq']
+    mq = kwargs.pop('mq', None)
 
     if not mq:
         return orig(ui, repo, *args, **kwargs)