Mercurial > hg
changeset 4922:020ee9c781cf
patch: fix normalized paths separators.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Tue, 17 Jul 2007 23:34:52 +0200 |
parents | 8a53b39cd402 |
children | 59b8ff35c4ed |
files | mercurial/patch.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/patch.py Tue Jul 17 23:33:42 2007 +0200 +++ b/mercurial/patch.py Tue Jul 17 23:34:52 2007 +0200 @@ -777,13 +777,13 @@ if count == 0: return path.rstrip() while count > 0: - i = path.find(os.sep, i) + i = path.find('/', i) if i == -1: raise PatchError(_("unable to strip away %d dirs from %s") % (count, path)) i += 1 # consume '//' in the path - while i < pathlen - 1 and path[i] == os.sep: + while i < pathlen - 1 and path[i] == '/': i += 1 count -= 1 return path[i:].rstrip()