Show More
@@ -5,7 +5,7 b'' | |||
|
5 | 5 | # This software may be used and distributed according to the terms of the |
|
6 | 6 | # GNU General Public License version 2 or any later version. |
|
7 | 7 | |
|
8 | from node import hex, nullid, nullrev, short | |
|
8 | from node import hex, bin, nullid, nullrev, short | |
|
9 | 9 | from i18n import _ |
|
10 | 10 | import os, sys, errno, re, tempfile, cStringIO, shutil |
|
11 | 11 | import util, scmutil, templater, patch, error, templatekw, revlog, copies |
@@ -1152,11 +1152,9 b' class changeset_printer(object):' | |||
|
1152 | 1152 | hexfunc = hex |
|
1153 | 1153 | else: |
|
1154 | 1154 | hexfunc = short |
|
1155 | if rev is None: | |
|
1156 | pctx = ctx.p1() | |
|
1157 |
|
|
|
1158 | else: | |
|
1159 | revnode = (rev, hexfunc(changenode)) | |
|
1155 | # as of now, wctx.node() and wctx.rev() return None, but we want to | |
|
1156 | # show the same values as {node} and {rev} templatekw | |
|
1157 | revnode = (scmutil.intrev(rev), hexfunc(bin(ctx.hex()))) | |
|
1160 | 1158 | |
|
1161 | 1159 | if self.ui.quiet: |
|
1162 | 1160 | self.ui.write("%d:%s\n" % revnode, label='log.node') |
@@ -109,7 +109,7 b' should fail' | |||
|
109 | 109 | wdir doesn't cause a crash, and can be dynamically selected if dirty |
|
110 | 110 | |
|
111 | 111 | $ hg log -r "heads(. or wdir() & file('**'))" |
|
112 | changeset: 2:*+ (glob) | |
|
112 | changeset: 2147483647:ffffffffffff | |
|
113 | 113 | parent: 2:* (glob) |
|
114 | 114 | parent: 1:* (glob) |
|
115 | 115 | user: test |
@@ -180,6 +180,26 b' as default style, except for extra phase' | |||
|
180 | 180 | $ hg log --debug -T phases > phases.out |
|
181 | 181 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
182 | 182 | |
|
183 | Default style of working-directory revision should also be the same (but | |
|
184 | date may change while running tests): | |
|
185 | ||
|
186 | $ hg log -r 'wdir()' | sed 's|^date:.*|date:|' > log.out | |
|
187 | $ hg log -r 'wdir()' --style default | sed 's|^date:.*|date:|' > style.out | |
|
188 | $ cmp log.out style.out || diff -u log.out style.out | |
|
189 | ||
|
190 | $ hg log -r 'wdir()' -v | sed 's|^date:.*|date:|' > log.out | |
|
191 | $ hg log -r 'wdir()' -v --style default | sed 's|^date:.*|date:|' > style.out | |
|
192 | $ cmp log.out style.out || diff -u log.out style.out | |
|
193 | ||
|
194 | $ hg log -r 'wdir()' -q > log.out | |
|
195 | $ hg log -r 'wdir()' -q --style default > style.out | |
|
196 | $ cmp log.out style.out || diff -u log.out style.out | |
|
197 | ||
|
198 | $ hg log -r 'wdir()' --debug | sed 's|^date:.*|date:|' > log.out | |
|
199 | $ hg log -r 'wdir()' --debug --style default \ | |
|
200 | > | sed 's|^date:.*|date:|' > style.out | |
|
201 | $ cmp log.out style.out || diff -u log.out style.out | |
|
202 | ||
|
183 | 203 | Default style should also preserve color information (issue2866): |
|
184 | 204 | |
|
185 | 205 | $ cp $HGRCPATH $HGRCPATH-bak |
@@ -1626,16 +1626,16 b' issue3772: hg log -r :null showing revis' | |||
|
1626 | 1626 | working-directory revision requires special treatment |
|
1627 | 1627 | |
|
1628 | 1628 | $ hg log -r 'wdir()' |
|
1629 | changeset: 0:65624cd9070a+ | |
|
1629 | changeset: 2147483647:ffffffffffff | |
|
1630 | 1630 | parent: 0:65624cd9070a |
|
1631 | 1631 | user: test |
|
1632 | 1632 | date: [A-Za-z0-9:+ ]+ (re) |
|
1633 | 1633 | |
|
1634 | 1634 | $ hg log -r 'wdir()' -q |
|
1635 | 0:65624cd9070a+ | |
|
1635 | 2147483647:ffffffffffff | |
|
1636 | 1636 | |
|
1637 | 1637 | $ hg log -r 'wdir()' --debug |
|
1638 | changeset: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08+ | |
|
1638 | changeset: 2147483647:ffffffffffffffffffffffffffffffffffffffff | |
|
1639 | 1639 | phase: draft |
|
1640 | 1640 | parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08 |
|
1641 | 1641 | parent: -1:0000000000000000000000000000000000000000 |
General Comments 0
You need to be logged in to leave comments.
Login now