changeset 1937:3f6be77eda58

fix use of python 2.4 features.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Mon, 13 Mar 2006 08:24:44 -0800
parents b7cc0f323a4c
children 36c6e4c3ff43
files mercurial/commands.py
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Sun Mar 12 16:21:59 2006 -0800
+++ b/mercurial/commands.py	Mon Mar 13 08:24:44 2006 -0800
@@ -413,8 +413,12 @@
             def one(v, tag=name):
                 try:
                     vargs.update(v)
-                except ValueError:
-                    vargs.update([(name, v)])
+                except (AttributeError, ValueError):
+                    try:
+                        for a, b in v:
+                            vargs[a] = b
+                    except ValueError:
+                        vargs[name] = v
                 return self.t(tag, **vargs)
             lastname = 'last_' + name
             if lastname in self.t:
@@ -441,8 +445,8 @@
         if self.ui.debugflag:
             def showmanifest(**args):
                 args = args.copy()
-                args.update(rev=self.repo.manifest.rev(changes[0]),
-                            node=hex(changes[0]))
+                args.update(dict(rev=self.repo.manifest.rev(changes[0]),
+                                 node=hex(changes[0])))
                 yield self.t('manifest', **args)
         else:
             showmanifest = ''