Show More
@@ -0,0 +1,40 b'' | |||||
|
1 | http://mercurial.selenic.com/bts/issue2493 | |||
|
2 | ||||
|
3 | Testing tagging with the EOL extension | |||
|
4 | ||||
|
5 | $ cat > $HGRCPATH <<EOF | |||
|
6 | > [diff] | |||
|
7 | > git = True | |||
|
8 | > | |||
|
9 | > [extensions] | |||
|
10 | > eol = | |||
|
11 | > | |||
|
12 | > [eol] | |||
|
13 | > native = CRLF | |||
|
14 | > EOF | |||
|
15 | ||||
|
16 | setup repository | |||
|
17 | ||||
|
18 | $ hg init repo | |||
|
19 | $ cd repo | |||
|
20 | $ cat > .hgeol <<EOF | |||
|
21 | > [patterns] | |||
|
22 | > ** = native | |||
|
23 | > EOF | |||
|
24 | $ printf "first\r\nsecond\r\nthird\r\n" > a.txt | |||
|
25 | $ hg commit --addremove -m 'checkin' | |||
|
26 | adding .hgeol | |||
|
27 | adding a.txt | |||
|
28 | ||||
|
29 | Tag: | |||
|
30 | ||||
|
31 | $ hg tag 1.0 | |||
|
32 | ||||
|
33 | Rewrite .hgtags file as it would look on a new checkout: | |||
|
34 | ||||
|
35 | $ hg update -q null | |||
|
36 | $ hg update -q | |||
|
37 | ||||
|
38 | Touch .hgtags file again: | |||
|
39 | ||||
|
40 | $ hg tag 2.0 |
@@ -61,6 +61,11 b' behavior. There are two settings:' | |||||
61 | Such files are normally not touched under the assumption that they |
|
61 | Such files are normally not touched under the assumption that they | |
62 | have mixed EOLs on purpose. |
|
62 | have mixed EOLs on purpose. | |
63 |
|
63 | |||
|
64 | The ``win32text.forbid*`` hooks provided by the win32text extension | |||
|
65 | have been unified into a single hook named ``eol.hook``. The hook will | |||
|
66 | lookup the expected line endings from the ``.hgeol`` file, which means | |||
|
67 | you must migrate to a ``.hgeol`` file first before using the hook. | |||
|
68 | ||||
64 | See :hg:`help patterns` for more information about the glob patterns |
|
69 | See :hg:`help patterns` for more information about the glob patterns | |
65 | used. |
|
70 | used. | |
66 | """ |
|
71 | """ | |
@@ -176,6 +181,10 b' def reposetup(ui, repo):' | |||||
176 | self._decode['NATIVE'] = 'to-crlf' |
|
181 | self._decode['NATIVE'] = 'to-crlf' | |
177 |
|
182 | |||
178 | eol = config.config() |
|
183 | eol = config.config() | |
|
184 | # Our files should not be touched. The pattern must be | |||
|
185 | # inserted first override a '** = native' pattern. | |||
|
186 | eol.set('patterns', '.hg*', 'BIN') | |||
|
187 | # We can then parse the user's patterns. | |||
179 | eol.parse('.hgeol', data) |
|
188 | eol.parse('.hgeol', data) | |
180 |
|
189 | |||
181 | if eol.get('repository', 'native') == 'CRLF': |
|
190 | if eol.get('repository', 'native') == 'CRLF': |
@@ -1138,7 +1138,7 b' def walkchangerevs(repo, match, opts, pr' | |||||
1138 | continue |
|
1138 | continue | |
1139 | # only yield rev for which we have the changelog, it can |
|
1139 | # only yield rev for which we have the changelog, it can | |
1140 | # happen while doing "hg log" during a pull or commit |
|
1140 | # happen while doing "hg log" during a pull or commit | |
1141 |
if |
|
1141 | if linkrev >= cl_count: | |
1142 | break |
|
1142 | break | |
1143 |
|
1143 | |||
1144 | parentlinkrevs = [] |
|
1144 | parentlinkrevs = [] | |
@@ -1180,11 +1180,20 b' def walkchangerevs(repo, match, opts, pr' | |||||
1180 |
|
1180 | |||
1181 | # iterate from latest to oldest revision |
|
1181 | # iterate from latest to oldest revision | |
1182 | for rev, flparentlinkrevs, copied in filerevgen(filelog, last): |
|
1182 | for rev, flparentlinkrevs, copied in filerevgen(filelog, last): | |
1183 |
if |
|
1183 | if not follow: | |
1184 |
|
|
1184 | if rev > maxrev: | |
1185 | # XXX insert 1327 fix here |
|
1185 | continue | |
1186 |
|
|
1186 | else: | |
1187 | ancestors.update(flparentlinkrevs) |
|
1187 | # Note that last might not be the first interesting | |
|
1188 | # rev to us: | |||
|
1189 | # if the file has been changed after maxrev, we'll | |||
|
1190 | # have linkrev(last) > maxrev, and we still need | |||
|
1191 | # to explore the file graph | |||
|
1192 | if rev not in ancestors: | |||
|
1193 | continue | |||
|
1194 | # XXX insert 1327 fix here | |||
|
1195 | if flparentlinkrevs: | |||
|
1196 | ancestors.update(flparentlinkrevs) | |||
1188 |
|
1197 | |||
1189 | fncache.setdefault(rev, []).append(file_) |
|
1198 | fncache.setdefault(rev, []).append(file_) | |
1190 | wanted.add(rev) |
|
1199 | wanted.add(rev) |
@@ -1020,6 +1020,15 b' log -p -R repo' | |||||
1020 | summary: add foo, related |
|
1020 | summary: add foo, related | |
1021 |
|
1021 | |||
1022 |
|
1022 | |||
|
1023 | Also check when maxrev < lastrevfilelog | |||
|
1024 | ||||
|
1025 | $ hg --traceback log -f -r4 foo | |||
|
1026 | changeset: 4:88176d361b69 | |||
|
1027 | user: test | |||
|
1028 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
1029 | summary: add foo, related | |||
|
1030 | ||||
|
1031 | ||||
1023 | Issue2383: hg log showing _less_ differences than hg diff |
|
1032 | Issue2383: hg log showing _less_ differences than hg diff | |
1024 |
|
1033 | |||
1025 | $ hg init issue2383 |
|
1034 | $ hg init issue2383 | |
@@ -1092,3 +1101,19 b' Diff here should be the same:' | |||||
1092 | +b |
|
1101 | +b | |
1093 |
|
1102 | |||
1094 | $ cd .. |
|
1103 | $ cd .. | |
|
1104 | ||||
|
1105 | 'hg log -r rev fn' when last(filelog(fn)) != rev | |||
|
1106 | ||||
|
1107 | $ hg init simplelog; cd simplelog | |||
|
1108 | $ echo f > a | |||
|
1109 | $ hg ci -Am'a' -d '0 0' | |||
|
1110 | adding a | |||
|
1111 | $ echo f >> a | |||
|
1112 | $ hg ci -Am'a bis' -d '1 0' | |||
|
1113 | ||||
|
1114 | $ hg log -r0 a | |||
|
1115 | changeset: 0:9f758d63dcde | |||
|
1116 | user: test | |||
|
1117 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
1118 | summary: a | |||
|
1119 |
General Comments 0
You need to be logged in to leave comments.
Login now