##// END OF EJS Templates
dirstate-item: use item's property instead of `state` in copy...
marmoute -
r48914:304267b0 default
parent child Browse files
Show More
@@ -1642,7 +1642,9 b' def copy(ui, repo, pats, opts, rename=Fa'
1642 reltarget = repo.pathto(abstarget, cwd)
1642 reltarget = repo.pathto(abstarget, cwd)
1643 target = repo.wjoin(abstarget)
1643 target = repo.wjoin(abstarget)
1644 src = repo.wjoin(abssrc)
1644 src = repo.wjoin(abssrc)
1645 state = repo.dirstate[abstarget]
1645 entry = repo.dirstate.get_entry(abstarget)
1646
1647 already_commited = entry.tracked and not entry.added
1646
1648
1647 scmutil.checkportable(ui, abstarget)
1649 scmutil.checkportable(ui, abstarget)
1648
1650
@@ -1672,9 +1674,9 b' def copy(ui, repo, pats, opts, rename=Fa'
1672 exists = False
1674 exists = False
1673 samefile = True
1675 samefile = True
1674
1676
1675 if not after and exists or after and state in b'mn':
1677 if not after and exists or after and already_commited:
1676 if not opts[b'force']:
1678 if not opts[b'force']:
1677 if state in b'mn':
1679 if already_commited:
1678 msg = _(b'%s: not overwriting - file already committed\n')
1680 msg = _(b'%s: not overwriting - file already committed\n')
1679 if after:
1681 if after:
1680 flags = b'--after --force'
1682 flags = b'--after --force'
General Comments 0
You need to be logged in to leave comments. Login now