##// END OF EJS Templates
revert: move code dealing with deletions closer together
Martin von Zweigbergk -
r31157:accdd5e6 default
parent child Browse files
Show More
@@ -2976,13 +2976,6 b' def revert(ui, repo, ctx, parents, *pats'
2976 clean = set(changes.clean)
2976 clean = set(changes.clean)
2977 modadded = set()
2977 modadded = set()
2978
2978
2979 # determine the exact nature of the deleted changesets
2980 deladded = set(_deleted)
2981 for path in _deleted:
2982 if path in mf:
2983 deladded.remove(path)
2984 deleted = _deleted - deladded
2985
2986 # We need to account for the state of the file in the dirstate,
2979 # We need to account for the state of the file in the dirstate,
2987 # even when we revert against something else than parent. This will
2980 # even when we revert against something else than parent. This will
2988 # slightly alter the behavior of revert (doing back up or not, delete
2981 # slightly alter the behavior of revert (doing back up or not, delete
@@ -3040,6 +3033,13 b' def revert(ui, repo, ctx, parents, *pats'
3040 dsremoved.add(src)
3033 dsremoved.add(src)
3041 names[src] = (repo.pathto(src, cwd), True)
3034 names[src] = (repo.pathto(src, cwd), True)
3042
3035
3036 # determine the exact nature of the deleted changesets
3037 deladded = set(_deleted)
3038 for path in _deleted:
3039 if path in mf:
3040 deladded.remove(path)
3041 deleted = _deleted - deladded
3042
3043 # distinguish between file to forget and the other
3043 # distinguish between file to forget and the other
3044 added = set()
3044 added = set()
3045 for abs in dsadded:
3045 for abs in dsadded:
General Comments 0
You need to be logged in to leave comments. Login now