equal
deleted
inserted
replaced
3331 ret = 1 |
3331 ret = 1 |
3332 m = scmutil.match(ctx, pats, opts, default='relglob', |
3332 m = scmutil.match(ctx, pats, opts, default='relglob', |
3333 badfn=lambda x, y: False) |
3333 badfn=lambda x, y: False) |
3334 |
3334 |
3335 ui.pager('locate') |
3335 ui.pager('locate') |
3336 for abs in ctx.matches(m): |
3336 if ctx.rev() is None: |
|
3337 # When run on the working copy, "locate" includes removed files, so |
|
3338 # we get the list of files from the dirstate. |
|
3339 filesgen = sorted(repo.dirstate.matches(m)) |
|
3340 else: |
|
3341 filesgen = ctx.matches(m) |
|
3342 for abs in filesgen: |
3337 if opts.get('fullpath'): |
3343 if opts.get('fullpath'): |
3338 ui.write(repo.wjoin(abs), end) |
3344 ui.write(repo.wjoin(abs), end) |
3339 else: |
3345 else: |
3340 ui.write(((pats and m.rel(abs)) or abs), end) |
3346 ui.write(((pats and m.rel(abs)) or abs), end) |
3341 ret = 0 |
3347 ret = 0 |