equal
deleted
inserted
replaced
1133 targets = {} |
1133 targets = {} |
1134 after = opts.get("after") |
1134 after = opts.get("after") |
1135 dryrun = opts.get("dry_run") |
1135 dryrun = opts.get("dry_run") |
1136 wctx = repo[None] |
1136 wctx = repo[None] |
1137 |
1137 |
|
1138 uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) |
1138 def walkpat(pat): |
1139 def walkpat(pat): |
1139 srcs = [] |
1140 srcs = [] |
1140 if after: |
1141 if after: |
1141 badstates = '?' |
1142 badstates = '?' |
1142 else: |
1143 else: |
1143 badstates = '?r' |
1144 badstates = '?r' |
1144 m = scmutil.match(wctx, [pat], opts, globbed=True) |
1145 m = scmutil.match(wctx, [pat], opts, globbed=True) |
1145 for abs in wctx.walk(m): |
1146 for abs in wctx.walk(m): |
1146 state = repo.dirstate[abs] |
1147 state = repo.dirstate[abs] |
1147 rel = m.rel(abs) |
1148 rel = uipathfn(abs) |
1148 exact = m.exact(abs) |
1149 exact = m.exact(abs) |
1149 if state in badstates: |
1150 if state in badstates: |
1150 if exact and state == '?': |
1151 if exact and state == '?': |
1151 ui.warn(_('%s: not copying - file is not managed\n') % rel) |
1152 ui.warn(_('%s: not copying - file is not managed\n') % rel) |
1152 if exact and state == 'r': |
1153 if exact and state == 'r': |