diff -r b9bf36905b55 -r 127a624406b4 mercurial/patch.py --- a/mercurial/patch.py Fri Oct 24 16:20:53 2008 +0200 +++ b/mercurial/patch.py Fri Oct 24 20:46:56 2008 +0200 @@ -31,9 +31,8 @@ raise util.Abort(_("cannot create %s: destination already exists") % dst) - targetdir = os.path.dirname(absdst) - if not os.path.isdir(targetdir): - os.makedirs(targetdir) + if not os.path.isdir(basedir): + os.makedirs(basedir) util.copyfile(abssrc, absdst)