diff -r 5516fdf3fe24 -r 2de6ac4ac17c mercurial/subrepo.py --- a/mercurial/subrepo.py Fri May 04 14:36:40 2012 -0400 +++ b/mercurial/subrepo.py Fri May 04 14:19:52 2012 +0200 @@ -44,6 +44,9 @@ if '.hgsubstate' in ctx: try: for l in ctx['.hgsubstate'].data().splitlines(): + l = l.lstrip() + if not l: + continue revision, path = l.split(" ", 1) rev[path] = revision except IOError, err: