Show More
@@ -23,7 +23,6 b' from mercurial import (' | |||||
23 | patch, |
|
23 | patch, | |
24 | pycompat, |
|
24 | pycompat, | |
25 | registrar, |
|
25 | registrar, | |
26 | scmutil, |
|
|||
27 | ) |
|
26 | ) | |
28 | from mercurial.utils import dateutil |
|
27 | from mercurial.utils import dateutil | |
29 |
|
28 | |||
@@ -76,8 +75,6 b' def countrate(ui, repo, amap, *pats, **o' | |||||
76 | if opts.get(b'date'): |
|
75 | if opts.get(b'date'): | |
77 | df = dateutil.matchdate(opts[b'date']) |
|
76 | df = dateutil.matchdate(opts[b'date']) | |
78 |
|
77 | |||
79 | m = scmutil.match(repo[None], pats, opts) |
|
|||
80 |
|
||||
81 | def prep(ctx, fmatch): |
|
78 | def prep(ctx, fmatch): | |
82 | rev = ctx.rev() |
|
79 | rev = ctx.rev() | |
83 | if df and not df(ctx.date()[0]): # doesn't match date format |
|
80 | if df and not df(ctx.date()[0]): # doesn't match date format | |
@@ -99,7 +96,15 b' def countrate(ui, repo, amap, *pats, **o' | |||||
99 |
|
96 | |||
100 | progress.increment() |
|
97 | progress.increment() | |
101 |
|
98 | |||
102 | for ctx in cmdutil.walkchangerevs(repo, m, opts, prep): |
|
99 | wopts = logcmdutil.walkopts( | |
|
100 | pats=pats, | |||
|
101 | opts=opts, | |||
|
102 | revspec=opts[b'rev'], | |||
|
103 | include_pats=opts[b'include'], | |||
|
104 | exclude_pats=opts[b'exclude'], | |||
|
105 | ) | |||
|
106 | revs, makefilematcher = logcmdutil.makewalker(repo, wopts) | |||
|
107 | for ctx in cmdutil.walkchangerevs(repo, revs, makefilematcher, prep): | |||
103 | continue |
|
108 | continue | |
104 |
|
109 | |||
105 | progress.complete() |
|
110 | progress.complete() |
@@ -2428,8 +2428,8 b' class _followfilter(object):' | |||||
2428 | return False |
|
2428 | return False | |
2429 |
|
2429 | |||
2430 |
|
2430 | |||
2431 |
def walkchangerevs(repo, |
|
2431 | def walkchangerevs(repo, revs, makefilematcher, prepare): | |
2432 |
'''Iterate over files and the revs in |
|
2432 | '''Iterate over files and the revs in a "windowed" way. | |
2433 |
|
2433 | |||
2434 | Callers most commonly need to iterate backwards over the history |
|
2434 | Callers most commonly need to iterate backwards over the history | |
2435 | in which they are interested. Doing so has awful (quadratic-looking) |
|
2435 | in which they are interested. Doing so has awful (quadratic-looking) | |
@@ -2443,107 +2443,11 b' def walkchangerevs(repo, match, opts, pr' | |||||
2443 | yielding each context, the iterator will first call the prepare |
|
2443 | yielding each context, the iterator will first call the prepare | |
2444 | function on each context in the window in forward order.''' |
|
2444 | function on each context in the window in forward order.''' | |
2445 |
|
2445 | |||
2446 | allfiles = opts.get(b'all_files') |
|
|||
2447 | follow = opts.get(b'follow') or opts.get(b'follow_first') |
|
|||
2448 | revs = _walkrevs(repo, opts) |
|
|||
2449 | if not revs: |
|
2446 | if not revs: | |
2450 | return [] |
|
2447 | return [] | |
2451 | wanted = set() |
|
|||
2452 | slowpath = match.anypats() or (not match.always() and opts.get(b'removed')) |
|
|||
2453 | fncache = {} |
|
|||
2454 | change = repo.__getitem__ |
|
2448 | change = repo.__getitem__ | |
2455 |
|
2449 | |||
2456 | # First step is to fill wanted, the set of revisions that we want to yield. |
|
|||
2457 | # When it does not induce extra cost, we also fill fncache for revisions in |
|
|||
2458 | # wanted: a cache of filenames that were changed (ctx.files()) and that |
|
|||
2459 | # match the file filtering conditions. |
|
|||
2460 |
|
||||
2461 | if match.always() or allfiles: |
|
|||
2462 | # No files, no patterns. Display all revs. |
|
|||
2463 | wanted = revs |
|
|||
2464 | elif not slowpath: |
|
|||
2465 | # We only have to read through the filelog to find wanted revisions |
|
|||
2466 |
|
||||
2467 | try: |
|
|||
2468 | wanted = walkfilerevs(repo, match, follow, revs, fncache) |
|
|||
2469 | except FileWalkError: |
|
|||
2470 | slowpath = True |
|
|||
2471 |
|
||||
2472 | # We decided to fall back to the slowpath because at least one |
|
|||
2473 | # of the paths was not a file. Check to see if at least one of them |
|
|||
2474 | # existed in history, otherwise simply return |
|
|||
2475 | for path in match.files(): |
|
|||
2476 | if path == b'.' or path in repo.store: |
|
|||
2477 | break |
|
|||
2478 | else: |
|
|||
2479 | return [] |
|
|||
2480 |
|
||||
2481 | if slowpath: |
|
|||
2482 | # We have to read the changelog to match filenames against |
|
|||
2483 | # changed files |
|
|||
2484 |
|
||||
2485 | if follow: |
|
|||
2486 | raise error.Abort( |
|
|||
2487 | _(b'can only follow copies/renames for explicit filenames') |
|
|||
2488 | ) |
|
|||
2489 |
|
||||
2490 | # The slow path checks files modified in every changeset. |
|
|||
2491 | # This is really slow on large repos, so compute the set lazily. |
|
|||
2492 | class lazywantedset(object): |
|
|||
2493 | def __init__(self): |
|
|||
2494 | self.set = set() |
|
|||
2495 | self.revs = set(revs) |
|
|||
2496 |
|
||||
2497 | # No need to worry about locality here because it will be accessed |
|
|||
2498 | # in the same order as the increasing window below. |
|
|||
2499 | def __contains__(self, value): |
|
|||
2500 | if value in self.set: |
|
|||
2501 | return True |
|
|||
2502 | elif not value in self.revs: |
|
|||
2503 | return False |
|
|||
2504 | else: |
|
|||
2505 | self.revs.discard(value) |
|
|||
2506 | ctx = change(value) |
|
|||
2507 | if allfiles: |
|
|||
2508 | matches = list(ctx.manifest().walk(match)) |
|
|||
2509 | else: |
|
|||
2510 | matches = [f for f in ctx.files() if match(f)] |
|
|||
2511 | if matches: |
|
|||
2512 | fncache[value] = matches |
|
|||
2513 | self.set.add(value) |
|
|||
2514 | return True |
|
|||
2515 | return False |
|
|||
2516 |
|
||||
2517 | def discard(self, value): |
|
|||
2518 | self.revs.discard(value) |
|
|||
2519 | self.set.discard(value) |
|
|||
2520 |
|
||||
2521 | wanted = lazywantedset() |
|
|||
2522 |
|
||||
2523 | # it might be worthwhile to do this in the iterator if the rev range |
|
|||
2524 | # is descending and the prune args are all within that range |
|
|||
2525 | for rev in opts.get(b'prune', ()): |
|
|||
2526 | rev = repo[rev].rev() |
|
|||
2527 | ff = _followfilter(repo) |
|
|||
2528 | stop = min(revs[0], revs[-1]) |
|
|||
2529 | for x in pycompat.xrange(rev, stop - 1, -1): |
|
|||
2530 | if ff.match(x): |
|
|||
2531 | wanted = wanted - [x] |
|
|||
2532 |
|
||||
2533 | # Now that wanted is correctly initialized, we can iterate over the |
|
|||
2534 | # revision range, yielding only revisions in wanted. |
|
|||
2535 | def iterate(): |
|
2450 | def iterate(): | |
2536 | if follow and match.always(): |
|
|||
2537 | ff = _followfilter(repo, onlyfirst=opts.get(b'follow_first')) |
|
|||
2538 |
|
||||
2539 | def want(rev): |
|
|||
2540 | return ff.match(rev) and rev in wanted |
|
|||
2541 |
|
||||
2542 | else: |
|
|||
2543 |
|
||||
2544 | def want(rev): |
|
|||
2545 | return rev in wanted |
|
|||
2546 |
|
||||
2547 | it = iter(revs) |
|
2451 | it = iter(revs) | |
2548 | stopiteration = False |
|
2452 | stopiteration = False | |
2549 | for windowsize in increasingwindows(): |
|
2453 | for windowsize in increasingwindows(): | |
@@ -2553,28 +2457,10 b' def walkchangerevs(repo, match, opts, pr' | |||||
2553 | if rev is None: |
|
2457 | if rev is None: | |
2554 | stopiteration = True |
|
2458 | stopiteration = True | |
2555 | break |
|
2459 | break | |
2556 | elif want(rev): |
|
|||
2557 |
|
|
2460 | nrevs.append(rev) | |
2558 | for rev in sorted(nrevs): |
|
2461 | for rev in sorted(nrevs): | |
2559 | fns = fncache.get(rev) |
|
|||
2560 | ctx = change(rev) |
|
2462 | ctx = change(rev) | |
2561 | if not fns: |
|
2463 | prepare(ctx, makefilematcher(ctx)) | |
2562 |
|
||||
2563 | def fns_generator(): |
|
|||
2564 | if allfiles: |
|
|||
2565 |
|
||||
2566 | def bad(f, msg): |
|
|||
2567 | pass |
|
|||
2568 |
|
||||
2569 | for f in ctx.matches(matchmod.badmatch(match, bad)): |
|
|||
2570 | yield f |
|
|||
2571 | else: |
|
|||
2572 | for f in ctx.files(): |
|
|||
2573 | if match(f): |
|
|||
2574 | yield f |
|
|||
2575 |
|
||||
2576 | fns = fns_generator() |
|
|||
2577 | prepare(ctx, scmutil.matchfiles(repo, fns)) |
|
|||
2578 | for rev in nrevs: |
|
2464 | for rev in nrevs: | |
2579 | yield change(rev) |
|
2465 | yield change(rev) | |
2580 |
|
2466 |
@@ -3579,7 +3579,6 b' def grep(ui, repo, pattern, *pats, **opt' | |||||
3579 |
|
3579 | |||
3580 | skip = set() |
|
3580 | skip = set() | |
3581 | revfiles = {} |
|
3581 | revfiles = {} | |
3582 | match = scmutil.match(repo[None], pats, opts) |
|
|||
3583 | found = False |
|
3582 | found = False | |
3584 | follow = opts.get(b'follow') |
|
3583 | follow = opts.get(b'follow') | |
3585 |
|
3584 | |||
@@ -3654,9 +3653,21 b' def grep(ui, repo, pattern, *pats, **opt' | |||||
3654 | if pfn not in matches[parent] and pfn in pctx: |
|
3653 | if pfn not in matches[parent] and pfn in pctx: | |
3655 | grepbody(pfn, parent, readfile(pctx, pfn)) |
|
3654 | grepbody(pfn, parent, readfile(pctx, pfn)) | |
3656 |
|
3655 | |||
|
3656 | wopts = logcmdutil.walkopts( | |||
|
3657 | pats=pats, | |||
|
3658 | opts=opts, | |||
|
3659 | revspec=opts[b'rev'], | |||
|
3660 | include_pats=opts[b'include'], | |||
|
3661 | exclude_pats=opts[b'exclude'], | |||
|
3662 | follow=follow, | |||
|
3663 | force_changelog_traversal=all_files, | |||
|
3664 | filter_revisions_by_pats=not all_files, | |||
|
3665 | ) | |||
|
3666 | revs, makefilematcher = logcmdutil.makewalker(repo, wopts) | |||
|
3667 | ||||
3657 | ui.pager(b'grep') |
|
3668 | ui.pager(b'grep') | |
3658 | fm = ui.formatter(b'grep', opts) |
|
3669 | fm = ui.formatter(b'grep', opts) | |
3659 |
for ctx in cmdutil.walkchangerevs(repo, |
|
3670 | for ctx in cmdutil.walkchangerevs(repo, revs, makefilematcher, prep): | |
3660 | rev = ctx.rev() |
|
3671 | rev = ctx.rev() | |
3661 | parent = ctx.p1().rev() |
|
3672 | parent = ctx.p1().rev() | |
3662 | for fn in sorted(revfiles.get(rev, [])): |
|
3673 | for fn in sorted(revfiles.get(rev, [])): |
@@ -990,7 +990,6 b' follow revision history from wdir:' | |||||
990 | 1: A add0-cp1, A add0-cp1-mod1, A add0-cp1-mod1-rm3, M add0-mod1, R add0-rm1 |
|
990 | 1: A add0-cp1, A add0-cp1-mod1, A add0-cp1-mod1-rm3, M add0-mod1, R add0-rm1 | |
991 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 |
|
991 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 | |
992 |
|
992 | |||
993 | BROKEN: should follow history |
|
|||
994 | BROKEN: should not abort because of removed file |
|
993 | BROKEN: should not abort because of removed file | |
995 | $ hg grep --diff -fr'wdir()' data |
|
994 | $ hg grep --diff -fr'wdir()' data | |
996 | add0-cp4-mod4:2147483647:+:data4 |
|
995 | add0-cp4-mod4:2147483647:+:data4 | |
@@ -1063,10 +1062,12 b' follow revision history from multiple re' | |||||
1063 | 1: A add0-cp1, A add0-cp1-mod1, A add0-cp1-mod1-rm3, M add0-mod1, R add0-rm1 |
|
1062 | 1: A add0-cp1, A add0-cp1-mod1, A add0-cp1-mod1-rm3, M add0-mod1, R add0-rm1 | |
1064 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 |
|
1063 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 | |
1065 |
|
1064 | |||
1066 | BROKEN: should include the revision 1 |
|
|||
1067 | $ hg grep --diff -fr'1+2' data |
|
1065 | $ hg grep --diff -fr'1+2' data | |
1068 | add0-cp2-mod2:2:+:data2 |
|
1066 | add0-cp2-mod2:2:+:data2 | |
1069 | add0-mod2:2:+:data2 |
|
1067 | add0-mod2:2:+:data2 | |
|
1068 | add0-cp1-mod1:1:+:data1 | |||
|
1069 | add0-cp1-mod1-rm3:1:+:data1 | |||
|
1070 | add0-mod1:1:+:data1 | |||
1070 | add0:0:+:data0 |
|
1071 | add0:0:+:data0 | |
1071 | add0-mod1:0:+:data0 |
|
1072 | add0-mod1:0:+:data0 | |
1072 | add0-mod2:0:+:data0 |
|
1073 | add0-mod2:0:+:data0 | |
@@ -1076,7 +1077,6 b' follow revision history from multiple re' | |||||
1076 | add0-rm2:0:+:data0 |
|
1077 | add0-rm2:0:+:data0 | |
1077 | add0-rm4:0:+:data0 |
|
1078 | add0-rm4:0:+:data0 | |
1078 |
|
1079 | |||
1079 | BROKEN: should include the revision 1 |
|
|||
1080 | $ hg grep -fr'1+2' data |
|
1080 | $ hg grep -fr'1+2' data | |
1081 | add0:2:data0 |
|
1081 | add0:2:data0 | |
1082 | add0-cp2:2:data0 |
|
1082 | add0-cp2:2:data0 | |
@@ -1089,6 +1089,19 b' follow revision history from multiple re' | |||||
1089 | add0-mod4:2:data0 |
|
1089 | add0-mod4:2:data0 | |
1090 | add0-rm1:2:data0 |
|
1090 | add0-rm1:2:data0 | |
1091 | add0-rm4:2:data0 |
|
1091 | add0-rm4:2:data0 | |
|
1092 | add0:1:data0 | |||
|
1093 | add0-cp1:1:data0 | |||
|
1094 | add0-cp1-mod1:1:data0 | |||
|
1095 | add0-cp1-mod1:1:data1 | |||
|
1096 | add0-cp1-mod1-rm3:1:data0 | |||
|
1097 | add0-cp1-mod1-rm3:1:data1 | |||
|
1098 | add0-mod1:1:data0 | |||
|
1099 | add0-mod1:1:data1 | |||
|
1100 | add0-mod2:1:data0 | |||
|
1101 | add0-mod3:1:data0 | |||
|
1102 | add0-mod4:1:data0 | |||
|
1103 | add0-rm2:1:data0 | |||
|
1104 | add0-rm4:1:data0 | |||
1092 | add0:0:data0 |
|
1105 | add0:0:data0 | |
1093 | add0-mod1:0:data0 |
|
1106 | add0-mod1:0:data0 | |
1094 | add0-mod2:0:data0 |
|
1107 | add0-mod2:0:data0 | |
@@ -1108,11 +1121,9 b' follow file history from wdir parent, un' | |||||
1108 | add0-mod3:3:+:data3 |
|
1121 | add0-mod3:3:+:data3 | |
1109 | add0-mod3:0:+:data0 |
|
1122 | add0-mod3:0:+:data0 | |
1110 |
|
1123 | |||
1111 | BROKEN: should not include the revision 2 |
|
|||
1112 | $ hg grep -f data add0-mod3 |
|
1124 | $ hg grep -f data add0-mod3 | |
1113 | add0-mod3:3:data0 |
|
1125 | add0-mod3:3:data0 | |
1114 | add0-mod3:3:data3 |
|
1126 | add0-mod3:3:data3 | |
1115 | add0-mod3:2:data0 |
|
|||
1116 | add0-mod3:1:data0 |
|
1127 | add0-mod3:1:data0 | |
1117 | add0-mod3:0:data0 |
|
1128 | add0-mod3:0:data0 | |
1118 |
|
1129 | |||
@@ -1124,10 +1135,8 b' follow file history from wdir parent, mo' | |||||
1124 | $ hg grep --diff -f data add0-mod4 |
|
1135 | $ hg grep --diff -f data add0-mod4 | |
1125 | add0-mod4:0:+:data0 |
|
1136 | add0-mod4:0:+:data0 | |
1126 |
|
1137 | |||
1127 | BROKEN: should not include the revision 2 |
|
|||
1128 | $ hg grep -f data add0-mod4 |
|
1138 | $ hg grep -f data add0-mod4 | |
1129 | add0-mod4:3:data0 |
|
1139 | add0-mod4:3:data0 | |
1130 | add0-mod4:2:data0 |
|
|||
1131 | add0-mod4:1:data0 |
|
1140 | add0-mod4:1:data0 | |
1132 | add0-mod4:0:data0 |
|
1141 | add0-mod4:0:data0 | |
1133 |
|
1142 | |||
@@ -1170,7 +1179,7 b' follow file history from wdir parent, co' | |||||
1170 | [255] |
|
1179 | [255] | |
1171 |
|
1180 | |||
1172 | $ hg grep --diff -f data add0-cp4 |
|
1181 | $ hg grep --diff -f data add0-cp4 | |
1173 |
abort: cannot follow |
|
1182 | abort: cannot follow nonexistent file: "add0-cp4" | |
1174 | [255] |
|
1183 | [255] | |
1175 |
|
1184 | |||
1176 | BROKEN: maybe better to abort |
|
1185 | BROKEN: maybe better to abort | |
@@ -1199,7 +1208,7 b' follow file history from wdir parent (ex' | |||||
1199 | [255] |
|
1208 | [255] | |
1200 |
|
1209 | |||
1201 | $ hg grep --diff -fr. data add0-cp1-mod1-rm3 |
|
1210 | $ hg grep --diff -fr. data add0-cp1-mod1-rm3 | |
1202 |
abort: cannot follow file not in |
|
1211 | abort: cannot follow file not in any of the specified revisions: "add0-cp1-mod1-rm3" | |
1203 | [255] |
|
1212 | [255] | |
1204 |
|
1213 | |||
1205 | BROKEN: should abort |
|
1214 | BROKEN: should abort | |
@@ -1213,14 +1222,13 b' follow file history from wdir parent, re' | |||||
1213 | abort: cannot follow file not in parent revision: "add0-rm4" |
|
1222 | abort: cannot follow file not in parent revision: "add0-rm4" | |
1214 | [255] |
|
1223 | [255] | |
1215 |
|
1224 | |||
1216 | BROKEN: may be okay, but different behavior from "hg log" |
|
|||
1217 | $ hg grep --diff -f data add0-rm4 |
|
1225 | $ hg grep --diff -f data add0-rm4 | |
1218 | add0-rm4:0:+:data0 |
|
1226 | abort: cannot follow file not in parent revision: "add0-rm4" | |
|
1227 | [255] | |||
1219 |
|
1228 | |||
1220 | BROKEN: should not include the revision 2, and maybe better to abort |
|
1229 | BROKEN: should abort | |
1221 | $ hg grep -f data add0-rm4 |
|
1230 | $ hg grep -f data add0-rm4 | |
1222 | add0-rm4:3:data0 |
|
1231 | add0-rm4:3:data0 | |
1223 | add0-rm4:2:data0 |
|
|||
1224 | add0-rm4:1:data0 |
|
1232 | add0-rm4:1:data0 | |
1225 | add0-rm4:0:data0 |
|
1233 | add0-rm4:0:data0 | |
1226 |
|
1234 | |||
@@ -1250,14 +1258,12 b' follow file history from wdir parent, mu' | |||||
1250 | add0:0:+:data0 |
|
1258 | add0:0:+:data0 | |
1251 | add0-mod3:0:+:data0 |
|
1259 | add0-mod3:0:+:data0 | |
1252 |
|
1260 | |||
1253 | BROKEN: should not include the revision 2 |
|
|||
1254 | BROKEN: should follow history across renames |
|
1261 | BROKEN: should follow history across renames | |
1255 | $ hg grep -f data add0-mod3 add0-cp1-mod1 |
|
1262 | $ hg grep -f data add0-mod3 add0-cp1-mod1 | |
1256 | add0-cp1-mod1:3:data0 |
|
1263 | add0-cp1-mod1:3:data0 | |
1257 | add0-cp1-mod1:3:data1 |
|
1264 | add0-cp1-mod1:3:data1 | |
1258 | add0-mod3:3:data0 |
|
1265 | add0-mod3:3:data0 | |
1259 | add0-mod3:3:data3 |
|
1266 | add0-mod3:3:data3 | |
1260 | add0-mod3:2:data0 |
|
|||
1261 | add0-cp1-mod1:1:data0 |
|
1267 | add0-cp1-mod1:1:data0 | |
1262 | add0-cp1-mod1:1:data1 |
|
1268 | add0-cp1-mod1:1:data1 | |
1263 | add0-mod3:1:data0 |
|
1269 | add0-mod3:1:data0 | |
@@ -1269,8 +1275,8 b' follow file history from specified revis' | |||||
1269 | 2: A add0-cp2, A add0-cp2-mod2, M add0-mod2, R add0-rm2 |
|
1275 | 2: A add0-cp2, A add0-cp2-mod2, M add0-mod2, R add0-rm2 | |
1270 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 |
|
1276 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 | |
1271 |
|
1277 | |||
1272 | BROKEN: should include the revision 2 |
|
|||
1273 | $ hg grep --diff -fr2 data add0-mod2 |
|
1278 | $ hg grep --diff -fr2 data add0-mod2 | |
|
1279 | add0-mod2:2:+:data2 | |||
1274 | add0-mod2:0:+:data0 |
|
1280 | add0-mod2:0:+:data0 | |
1275 |
|
1281 | |||
1276 | $ hg grep -fr2 data add0-mod2 |
|
1282 | $ hg grep -fr2 data add0-mod2 | |
@@ -1284,10 +1290,8 b' follow file history from specified revis' | |||||
1284 | 2: A add0-cp2, A add0-cp2-mod2, M add0-mod2, R add0-rm2 |
|
1290 | 2: A add0-cp2, A add0-cp2-mod2, M add0-mod2, R add0-rm2 | |
1285 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 |
|
1291 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 | |
1286 |
|
1292 | |||
1287 | BROKEN: should follow history from the specified revision |
|
|||
1288 | $ hg grep --diff -fr2 data add0-cp2 |
|
1293 | $ hg grep --diff -fr2 data add0-cp2 | |
1289 | abort: cannot follow file not in parent revision: "add0-cp2" |
|
1294 | add0:0:+:data0 | |
1290 | [255] |
|
|||
1291 |
|
1295 | |||
1292 | BROKEN: should follow history across renames |
|
1296 | BROKEN: should follow history across renames | |
1293 | $ hg grep -fr2 data add0-cp2 |
|
1297 | $ hg grep -fr2 data add0-cp2 | |
@@ -1299,10 +1303,9 b' follow file history from specified revis' | |||||
1299 | 2: A add0-cp2, A add0-cp2-mod2, M add0-mod2, R add0-rm2 |
|
1303 | 2: A add0-cp2, A add0-cp2-mod2, M add0-mod2, R add0-rm2 | |
1300 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 |
|
1304 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 | |
1301 |
|
1305 | |||
1302 | BROKEN: should follow history from the specified revision |
|
|||
1303 | $ hg grep --diff -fr2 data add0-cp2-mod2 |
|
1306 | $ hg grep --diff -fr2 data add0-cp2-mod2 | |
1304 | abort: cannot follow file not in parent revision: "add0-cp2-mod2" |
|
1307 | add0-cp2-mod2:2:+:data2 | |
1305 | [255] |
|
1308 | add0:0:+:data0 | |
1306 |
|
1309 | |||
1307 | BROKEN: should follow history across renames |
|
1310 | BROKEN: should follow history across renames | |
1308 | $ hg grep -fr2 data add0-cp2-mod2 |
|
1311 | $ hg grep -fr2 data add0-cp2-mod2 | |
@@ -1315,9 +1318,9 b' follow file history from specified revis' | |||||
1315 | abort: cannot follow file not in any of the specified revisions: "add0-rm2" |
|
1318 | abort: cannot follow file not in any of the specified revisions: "add0-rm2" | |
1316 | [255] |
|
1319 | [255] | |
1317 |
|
1320 | |||
1318 | BROKEN: should abort |
|
|||
1319 | $ hg grep --diff -fr2 data add0-rm2 |
|
1321 | $ hg grep --diff -fr2 data add0-rm2 | |
1320 | add0-rm2:0:+:data0 |
|
1322 | abort: cannot follow file not in any of the specified revisions: "add0-rm2" | |
|
1323 | [255] | |||
1321 |
|
1324 | |||
1322 | BROKEN: should abort |
|
1325 | BROKEN: should abort | |
1323 | $ hg grep -fr2 data add0-rm2 |
|
1326 | $ hg grep -fr2 data add0-rm2 | |
@@ -1329,10 +1332,10 b' follow file history from specified revis' | |||||
1329 | 2: A add0-cp2, A add0-cp2-mod2, M add0-mod2, R add0-rm2 |
|
1332 | 2: A add0-cp2, A add0-cp2-mod2, M add0-mod2, R add0-rm2 | |
1330 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 |
|
1333 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 | |
1331 |
|
1334 | |||
1332 | BROKEN: should follow history from the specified revision |
|
|||
1333 | $ hg grep --diff -fr2 data add0-cp2 add0-mod2 |
|
1335 | $ hg grep --diff -fr2 data add0-cp2 add0-mod2 | |
1334 | abort: cannot follow file not in parent revision: "add0-cp2" |
|
1336 | add0-mod2:2:+:data2 | |
1335 | [255] |
|
1337 | add0:0:+:data0 | |
|
1338 | add0-mod2:0:+:data0 | |||
1336 |
|
1339 | |||
1337 | BROKEN: should follow history across renames |
|
1340 | BROKEN: should follow history across renames | |
1338 | $ hg grep -fr2 data add0-cp2 add0-mod2 |
|
1341 | $ hg grep -fr2 data add0-cp2 add0-mod2 | |
@@ -1366,8 +1369,8 b' follow file history from wdir, modified:' | |||||
1366 | 2147483647: A add0-cp4, A add0-cp4-mod4, M add0-mod4, R add0-rm4 |
|
1369 | 2147483647: A add0-cp4, A add0-cp4-mod4, M add0-mod4, R add0-rm4 | |
1367 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 |
|
1370 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 | |
1368 |
|
1371 | |||
1369 | BROKEN: should include the changes in wdir |
|
|||
1370 | $ hg grep --diff -fr'wdir()' data add0-mod4 |
|
1372 | $ hg grep --diff -fr'wdir()' data add0-mod4 | |
|
1373 | add0-mod4:2147483647:+:data4 | |||
1371 | add0-mod4:0:+:data0 |
|
1374 | add0-mod4:0:+:data0 | |
1372 |
|
1375 | |||
1373 | $ hg grep -fr'wdir()' data add0-mod4 |
|
1376 | $ hg grep -fr'wdir()' data add0-mod4 | |
@@ -1383,10 +1386,8 b' follow file history from wdir, copied bu' | |||||
1383 | 2147483647: A add0-cp4, A add0-cp4-mod4, M add0-mod4, R add0-rm4 |
|
1386 | 2147483647: A add0-cp4, A add0-cp4-mod4, M add0-mod4, R add0-rm4 | |
1384 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 |
|
1387 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 | |
1385 |
|
1388 | |||
1386 | BROKEN: should follow history |
|
|||
1387 | $ hg grep --diff -fr'wdir()' data add0-cp4 |
|
1389 | $ hg grep --diff -fr'wdir()' data add0-cp4 | |
1388 | abort: cannot follow file not in parent revision: "add0-cp4" |
|
1390 | add0:0:+:data0 | |
1389 | [255] |
|
|||
1390 |
|
1391 | |||
1391 | BROKEN: should follow history across renames |
|
1392 | BROKEN: should follow history across renames | |
1392 | $ hg grep -fr'wdir()' data add0-cp4 |
|
1393 | $ hg grep -fr'wdir()' data add0-cp4 | |
@@ -1398,10 +1399,9 b' follow file history from wdir, copied an' | |||||
1398 | 2147483647: A add0-cp4, A add0-cp4-mod4, M add0-mod4, R add0-rm4 |
|
1399 | 2147483647: A add0-cp4, A add0-cp4-mod4, M add0-mod4, R add0-rm4 | |
1399 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 |
|
1400 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 | |
1400 |
|
1401 | |||
1401 | BROKEN: should follow history |
|
|||
1402 | $ hg grep --diff -fr'wdir()' data add0-cp4-mod4 |
|
1402 | $ hg grep --diff -fr'wdir()' data add0-cp4-mod4 | |
1403 | abort: cannot follow file not in parent revision: "add0-cp4-mod4" |
|
1403 | add0-cp4-mod4:2147483647:+:data4 | |
1404 | [255] |
|
1404 | add0:0:+:data0 | |
1405 |
|
1405 | |||
1406 | BROKEN: should follow history across renames |
|
1406 | BROKEN: should follow history across renames | |
1407 | $ hg grep -fr'wdir()' data add0-cp4-mod4 |
|
1407 | $ hg grep -fr'wdir()' data add0-cp4-mod4 | |
@@ -1415,10 +1415,12 b' follow file history from wdir, multiple ' | |||||
1415 | 3: A add0-cp1-cp3, A add0-cp1-mod1-cp3-mod3, R add0-cp1-mod1-rm3, M add0-mod3 |
|
1415 | 3: A add0-cp1-cp3, A add0-cp1-mod1-cp3-mod3, R add0-cp1-mod1-rm3, M add0-mod3 | |
1416 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 |
|
1416 | 0: A add0, A add0-mod1, A add0-mod2, A add0-mod3, A add0-mod4, A add0-rm1, A add0-rm2, A add0-rm4 | |
1417 |
|
1417 | |||
1418 | BROKEN: should follow history |
|
|||
1419 | $ hg grep --diff -fr'wdir()' data add0-cp4 add0-mod4 add0-mod3 |
|
1418 | $ hg grep --diff -fr'wdir()' data add0-cp4 add0-mod4 add0-mod3 | |
1420 | abort: cannot follow file not in parent revision: "add0-cp4" |
|
1419 | add0-mod4:2147483647:+:data4 | |
1421 | [255] |
|
1420 | add0-mod3:3:+:data3 | |
|
1421 | add0:0:+:data0 | |||
|
1422 | add0-mod3:0:+:data0 | |||
|
1423 | add0-mod4:0:+:data0 | |||
1422 |
|
1424 | |||
1423 | BROKEN: should follow history across renames |
|
1425 | BROKEN: should follow history across renames | |
1424 | $ hg grep -fr'wdir()' data add0-cp4 add0-mod4 add0-mod3 |
|
1426 | $ hg grep -fr'wdir()' data add0-cp4 add0-mod4 add0-mod3 |
General Comments 0
You need to be logged in to leave comments.
Login now