Mercurial > hg
comparison mercurial/commands.py @ 1129:ee4f60abad93
Move generating short username to display in hg/hgweb annotate to ui module.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sun, 28 Aug 2005 17:29:28 +0200 |
parents | 624a3a4fa232 |
children | 899b619a7eb2 |
comparison
equal
deleted
inserted
replaced
1128:8bf19f96b97a | 1129:ee4f60abad93 |
---|---|
470 def getname(rev): | 470 def getname(rev): |
471 try: | 471 try: |
472 return bcache[rev] | 472 return bcache[rev] |
473 except KeyError: | 473 except KeyError: |
474 cl = repo.changelog.read(repo.changelog.node(rev)) | 474 cl = repo.changelog.read(repo.changelog.node(rev)) |
475 name = cl[1] | 475 bcache[rev] = name = ui.shortuser(cl[1]) |
476 f = name.find('@') | |
477 if f >= 0: | |
478 name = name[:f] | |
479 f = name.find('<') | |
480 if f >= 0: | |
481 name = name[f+1:] | |
482 bcache[rev] = name | |
483 return name | 476 return name |
484 | 477 |
485 if not pats: | 478 if not pats: |
486 raise util.Abort('at least one file name or pattern required') | 479 raise util.Abort('at least one file name or pattern required') |
487 | 480 |