diff -r 28642f7fc2cf -r b6173aee4a47 mercurial/patch.py --- a/mercurial/patch.py Mon Sep 20 21:46:39 2010 +0200 +++ b/mercurial/patch.py Mon Sep 20 21:46:56 2010 +0200 @@ -1230,7 +1230,7 @@ islink, isexec = gp.mode dst = repo.wjoin(gp.path) # patch won't create empty files - if gp.op == 'ADD' and not os.path.exists(dst): + if gp.op == 'ADD' and not os.path.lexists(dst): flags = (isexec and 'x' or '') + (islink and 'l' or '') repo.wwrite(gp.path, '', flags) util.set_flags(dst, islink, isexec)