Show More
@@ -2940,6 +2940,7 b' def grep(ui, repo, pattern, *pats, **opt' | |||||
2940 | found = False |
|
2940 | found = False | |
2941 | follow = opts.get('follow') |
|
2941 | follow = opts.get('follow') | |
2942 |
|
2942 | |||
|
2943 | getrenamed = scmutil.getrenamedfn(repo) | |||
2943 | def prep(ctx, fns): |
|
2944 | def prep(ctx, fns): | |
2944 | rev = ctx.rev() |
|
2945 | rev = ctx.rev() | |
2945 | pctx = ctx.p1() |
|
2946 | pctx = ctx.p1() | |
@@ -2953,13 +2954,10 b' def grep(ui, repo, pattern, *pats, **opt' | |||||
2953 | fnode = ctx.filenode(fn) |
|
2954 | fnode = ctx.filenode(fn) | |
2954 | except error.LookupError: |
|
2955 | except error.LookupError: | |
2955 | continue |
|
2956 | continue | |
|
2957 | ||||
2956 | copy = None |
|
2958 | copy = None | |
2957 | if follow: |
|
2959 | if follow: | |
2958 | try: |
|
2960 | copy = getrenamed(fn, rev) | |
2959 | copied = flog.renamed(fnode) |
|
|||
2960 | except error.WdirUnsupported: |
|
|||
2961 | copied = ctx[fn].renamed() |
|
|||
2962 | copy = copied and copied[0] |
|
|||
2963 | if copy: |
|
2961 | if copy: | |
2964 | copies.setdefault(rev, {})[fn] = copy |
|
2962 | copies.setdefault(rev, {})[fn] = copy | |
2965 | if fn in skip: |
|
2963 | if fn in skip: |
General Comments 0
You need to be logged in to leave comments.
Login now