equal
deleted
inserted
replaced
216 |
216 |
217 # paths will be used for prefetching and the real annotating |
217 # paths will be used for prefetching and the real annotating |
218 paths = list(_matchpaths(repo, rev, pats, opts, aopts)) |
218 paths = list(_matchpaths(repo, rev, pats, opts, aopts)) |
219 |
219 |
220 # for client, prefetch from the server |
220 # for client, prefetch from the server |
221 if util.safehasattr(repo, b'prefetchfastannotate'): |
221 if util.safehasattr(repo, 'prefetchfastannotate'): |
222 repo.prefetchfastannotate(paths) |
222 repo.prefetchfastannotate(paths) |
223 |
223 |
224 for path in paths: |
224 for path in paths: |
225 result = lines = existinglines = None |
225 result = lines = existinglines = None |
226 while True: |
226 while True: |
271 if ui.configbool(b'fastannotate', b'forcetext'): |
271 if ui.configbool(b'fastannotate', b'forcetext'): |
272 opts[r'text'] = True |
272 opts[r'text'] = True |
273 |
273 |
274 # check if we need to do prefetch (client-side) |
274 # check if we need to do prefetch (client-side) |
275 rev = opts.get(r'rev') |
275 rev = opts.get(r'rev') |
276 if util.safehasattr(repo, b'prefetchfastannotate') and rev is not None: |
276 if util.safehasattr(repo, 'prefetchfastannotate') and rev is not None: |
277 paths = list(_matchpaths(repo, rev, pats, pycompat.byteskwargs(opts))) |
277 paths = list(_matchpaths(repo, rev, pats, pycompat.byteskwargs(opts))) |
278 repo.prefetchfastannotate(paths) |
278 repo.prefetchfastannotate(paths) |
279 |
279 |
280 return orig(ui, repo, *pats, **opts) |
280 return orig(ui, repo, *pats, **opts) |
281 |
281 |
318 if ui.configbool(b'fastannotate', b'unfilteredrepo'): |
318 if ui.configbool(b'fastannotate', b'unfilteredrepo'): |
319 repo = repo.unfiltered() |
319 repo = repo.unfiltered() |
320 ctx = scmutil.revsingle(repo, rev) |
320 ctx = scmutil.revsingle(repo, rev) |
321 m = scmutil.match(ctx, pats, opts) |
321 m = scmutil.match(ctx, pats, opts) |
322 paths = list(ctx.walk(m)) |
322 paths = list(ctx.walk(m)) |
323 if util.safehasattr(repo, b'prefetchfastannotate'): |
323 if util.safehasattr(repo, 'prefetchfastannotate'): |
324 # client |
324 # client |
325 if opts.get(b'REV'): |
325 if opts.get(b'REV'): |
326 raise error.Abort(_(b'--rev cannot be used for client')) |
326 raise error.Abort(_(b'--rev cannot be used for client')) |
327 repo.prefetchfastannotate(paths) |
327 repo.prefetchfastannotate(paths) |
328 else: |
328 else: |