Show More
@@ -1526,7 +1526,6 b' def grep(ui, repo, pattern, *pats, **opt' | |||||
1526 | if st == 'window': |
|
1526 | if st == 'window': | |
1527 | incrementing = rev |
|
1527 | incrementing = rev | |
1528 | matches.clear() |
|
1528 | matches.clear() | |
1529 | copies.clear() |
|
|||
1530 | elif st == 'add': |
|
1529 | elif st == 'add': | |
1531 | change = repo.changelog.read(repo.lookup(str(rev))) |
|
1530 | change = repo.changelog.read(repo.lookup(str(rev))) | |
1532 | mf = repo.manifest.read(change[0]) |
|
1531 | mf = repo.manifest.read(change[0]) | |
@@ -1535,20 +1534,19 b' def grep(ui, repo, pattern, *pats, **opt' | |||||
1535 | if fn in skip: |
|
1534 | if fn in skip: | |
1536 | continue |
|
1535 | continue | |
1537 | fstate.setdefault(fn, {}) |
|
1536 | fstate.setdefault(fn, {}) | |
1538 | copies.setdefault(rev, {}) |
|
|||
1539 | try: |
|
1537 | try: | |
1540 | grepbody(fn, rev, getfile(fn).read(mf[fn])) |
|
1538 | grepbody(fn, rev, getfile(fn).read(mf[fn])) | |
1541 | if follow: |
|
1539 | if follow: | |
1542 | copied = getfile(fn).renamed(mf[fn]) |
|
1540 | copied = getfile(fn).renamed(mf[fn]) | |
1543 | if copied: |
|
1541 | if copied: | |
1544 |
copies |
|
1542 | copies.setdefault(rev, {})[fn] = copied[0] | |
1545 | except KeyError: |
|
1543 | except KeyError: | |
1546 | pass |
|
1544 | pass | |
1547 | elif st == 'iter': |
|
1545 | elif st == 'iter': | |
1548 | states = matches[rev].items() |
|
1546 | states = matches[rev].items() | |
1549 | states.sort() |
|
1547 | states.sort() | |
1550 | for fn, m in states: |
|
1548 | for fn, m in states: | |
1551 |
copy = copies |
|
1549 | copy = copies.get(rev, {}).get(fn) | |
1552 | if fn in skip: |
|
1550 | if fn in skip: | |
1553 | if copy: |
|
1551 | if copy: | |
1554 | skip[copy] = True |
|
1552 | skip[copy] = True | |
@@ -1571,7 +1569,7 b' def grep(ui, repo, pattern, *pats, **opt' | |||||
1571 | for fn, state in fstate: |
|
1569 | for fn, state in fstate: | |
1572 | if fn in skip: |
|
1570 | if fn in skip: | |
1573 | continue |
|
1571 | continue | |
1574 |
if fn not in copies |
|
1572 | if fn not in copies.get(prev[fn], {}): | |
1575 | display(fn, rev, {}, state) |
|
1573 | display(fn, rev, {}, state) | |
1576 | return (count == 0 and 1) or 0 |
|
1574 | return (count == 0 and 1) or 0 | |
1577 |
|
1575 |
General Comments 0
You need to be logged in to leave comments.
Login now