diff -r a7582980d654 -r ba0b2dacc623 mercurial/patch.py --- a/mercurial/patch.py Sat Apr 12 21:08:03 2008 +0200 +++ b/mercurial/patch.py Sat Apr 12 22:41:07 2008 -0400 @@ -789,7 +789,7 @@ pathlen = len(path) i = 0 if count == 0: - return path.rstrip() + return '', path.rstrip() while count > 0: i = path.find('/', i) if i == -1: