diff -r 1c00577b0298 -r 75de514a50f3 mercurial/patch.py --- a/mercurial/patch.py Thu Aug 05 12:25:53 2010 +0200 +++ b/mercurial/patch.py Thu Aug 12 17:58:03 2010 +0200 @@ -927,8 +927,8 @@ createfunc = hunk.createfile missing = not goodb and not gooda and not createfunc() - # some diff programs apparently produce create patches where the - # afile is not /dev/null, but afile starts with bfile + # some diff programs apparently produce patches where the afile is + # not /dev/null, but afile starts with bfile abasedir = afile[:afile.rfind('/') + 1] bbasedir = bfile[:bfile.rfind('/') + 1] if missing and abasedir == bbasedir and afile.startswith(bfile):