changeset 4006 | 67982d3ee76c |
parent 3996 | c190df14338c |
child 4096 | 49237d6ae97d |
--- a/mercurial/patch.py Fri Dec 29 20:04:31 2006 -0600 +++ b/mercurial/patch.py Fri Dec 29 20:04:31 2006 -0600 @@ -377,8 +377,9 @@ dst = os.path.join(repo.root, gp.path) # patch won't create empty files if ctype == 'ADD' and not os.path.exists(dst): - repo.wwrite(gp.path, '') - util.set_exec(dst, x) + repo.wwrite(gp.path, '', x and 'x' or '') + else: + util.set_exec(dst, x) cmdutil.addremove(repo, cfiles, wlock=wlock) files = patches.keys() files.extend([r for r in removes if r not in files])