Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 350:b4e0e20646bb
Merge with TAH
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Merge with TAH
manifest hash: ec82cc2d7b7357fd7db4917e09d7d6865482de58
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCr+f1ywK+sNU5EO8RAuPtAJ0WilDBo3iG4S/dmIabhzYW987TtgCgkjkM
8OmatsrjG01iJAhkKJj+XnQ=
=mOLr
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Wed, 15 Jun 2005 00:33:57 -0800 |
parents | d7df759d0e97 b2293093b89e |
children | dda243bb34b3 |
comparison
equal
deleted
inserted
replaced
346:f69a5d2d4fe1 | 350:b4e0e20646bb |
---|---|
79 filerev = rev | 79 filerev = rev |
80 node = filenode = filelog.node(filerev) | 80 node = filenode = filelog.node(filerev) |
81 changerev = filelog.linkrev(filenode) | 81 changerev = filelog.linkrev(filenode) |
82 changenode = changenode or changelog.node(changerev) | 82 changenode = changenode or changelog.node(changerev) |
83 else: | 83 else: |
84 log = changelog | |
84 changerev = rev | 85 changerev = rev |
85 log = changelog | |
86 if changenode is None: | 86 if changenode is None: |
87 changenode = changelog.node(changerev) | 87 changenode = changelog.node(changerev) |
88 elif not changerev: | 88 elif not changerev: |
89 rev = changerev = changelog.rev(changenode) | 89 rev = changerev = changelog.rev(changenode) |
90 node = changenode | 90 node = changenode |
92 if ui.quiet: | 92 if ui.quiet: |
93 ui.write("%d:%s\n" % (rev, hg.hex(node))) | 93 ui.write("%d:%s\n" % (rev, hg.hex(node))) |
94 return | 94 return |
95 | 95 |
96 changes = changelog.read(changenode) | 96 changes = changelog.read(changenode) |
97 description = changes[4].strip().splitlines() | |
98 | 97 |
99 parents = [(log.rev(parent), hg.hex(parent)) | 98 parents = [(log.rev(parent), hg.hex(parent)) |
100 for parent in log.parents(node) | 99 for parent in log.parents(node) |
101 if ui.debugflag or parent != hg.nullid] | 100 if ui.debugflag or parent != hg.nullid] |
102 if not ui.debugflag and len(parents) == 1 and parents[0][0] == rev-1: | 101 if not ui.debugflag and len(parents) == 1 and parents[0][0] == rev-1: |
115 hg.hex(changes[0]))) | 114 hg.hex(changes[0]))) |
116 ui.status("user: %s\n" % changes[1]) | 115 ui.status("user: %s\n" % changes[1]) |
117 ui.status("date: %s\n" % time.asctime( | 116 ui.status("date: %s\n" % time.asctime( |
118 time.localtime(float(changes[2].split(' ')[0])))) | 117 time.localtime(float(changes[2].split(' ')[0])))) |
119 ui.note("files: %s\n" % " ".join(changes[3])) | 118 ui.note("files: %s\n" % " ".join(changes[3])) |
119 description = changes[4].strip() | |
120 if description: | 120 if description: |
121 if ui.verbose: | 121 if ui.verbose: |
122 ui.status("description:\n") | 122 ui.status("description:\n") |
123 ui.status(changes[4].strip()) | 123 ui.status(description) |
124 ui.status("\n") | 124 ui.status("\n\n") |
125 else: | 125 else: |
126 ui.status("summary: %s\n" % description[0]) | 126 ui.status("summary: %s\n" % description.splitlines()[0]) |
127 ui.status("\n") | 127 ui.status("\n") |
128 | 128 |
129 def help(ui, cmd=None): | 129 def help(ui, cmd=None): |
130 '''show help for a given command or all commands''' | 130 '''show help for a given command or all commands''' |
131 if cmd: | 131 if cmd: |