mercurial/patch.py
changeset 7570 e05aa73ce2b7
parent 7547 4949729ee9ee
child 7572 4f58147ea829
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':