mercurial/patch.py
branchstable
changeset 12344 b6173aee4a47
parent 12341 aca8b10bca6e
child 12345 e0ee3e822a9a
child 12574 77600d697d0e
equal deleted inserted replaced
12343:28642f7fc2cf 12344:b6173aee4a47
  1228         gp = patches[f]
  1228         gp = patches[f]
  1229         if gp and gp.mode:
  1229         if gp and gp.mode:
  1230             islink, isexec = gp.mode
  1230             islink, isexec = gp.mode
  1231             dst = repo.wjoin(gp.path)
  1231             dst = repo.wjoin(gp.path)
  1232             # patch won't create empty files
  1232             # patch won't create empty files
  1233             if gp.op == 'ADD' and not os.path.exists(dst):
  1233             if gp.op == 'ADD' and not os.path.lexists(dst):
  1234                 flags = (isexec and 'x' or '') + (islink and 'l' or '')
  1234                 flags = (isexec and 'x' or '') + (islink and 'l' or '')
  1235                 repo.wwrite(gp.path, '', flags)
  1235                 repo.wwrite(gp.path, '', flags)
  1236             util.set_flags(dst, islink, isexec)
  1236             util.set_flags(dst, islink, isexec)
  1237     cmdutil.addremove(repo, cfiles, similarity=similarity)
  1237     cmdutil.addremove(repo, cfiles, similarity=similarity)
  1238     files = patches.keys()
  1238     files = patches.keys()