Show More
@@ -207,3 +207,4 b' 18c17d63fdabd009e70bf994e5efb7db422f4f7f' | |||
|
207 | 207 | 1d5189a57405ceca5aa244052c9f948977f4699b 0 iQJEBAABCAAuFiEEK8zhT1xnJaouqK63ucncgkqlvdUFAl/JMCcQHHJhZkBkdXJpbjQyLmNvbQAKCRC5ydyCSqW91d8VEADPmycxSrG/9WClJrXrZXVugf2Bp6SiKWarCWmZQ32sh/Xkl6Km8I6uVQL0k82lQO71jOin6APY2HJeOC57mBeX9HOPcN/l+I8g4HecdI6UO8+tQzPqzno92Nm+tj0XxSelmMZ1KwDYpiHBo8F9VMILTZSdFdC5zBBMQOHhJDAtIUJx5W8n2/mcDvFEpv5OHqS2kYzHHqn9/V+J6iOweP2ftd3N84EZZHb7e8hYbLHS1aNJRe7SsruCYJujHr8Ym5izl5YTpwvVCvudbK/OnrFd0MqT3oRS8WRPwwYcYJkj5AtDLA0VLbx47KeR0vLCC7hTkFoOtFtxc7WIJOZVb/DPi38UsSJLG2tFuSvnW8b1YBCUD5o39F/4FxUuug/JxEG3nvP0Hf6PbPiAn/ZPJqNOyyY51YfjAaAGZeP+UNM4OgOdsSq1gAcCQEMclb54YuRe/J/fuBkQVKbaPuVYPCypqdc/KppS9hZzD3R3OEiztNXqn8u2tl33qsvdEJBlZq9NCD/wJMIzKC/6I5YNkYtgdfAH+xhqHgPvohGyc5q7jS8UvfIl6Wro8e+nWEXkOv2yQSU8nq/5hcyQj5SctznUxArpAt7CbNmGze42t29EdrP4P5w2K6t1lELUw1SVjzt/j9Xc5k/sDj4MxqP8KNRgoDSPRtv7+1/ECC4SfwVj5w== |
|
208 | 208 | 9da65e3cf3706ff41e08b311381c588440c27baf 0 iQJJBAABCgAzFiEEgY2HzRrBgMOUyG5jOjPeRg2ew58FAmAHEb4VHDc4OTVwdWxraXRAZ21haWwuY29tAAoJEDoz3kYNnsOfMJ0P/0A0L7tLfx03TWyz7VLPs9t3ojqGjFCaZAGPyS0Wtkpw0fhllYzf4WjFyGG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uLpr6KjCgzBkTK5KfmTqu7I+eM29g+2JvmCao+kk8MVyVmV9H2f5xRvuhrEBmDNlLb7uOhJW3a7EvZG6g9EfW9 |
@@ -220,3 +220,4 b' 18c17d63fdabd009e70bf994e5efb7db422f4f7f' | |||
|
220 | 220 | 1d5189a57405ceca5aa244052c9f948977f4699b 5.6.1 |
|
221 | 221 | 9da65e3cf3706ff41e08b311381c588440c27baf 5.7rc0 |
|
222 | 222 | 0e2e7300f4302b02412b0b734717697049494c4c 5.7 |
|
223 | d5d9177c0045d206db575bae6daa98e2cb2fe5bc 5.7.1 |
@@ -280,14 +280,12 b' class narrowfilelog(filelog):' | |||
|
280 | 280 | return super(narrowfilelog, self).size(rev) |
|
281 | 281 | |
|
282 | 282 | def cmp(self, node, text): |
|
283 | different = super(narrowfilelog, self).cmp(node, text) | |
|
283 | # We don't call `super` because narrow parents can be buggy in case of a | |
|
284 | # ambiguous dirstate. Always take the slow path until there is a better | |
|
285 | # fix, see issue6150. | |
|
284 | 286 | |
|
285 | # Because renamed() may lie, we may get false positives for | |
|
286 | # different content. Check for this by comparing against the original | |
|
287 | # renamed() implementation. | |
|
288 | if different: | |
|
289 | if super(narrowfilelog, self).renamed(node): | |
|
290 | t2 = self.read(node) | |
|
291 | return t2 != text | |
|
287 | # Censored files compare against the empty file. | |
|
288 | if self.iscensored(self.rev(node)): | |
|
289 | return text != b'' | |
|
292 | 290 | |
|
293 |
return |
|
|
291 | return self.read(node) != text |
@@ -1032,7 +1032,7 b' Example ``.hg/hgrc``::' | |||
|
1032 | 1032 | incoming.autobuild:run-with-plain = yes |
|
1033 | 1033 | # HGPLAIN never set |
|
1034 | 1034 | incoming.autobuild:run-with-plain = no |
|
1035 |
# HGPLAIN inherited from environment (default before Mercuri |
|
|
1035 | # HGPLAIN inherited from environment (default before Mercurial 5.7) | |
|
1036 | 1036 | incoming.autobuild:run-with-plain = auto |
|
1037 | 1037 | |
|
1038 | 1038 | Most hooks are run with environment variables set that give useful |
@@ -543,7 +543,7 b' def makelocalrepository(baseui, path, in' | |||
|
543 | 543 | except ValueError as e: |
|
544 | 544 | # Can be raised on Python 3.8 when path is invalid. |
|
545 | 545 | raise error.Abort( |
|
546 |
_(b'invalid path %s: %s') % (path, |
|
|
546 | _(b'invalid path %s: %s') % (path, stringutil.forcebytestr(e)) | |
|
547 | 547 | ) |
|
548 | 548 | |
|
549 | 549 | raise error.RepoError(_(b'repository %s not found') % path) |
@@ -571,7 +571,7 b' def makelocalrepository(baseui, path, in' | |||
|
571 | 571 | # repository was shared the old way. We check the share source .hg/requires |
|
572 | 572 | # for SHARESAFE_REQUIREMENT to detect whether the current repository needs |
|
573 | 573 | # to be reshared |
|
574 | hint = _("see `hg help config.format.use-share-safe` for more information") | |
|
574 | hint = _(b"see `hg help config.format.use-share-safe` for more information") | |
|
575 | 575 | if requirementsmod.SHARESAFE_REQUIREMENT in requirements: |
|
576 | 576 | |
|
577 | 577 | if ( |
@@ -1137,7 +1137,7 b' class revlogfilestorage(object):' | |||
|
1137 | 1137 | """File storage when using revlogs.""" |
|
1138 | 1138 | |
|
1139 | 1139 | def file(self, path): |
|
1140 |
if path |
|
|
1140 | if path.startswith(b'/'): | |
|
1141 | 1141 | path = path[1:] |
|
1142 | 1142 | |
|
1143 | 1143 | return filelog.filelog(self.svfs, path) |
@@ -1148,7 +1148,7 b' class revlognarrowfilestorage(object):' | |||
|
1148 | 1148 | """File storage when using revlogs and narrow files.""" |
|
1149 | 1149 | |
|
1150 | 1150 | def file(self, path): |
|
1151 |
if path |
|
|
1151 | if path.startswith(b'/'): | |
|
1152 | 1152 | path = path[1:] |
|
1153 | 1153 | |
|
1154 | 1154 | return filelog.narrowfilelog(self.svfs, path, self._storenarrowmatch) |
@@ -876,7 +876,7 b' def _makematcher(repo, revs, wopts):' | |||
|
876 | 876 | # slowpath; otherwise, we can turn off the slowpath |
|
877 | 877 | if slowpath: |
|
878 | 878 | for path in match.files(): |
|
879 |
if path |
|
|
879 | if not path or path in repo.store: | |
|
880 | 880 | break |
|
881 | 881 | else: |
|
882 | 882 | slowpath = False |
@@ -20,6 +20,7 b' import zlib' | |||
|
20 | 20 | from .i18n import _ |
|
21 | 21 | from .node import ( |
|
22 | 22 | hex, |
|
23 | nullhex, | |
|
23 | 24 | short, |
|
24 | 25 | ) |
|
25 | 26 | from .pycompat import open |
@@ -3099,12 +3100,12 b' def diffcontent(data1, data2, header, bi' | |||
|
3099 | 3100 | |
|
3100 | 3101 | ctx1, fctx1, path1, flag1, content1, date1 = data1 |
|
3101 | 3102 | ctx2, fctx2, path2, flag2, content2, date2 = data2 |
|
3103 | index1 = _gitindex(content1) if path1 in ctx1 else nullhex | |
|
3104 | index2 = _gitindex(content2) if path2 in ctx2 else nullhex | |
|
3102 | 3105 | if binary and opts.git and not opts.nobinary: |
|
3103 | 3106 | text = mdiff.b85diff(content1, content2) |
|
3104 | 3107 | if text: |
|
3105 | header.append( | |
|
3106 | b'index %s..%s' % (_gitindex(content1), _gitindex(content2)) | |
|
3107 | ) | |
|
3108 | header.append(b'index %s..%s' % (index1, index2)) | |
|
3108 | 3109 | hunks = ((None, [text]),) |
|
3109 | 3110 | else: |
|
3110 | 3111 | if opts.git and opts.index > 0: |
@@ -3114,8 +3115,8 b' def diffcontent(data1, data2, header, bi' | |||
|
3114 | 3115 | header.append( |
|
3115 | 3116 | b'index %s..%s %s' |
|
3116 | 3117 | % ( |
|
3117 |
|
|
|
3118 |
|
|
|
3118 | index1[0 : opts.index], | |
|
3119 | index2[0 : opts.index], | |
|
3119 | 3120 | _gitmode[flag], |
|
3120 | 3121 | ) |
|
3121 | 3122 | ) |
@@ -510,7 +510,7 b" def mkstemp(suffix=b'', prefix=b'tmp', d" | |||
|
510 | 510 | # This wrapper file are always open in byte mode. |
|
511 | 511 | def unnamedtempfile(mode=None, *args, **kwargs): |
|
512 | 512 | if mode is None: |
|
513 |
mode = |
|
|
513 | mode = 'w+b' | |
|
514 | 514 | else: |
|
515 | 515 | mode = sysstr(mode) |
|
516 | 516 | assert 'b' in mode |
@@ -2185,7 +2185,7 b' class _re(object):' | |||
|
2185 | 2185 | global _re2 |
|
2186 | 2186 | try: |
|
2187 | 2187 | # check if match works, see issue3964 |
|
2188 | _re2 = bool(re2.match(r'\[([^\[]+)\]', b'[ui]')) | |
|
2188 | _re2 = bool(re2.match(br'\[([^\[]+)\]', b'[ui]')) | |
|
2189 | 2189 | except ImportError: |
|
2190 | 2190 | _re2 = False |
|
2191 | 2191 |
@@ -456,3 +456,26 b' be broken up' | |||
|
456 | 456 | . |
|
457 | 457 | |
|
458 | 458 | $ cd .. |
|
459 | ||
|
460 | Make sure `hg diff --git` differentiate "file did not exists" and "file is empty" | |
|
461 | for git blob oids | |
|
462 | ||
|
463 | $ hg init bloboids | |
|
464 | $ cd bloboids | |
|
465 | ||
|
466 | $ touch a | |
|
467 | $ hg ci -Am "empty a" | |
|
468 | adding a | |
|
469 | $ hg diff -c 0 --git --config experimental.extendedheader.index=full | grep index | |
|
470 | index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 | |
|
471 | ||
|
472 | Make sure `hg diff --git` differentiate "file was empty" and "file is removed" | |
|
473 | for git blob oids | |
|
474 | ||
|
475 | $ rm a | |
|
476 | $ hg ci -Am "removed a" | |
|
477 | removing a | |
|
478 | $ hg diff -c 1 --git --config experimental.extendedheader.index=full | grep index | |
|
479 | index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 100644 | |
|
480 | ||
|
481 | $ cd .. |
@@ -185,7 +185,7 b' git=auto: regular diff for regular files' | |||
|
185 | 185 | % git=auto: git diff for newbinary |
|
186 | 186 | diff --git a/newbinary b/newbinary |
|
187 | 187 | new file mode 100644 |
|
188 | index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f76dd238ade08917e6712764a16a22005a50573d | |
|
188 | index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d | |
|
189 | 189 | GIT binary patch |
|
190 | 190 | literal 1 |
|
191 | 191 | Ic${MZ000310RR91 |
@@ -202,7 +202,7 b' git=auto: regular diff for regular files' | |||
|
202 | 202 | % git=auto: git diff for rmbinary |
|
203 | 203 | diff --git a/rmbinary b/rmbinary |
|
204 | 204 | deleted file mode 100644 |
|
205 | index f76dd238ade08917e6712764a16a22005a50573d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 | |
|
205 | index f76dd238ade08917e6712764a16a22005a50573d..0000000000000000000000000000000000000000 | |
|
206 | 206 | GIT binary patch |
|
207 | 207 | literal 0 |
|
208 | 208 | Hc$@<O00001 |
@@ -111,7 +111,7 b' Filename without "a/" or "b/" (issue5759' | |||
|
111 | 111 | |
|
112 | 112 | diff --git c c |
|
113 | 113 | new file mode 100644 |
|
114 | index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f76dd238ade08917e6712764a16a22005a50573d | |
|
114 | index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d | |
|
115 | 115 | GIT binary patch |
|
116 | 116 | literal 1 |
|
117 | 117 | Ic${MZ000310RR91 |
@@ -346,7 +346,7 b' Binary diff:' | |||
|
346 | 346 | $ cat b.diff |
|
347 | 347 | diff --git a/binfile.bin b/binfile.bin |
|
348 | 348 | new file mode 100644 |
|
349 | index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..37ba3d1c6f17137d9c5f5776fa040caf5fe73ff9 | |
|
349 | index 0000000000000000000000000000000000000000..37ba3d1c6f17137d9c5f5776fa040caf5fe73ff9 | |
|
350 | 350 | GIT binary patch |
|
351 | 351 | literal 593 |
|
352 | 352 | zc$@)I0<QguP)<h;3K|Lk000e1NJLTq000mG000mO0ssI2kdbIM00009a7bBm000XU |
@@ -1114,7 +1114,7 b' Binary files work but without diff hunks' | |||
|
1114 | 1114 | |
|
1115 | 1115 | diff --git a/dir/binary b/dir/binary |
|
1116 | 1116 | new file mode 100644 |
|
1117 | index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c2e1fbed209fe919b3f189a6a31950e9adf61e45 | |
|
1117 | index 0000000000000000000000000000000000000000..c2e1fbed209fe919b3f189a6a31950e9adf61e45 | |
|
1118 | 1118 | GIT binary patch |
|
1119 | 1119 | literal 17 |
|
1120 | 1120 | Wc$_QA$SmdpqC~Ew%)G>+N(KNlNClYy |
@@ -102,6 +102,41 b' log on directory' | |||
|
102 | 102 | summary: c |
|
103 | 103 | |
|
104 | 104 | |
|
105 | log empty path (or repo root) of slow path shouldn't crash (issue6478) | |
|
106 | ||
|
107 | $ hg log -ql1 '' inexistent | |
|
108 | 4:7e4639b4691b | |
|
109 | $ hg log -ql1 . inexistent | |
|
110 | 4:7e4639b4691b | |
|
111 | $ hg log -ql1 "`pwd`" inexistent | |
|
112 | 4:7e4639b4691b | |
|
113 | ||
|
114 | $ hg log -ql1 '' e | |
|
115 | 4:7e4639b4691b | |
|
116 | $ hg log -ql1 . e | |
|
117 | 4:7e4639b4691b | |
|
118 | $ hg log -ql1 "`pwd`" e | |
|
119 | 4:7e4639b4691b | |
|
120 | ||
|
121 | log -f empty path (or repo root) shouldn't crash | |
|
122 | ||
|
123 | $ hg log -qfl1 '' inexistent | |
|
124 | abort: cannot follow file not in parent revision: "inexistent" | |
|
125 | [255] | |
|
126 | $ hg log -qfl1 . inexistent | |
|
127 | abort: cannot follow file not in parent revision: "inexistent" | |
|
128 | [255] | |
|
129 | $ hg log -qfl1 "`pwd`" inexistent | |
|
130 | abort: cannot follow file not in parent revision: "inexistent" | |
|
131 | [255] | |
|
132 | ||
|
133 | $ hg log -qfl1 '' e | |
|
134 | 4:7e4639b4691b | |
|
135 | $ hg log -qfl1 . e | |
|
136 | 4:7e4639b4691b | |
|
137 | $ hg log -qfl1 "`pwd`" e | |
|
138 | 4:7e4639b4691b | |
|
139 | ||
|
105 | 140 | -X, with explicit path |
|
106 | 141 | |
|
107 | 142 | $ hg log a -X a |
@@ -92,28 +92,8 b' directory but the shallow pull should on' | |||
|
92 | 92 | 1: Commit rev2 of f8, d1/f8, d2/f8 |
|
93 | 93 | 0...: Commit rev2 of f7, d1/f7, d2/f7 |
|
94 | 94 | |
|
95 | XXX flaky output (see issue6150) | |
|
96 | XXX | |
|
97 | XXX The filectx implementation is buggy and return wrong data during status. | |
|
98 | XXX Leading to more file being "merged". The right output is the one with just | |
|
99 | XXX 10 files updated. | |
|
100 | ||
|
101 | 95 | $ hg update 4 |
|
102 | merging d2/f1 (?) | |
|
103 | merging d2/f2 (?) | |
|
104 | merging d2/f3 (?) | |
|
105 | merging d2/f4 (?) | |
|
106 | merging d2/f5 (?) | |
|
107 | merging d2/f6 (?) | |
|
108 | merging d2/f7 (?) | |
|
109 | 3 files updated, 7 files merged, 0 files removed, 0 files unresolved (?) | |
|
110 | 4 files updated, 6 files merged, 0 files removed, 0 files unresolved (?) | |
|
111 | 5 files updated, 5 files merged, 0 files removed, 0 files unresolved (?) | |
|
112 | 6 files updated, 4 files merged, 0 files removed, 0 files unresolved (?) | |
|
113 | 7 files updated, 3 files merged, 0 files removed, 0 files unresolved (?) | |
|
114 | 8 files updated, 2 files merged, 0 files removed, 0 files unresolved (?) | |
|
115 | 9 files updated, 1 files merged, 0 files removed, 0 files unresolved (?) | |
|
116 | 10 files updated, 0 files merged, 0 files removed, 0 files unresolved (?) | |
|
96 | 10 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
117 | 97 | $ cat d2/f7 d2/f8 |
|
118 | 98 | d2/f7 rev3 |
|
119 | 99 | d2/f8 rev2 |
General Comments 0
You need to be logged in to leave comments.
Login now