diff --git a/hgext/convert/common.py b/hgext/convert/common.py --- a/hgext/convert/common.py +++ b/hgext/convert/common.py @@ -384,7 +384,7 @@ class mapfile(dict): return for i, line in enumerate(fp): try: - key, value = line.splitlines()[0].rsplit(' ', 1) + key, value = line.splitlines()[0].rstrip().rsplit(' ', 1) except ValueError: raise util.Abort( _('syntax error in %s(%d): key/value pair expected') diff --git a/tests/test-convert-splicemap.t b/tests/test-convert-splicemap.t --- a/tests/test-convert-splicemap.t +++ b/tests/test-convert-splicemap.t @@ -49,7 +49,7 @@ test invalid splicemap splice repo2 on repo1 $ cat > splicemap < $CHILDID1 $PARENTID1 + > $CHILDID1 $PARENTID1 > $CHILDID2 $PARENTID2,$CHILDID1 > EOF $ hg clone repo1 target1