comparison mercurial/patch.py @ 11303:a1aad8333864

move working dir/dirstate methods from localrepo to workingctx
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Mon, 07 Jun 2010 20:03:32 +0200
parents 0429d0d49f92
children ad764a6a2eed
comparison
equal deleted inserted replaced
11302:e1dde7363601 11303:a1aad8333864
1224 removes.add(gp.oldpath) 1224 removes.add(gp.oldpath)
1225 elif gp.op == 'COPY': 1225 elif gp.op == 'COPY':
1226 copies.append((gp.oldpath, gp.path)) 1226 copies.append((gp.oldpath, gp.path))
1227 elif gp.op == 'DELETE': 1227 elif gp.op == 'DELETE':
1228 removes.add(gp.path) 1228 removes.add(gp.path)
1229
1230 wctx = repo[None]
1229 for src, dst in copies: 1231 for src, dst in copies:
1230 repo.copy(src, dst) 1232 wctx.copy(src, dst)
1231 if (not similarity) and removes: 1233 if (not similarity) and removes:
1232 repo.remove(sorted(removes), True) 1234 wctx.remove(sorted(removes), True)
1235
1233 for f in patches: 1236 for f in patches:
1234 gp = patches[f] 1237 gp = patches[f]
1235 if gp and gp.mode: 1238 if gp and gp.mode:
1236 islink, isexec = gp.mode 1239 islink, isexec = gp.mode
1237 dst = repo.wjoin(gp.path) 1240 dst = repo.wjoin(gp.path)