Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 3414:52617d992eed
Report branch for hg log and friends
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 17 Oct 2006 18:30:18 -0500 |
parents | 55476ce8e59c |
children | 9a6491770b04 |
comparison
equal
deleted
inserted
replaced
3413:cc9c31b07c2c | 3414:52617d992eed |
---|---|
324 self.ui.write("%d:%s\n" % (rev, short(changenode))) | 324 self.ui.write("%d:%s\n" % (rev, short(changenode))) |
325 return | 325 return |
326 | 326 |
327 changes = log.read(changenode) | 327 changes = log.read(changenode) |
328 date = util.datestr(changes[2]) | 328 date = util.datestr(changes[2]) |
329 branch = changes[5].get("branch") | |
329 | 330 |
330 hexfunc = self.ui.debugflag and hex or short | 331 hexfunc = self.ui.debugflag and hex or short |
331 | 332 |
332 parents = [(log.rev(p), hexfunc(p)) for p in log.parents(changenode) | 333 parents = [(log.rev(p), hexfunc(p)) for p in log.parents(changenode) |
333 if self.ui.debugflag or p != nullid] | 334 if self.ui.debugflag or p != nullid] |
335 parents[0][0] == rev-1): | 336 parents[0][0] == rev-1): |
336 parents = [] | 337 parents = [] |
337 | 338 |
338 self.ui.write(_("changeset: %d:%s\n") % (rev, hexfunc(changenode))) | 339 self.ui.write(_("changeset: %d:%s\n") % (rev, hexfunc(changenode))) |
339 | 340 |
341 if branch: | |
342 self.ui.status(_("branch: %s\n") % branch) | |
340 for tag in self.repo.nodetags(changenode): | 343 for tag in self.repo.nodetags(changenode): |
341 self.ui.status(_("tag: %s\n") % tag) | 344 self.ui.status(_("tag: %s\n") % tag) |
342 for parent in parents: | 345 for parent in parents: |
343 self.ui.write(_("parent: %d:%s\n") % parent) | 346 self.ui.write(_("parent: %d:%s\n") % parent) |
344 | 347 |