equal
deleted
inserted
replaced
13 from mercurial import ( |
13 from mercurial import ( |
14 commands, |
14 commands, |
15 encoding, |
15 encoding, |
16 error, |
16 error, |
17 extensions, |
17 extensions, |
|
18 logcmdutil, |
18 patch, |
19 patch, |
19 pycompat, |
20 pycompat, |
20 registrar, |
21 registrar, |
21 scmutil, |
22 scmutil, |
22 util, |
23 util, |
73 else: |
74 else: |
74 |
75 |
75 def bad(x, y): |
76 def bad(x, y): |
76 raise error.Abort(b"%s: %s" % (x, y)) |
77 raise error.Abort(b"%s: %s" % (x, y)) |
77 |
78 |
78 ctx = scmutil.revsingle(repo, rev) |
79 ctx = logcmdutil.revsingle(repo, rev) |
79 m = scmutil.match(ctx, pats, opts, badfn=bad) |
80 m = scmutil.match(ctx, pats, opts, badfn=bad) |
80 for p in ctx.walk(m): |
81 for p in ctx.walk(m): |
81 yield p |
82 yield p |
82 |
83 |
83 |
84 |
315 _(b'you need to provide a revision'), |
316 _(b'you need to provide a revision'), |
316 hint=_(b'set fastannotate.mainbranch or use --rev'), |
317 hint=_(b'set fastannotate.mainbranch or use --rev'), |
317 ) |
318 ) |
318 if ui.configbool(b'fastannotate', b'unfilteredrepo'): |
319 if ui.configbool(b'fastannotate', b'unfilteredrepo'): |
319 repo = repo.unfiltered() |
320 repo = repo.unfiltered() |
320 ctx = scmutil.revsingle(repo, rev) |
321 ctx = logcmdutil.revsingle(repo, rev) |
321 m = scmutil.match(ctx, pats, opts) |
322 m = scmutil.match(ctx, pats, opts) |
322 paths = list(ctx.walk(m)) |
323 paths = list(ctx.walk(m)) |
323 if util.safehasattr(repo, 'prefetchfastannotate'): |
324 if util.safehasattr(repo, 'prefetchfastannotate'): |
324 # client |
325 # client |
325 if opts.get(b'REV'): |
326 if opts.get(b'REV'): |