diff -r 016a7319e76b -r e05aa73ce2b7 mercurial/patch.py --- a/mercurial/patch.py Wed Dec 31 18:00:35 2008 -0600 +++ b/mercurial/patch.py Fri Jan 02 22:53:33 2009 +0100 @@ -1057,7 +1057,7 @@ gp = patches[f] if gp and gp.mode: islink, isexec = gp.mode - dst = os.path.join(repo.root, gp.path) + dst = repo.wjoin(gp.path) # patch won't create empty files if gp.op == 'ADD' and not os.path.exists(dst): flags = (isexec and 'x' or '') + (islink and 'l' or '')