Show More
@@ -2017,7 +2017,6 b' def log(ui, repo, *pats, **opts):' | |||
|
2017 | 2017 | else: |
|
2018 | 2018 | endrev = len(repo) |
|
2019 | 2019 | rcache = {} |
|
2020 | ncache = {} | |
|
2021 | 2020 | def getrenamed(fn, rev): |
|
2022 | 2021 | '''looks up all renames for a file (up to endrev) the first |
|
2023 | 2022 | time the file is given. It indexes on the changerev and only |
@@ -2025,15 +2024,11 b' def log(ui, repo, *pats, **opts):' | |||
|
2025 | 2024 | Returns rename info for fn at changerev rev.''' |
|
2026 | 2025 | if fn not in rcache: |
|
2027 | 2026 | rcache[fn] = {} |
|
2028 | ncache[fn] = {} | |
|
2029 | 2027 | fl = repo.file(fn) |
|
2030 | 2028 | for i in fl: |
|
2031 | node = fl.node(i) | |
|
2032 | 2029 | lr = fl.linkrev(i) |
|
2033 | renamed = fl.renamed(node) | |
|
2030 | renamed = fl.renamed(fl.node(i)) | |
|
2034 | 2031 | rcache[fn][lr] = renamed |
|
2035 | if renamed: | |
|
2036 | ncache[fn][node] = renamed | |
|
2037 | 2032 | if lr >= endrev: |
|
2038 | 2033 | break |
|
2039 | 2034 | if rev in rcache[fn]: |
@@ -2041,12 +2036,10 b' def log(ui, repo, *pats, **opts):' | |||
|
2041 | 2036 | |
|
2042 | 2037 | # If linkrev != rev (i.e. rev not found in rcache) fallback to |
|
2043 | 2038 | # filectx logic. |
|
2044 | ||
|
2045 | 2039 | try: |
|
2046 | 2040 | return repo[rev][fn].renamed() |
|
2047 | 2041 | except error.LookupError: |
|
2048 |
|
|
|
2049 | return None | |
|
2042 | return None | |
|
2050 | 2043 | |
|
2051 | 2044 | df = False |
|
2052 | 2045 | if opts["date"]: |
General Comments 0
You need to be logged in to leave comments.
Login now