Show More
@@ -1101,21 +1101,24 b' class changeset_printer(object):' | |||
|
1101 | 1101 | '''show a single changeset or file revision''' |
|
1102 | 1102 | changenode = ctx.node() |
|
1103 | 1103 | rev = ctx.rev() |
|
1104 | ||
|
1105 | if self.ui.quiet: | |
|
1106 | self.ui.write("%d:%s\n" % (rev, short(changenode)), | |
|
1107 | label='log.node') | |
|
1108 | return | |
|
1109 | ||
|
1110 | date = util.datestr(ctx.date()) | |
|
1111 | ||
|
1112 | 1104 | if self.ui.debugflag: |
|
1113 | 1105 | hexfunc = hex |
|
1114 | 1106 | else: |
|
1115 | 1107 | hexfunc = short |
|
1108 | if rev is None: | |
|
1109 | pctx = ctx.p1() | |
|
1110 | revnode = (pctx.rev(), hexfunc(pctx.node()) + '+') | |
|
1111 | else: | |
|
1112 | revnode = (rev, hexfunc(changenode)) | |
|
1113 | ||
|
1114 | if self.ui.quiet: | |
|
1115 | self.ui.write("%d:%s\n" % revnode, label='log.node') | |
|
1116 | return | |
|
1117 | ||
|
1118 | date = util.datestr(ctx.date()) | |
|
1116 | 1119 | |
|
1117 | 1120 | # i18n: column positioning for "hg log" |
|
1118 |
self.ui.write(_("changeset: %d:%s\n") % |
|
|
1121 | self.ui.write(_("changeset: %d:%s\n") % revnode, | |
|
1119 | 1122 | label='log.changeset changeset.%s' % ctx.phasestr()) |
|
1120 | 1123 | |
|
1121 | 1124 | # branches are shown first before any other names due to backwards |
@@ -1623,6 +1623,16 b' issue3772: hg log -r :null showing revis' | |||
|
1623 | 1623 | user: |
|
1624 | 1624 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1625 | 1625 | |
|
1626 | working-directory revision requires special treatment | |
|
1627 | ||
|
1628 | $ hg log -r 'wdir()' | |
|
1629 | changeset: 0:65624cd9070a+ | |
|
1630 | user: test | |
|
1631 | date: [A-Za-z0-9:+ ]+ (re) | |
|
1632 | ||
|
1633 | $ hg log -r 'wdir()' -q | |
|
1634 | 0:65624cd9070a+ | |
|
1635 | ||
|
1626 | 1636 | Check that adding an arbitrary name shows up in log automatically |
|
1627 | 1637 | |
|
1628 | 1638 | $ cat > ../names.py <<EOF |
General Comments 0
You need to be logged in to leave comments.
Login now