Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 3648:2801a3efc7c3
changeset templater: convert some unnecessary yields to returns
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 15 Nov 2006 15:51:58 -0600 |
parents | b984dcb1df71 |
children | e50891e461e4 |
comparison
equal
deleted
inserted
replaced
3647:734e337cb816 | 3648:2801a3efc7c3 |
---|---|
424 yield self.t(endname, **args) | 424 yield self.t(endname, **args) |
425 | 425 |
426 def showbranches(**args): | 426 def showbranches(**args): |
427 branch = changes[5].get("branch") | 427 branch = changes[5].get("branch") |
428 if branch: | 428 if branch: |
429 yield showlist('branch', [branch], plural='branches', **args) | 429 return showlist('branch', [branch], plural='branches', **args) |
430 # add old style branches if requested | 430 # add old style branches if requested |
431 if brinfo and changenode in brinfo: | 431 if brinfo and changenode in brinfo: |
432 yield showlist('branch', brinfo[changenode], | 432 return showlist('branch', brinfo[changenode], |
433 plural='branches', **args) | 433 plural='branches', **args) |
434 | 434 |
435 def showparents(**args): | 435 def showparents(**args): |
436 parents = [[('rev', log.rev(p)), ('node', hex(p))] | 436 parents = [[('rev', log.rev(p)), ('node', hex(p))] |
437 for p in log.parents(changenode) | 437 for p in log.parents(changenode) |
438 if self.ui.debugflag or p != nullid] | 438 if self.ui.debugflag or p != nullid] |
469 args.update(dict(rev=self.repo.manifest.rev(changes[0]), | 469 args.update(dict(rev=self.repo.manifest.rev(changes[0]), |
470 node=hex(changes[0]))) | 470 node=hex(changes[0]))) |
471 return self.t('manifest', **args) | 471 return self.t('manifest', **args) |
472 else: | 472 else: |
473 def showfiles(**args): | 473 def showfiles(**args): |
474 yield showlist('file', changes[3], **args) | 474 return showlist('file', changes[3], **args) |
475 showadds = '' | 475 showadds = '' |
476 showdels = '' | 476 showdels = '' |
477 showmanifest = '' | 477 showmanifest = '' |
478 | 478 |
479 defprops = { | 479 defprops = { |