Show More
@@ -1419,32 +1419,35 b' def copy(ui, repo, pats, opts, rename=Fa' | |||||
1419 | after = opts.get(b"after") |
|
1419 | after = opts.get(b"after") | |
1420 | dryrun = opts.get(b"dry_run") |
|
1420 | dryrun = opts.get(b"dry_run") | |
1421 | wctx = repo[None] |
|
1421 | wctx = repo[None] | |
|
1422 | pctx = wctx.p1() | |||
1422 |
|
1423 | |||
1423 | uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) |
|
1424 | uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) | |
1424 |
|
1425 | |||
1425 | def walkpat(pat): |
|
1426 | def walkpat(pat): | |
1426 | srcs = [] |
|
1427 | srcs = [] | |
1427 | if after: |
|
|||
1428 | badstates = b'?' |
|
|||
1429 | else: |
|
|||
1430 | badstates = b'?r' |
|
|||
1431 | m = scmutil.match(wctx, [pat], opts, globbed=True) |
|
1428 | m = scmutil.match(wctx, [pat], opts, globbed=True) | |
1432 | for abs in wctx.walk(m): |
|
1429 | for abs in wctx.walk(m): | |
1433 | state = repo.dirstate[abs] |
|
|||
1434 | rel = uipathfn(abs) |
|
1430 | rel = uipathfn(abs) | |
1435 | exact = m.exact(abs) |
|
1431 | exact = m.exact(abs) | |
1436 |
if |
|
1432 | if abs not in wctx: | |
1437 |
if |
|
1433 | if abs in pctx: | |
1438 | ui.warn(_(b'%s: not copying - file is not managed\n') % rel) |
|
1434 | if not after: | |
1439 |
if exact |
|
1435 | if exact: | |
1440 | ui.warn( |
|
1436 | ui.warn( | |
1441 | _( |
|
1437 | _( | |
1442 |
b'%s: not copying - file has been marked |
|
1438 | b'%s: not copying - file has been marked ' | |
1443 | b' remove\n' |
|
1439 | b'for remove\n' | |
|
1440 | ) | |||
|
1441 | % rel | |||
|
1442 | ) | |||
|
1443 | continue | |||
|
1444 | else: | |||
|
1445 | if exact: | |||
|
1446 | ui.warn( | |||
|
1447 | _(b'%s: not copying - file is not managed\n') % rel | |||
1444 | ) |
|
1448 | ) | |
1445 |
|
|
1449 | continue | |
1446 | ) |
|
1450 | ||
1447 | continue |
|
|||
1448 | # abs: hgsep |
|
1451 | # abs: hgsep | |
1449 | # rel: ossep |
|
1452 | # rel: ossep | |
1450 | srcs.append((abs, rel, exact)) |
|
1453 | srcs.append((abs, rel, exact)) |
General Comments 0
You need to be logged in to leave comments.
Login now