comparison mercurial/commands.py @ 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 ebe273a16048
comparison
equal deleted inserted replaced
1920:b7cc0f323a4c 1937:3f6be77eda58
411 yield self.t(startname, **args) 411 yield self.t(startname, **args)
412 vargs = args.copy() 412 vargs = args.copy()
413 def one(v, tag=name): 413 def one(v, tag=name):
414 try: 414 try:
415 vargs.update(v) 415 vargs.update(v)
416 except ValueError: 416 except (AttributeError, ValueError):
417 vargs.update([(name, v)]) 417 try:
418 for a, b in v:
419 vargs[a] = b
420 except ValueError:
421 vargs[name] = v
418 return self.t(tag, **vargs) 422 return self.t(tag, **vargs)
419 lastname = 'last_' + name 423 lastname = 'last_' + name
420 if lastname in self.t: 424 if lastname in self.t:
421 last = values.pop() 425 last = values.pop()
422 else: 426 else:
439 showbranches = '' 443 showbranches = ''
440 444
441 if self.ui.debugflag: 445 if self.ui.debugflag:
442 def showmanifest(**args): 446 def showmanifest(**args):
443 args = args.copy() 447 args = args.copy()
444 args.update(rev=self.repo.manifest.rev(changes[0]), 448 args.update(dict(rev=self.repo.manifest.rev(changes[0]),
445 node=hex(changes[0])) 449 node=hex(changes[0])))
446 yield self.t('manifest', **args) 450 yield self.t('manifest', **args)
447 else: 451 else:
448 showmanifest = '' 452 showmanifest = ''
449 453
450 def showparents(**args): 454 def showparents(**args):