Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 484:934279f3ca53
Pull from TAH
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Pull from TAH
manifest hash: 470ea90dd95189a019f4d96016a45db8a297b841
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCvzZzywK+sNU5EO8RAkZhAKCUJKX1vFtkFxV7qFwbuWQj62zcnQCfU687
jxKpBVesIXSOpBO4NbW/RIM=
=hSBe
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Sun, 26 Jun 2005 15:12:51 -0800 |
parents | 0ab093b473c5 84d5ddf82856 |
children | c5705ab9cebd |
line wrap: on
line diff
--- a/mercurial/commands.py Sun Jun 26 15:09:37 2005 -0800 +++ b/mercurial/commands.py Sun Jun 26 15:12:51 2005 -0800 @@ -172,13 +172,10 @@ ui.write('hg commands:\n\n') h = {} - for c,e in table.items(): - f = c - aliases = None - if "|" in f: - l = f.split("|") - f, aliases = l[0], l[1:] - if f.startswith("debug"): continue + for c, e in table.items(): + f = c.split("|")[0] + if f.startswith("debug"): + continue d = "" if e[0].__doc__: d = e[0].__doc__.splitlines(0)[0].rstrip() @@ -242,8 +239,6 @@ node = repo.changelog.lookup(ops['revision']) change = repo.changelog.read(node) mmap = repo.manifest.read(change[0]) - maxuserlen = 0 - maxchangelen = 0 for f in relpath(repo, (file,) + files): lines = repo.file(f).annotate(mmap[f]) pieces = [] @@ -343,7 +338,7 @@ revs = map(lambda x: repo.lookup(x), opts['rev']) if len(revs) > 2: - self.ui.warn("too many revisions to diff\n") + ui.warn("too many revisions to diff\n") sys.exit(1) if files: @@ -434,8 +429,7 @@ files = [] for l in f.read().splitlines(): l.rstrip('\r\n'); - if not quiet: - print l + ui.status("%s\n" % l) if l[:14] == 'patching file ': pf = l[14:] if pf not in files: @@ -662,15 +656,15 @@ def tags(ui, repo): """list repository tags""" - + l = repo.tagslist() l.reverse() - for t,n in l: + for t, n in l: try: - r = repo.changelog.rev(n) + r = "%5d:%s" % (repo.changelog.rev(n), hg.hex(n)) except KeyError: - r = "?" - print "%-30s %5d:%s" % (t, repo.changelog.rev(n), hg.hex(n)) + r = " ?:?" + ui.write("%-30s %s\n" % (t, r)) def tip(ui, repo): """show the tip revision""" @@ -782,7 +776,6 @@ norepo = "init version help debugindex debugindexdot" def find(cmd): - i = None for e in table.keys(): if re.match("(%s)$" % e, cmd): return table[e]