Mercurial > hg
comparison mercurial/patch.py @ 7570:e05aa73ce2b7
use repo.wjoin(f) instead of os.path.join(repo.root, f)
author | Martin Geisler <mg@daimi.au.dk> |
---|---|
date | Fri, 02 Jan 2009 22:53:33 +0100 |
parents | 4949729ee9ee |
children | 4f58147ea829 |
comparison
equal
deleted
inserted
replaced
7559:016a7319e76b | 7570:e05aa73ce2b7 |
---|---|
1055 repo.remove(util.sort(removes), True) | 1055 repo.remove(util.sort(removes), True) |
1056 for f in patches: | 1056 for f in patches: |
1057 gp = patches[f] | 1057 gp = patches[f] |
1058 if gp and gp.mode: | 1058 if gp and gp.mode: |
1059 islink, isexec = gp.mode | 1059 islink, isexec = gp.mode |
1060 dst = os.path.join(repo.root, gp.path) | 1060 dst = repo.wjoin(gp.path) |
1061 # patch won't create empty files | 1061 # patch won't create empty files |
1062 if gp.op == 'ADD' and not os.path.exists(dst): | 1062 if gp.op == 'ADD' and not os.path.exists(dst): |
1063 flags = (isexec and 'x' or '') + (islink and 'l' or '') | 1063 flags = (isexec and 'x' or '') + (islink and 'l' or '') |
1064 repo.wwrite(gp.path, '', flags) | 1064 repo.wwrite(gp.path, '', flags) |
1065 elif gp.op != 'DELETE': | 1065 elif gp.op != 'DELETE': |