comparison mercurial/subrepo.py @ 16595:2de6ac4ac17c stable

subrepo: ignore blank lines in .hgsubstate (issue3424) Reported by Sebastian Krysmanski <infomail@lordb.de>
author Patrick Mezard <patrick@mezard.eu>
date Fri, 04 May 2012 14:19:52 +0200
parents 4955e7bf085c
children 95ca6c8b38da
comparison
equal deleted inserted replaced
16594:5516fdf3fe24 16595:2de6ac4ac17c
42 42
43 rev = {} 43 rev = {}
44 if '.hgsubstate' in ctx: 44 if '.hgsubstate' in ctx:
45 try: 45 try:
46 for l in ctx['.hgsubstate'].data().splitlines(): 46 for l in ctx['.hgsubstate'].data().splitlines():
47 l = l.lstrip()
48 if not l:
49 continue
47 revision, path = l.split(" ", 1) 50 revision, path = l.split(" ", 1)
48 rev[path] = revision 51 rev[path] = revision
49 except IOError, err: 52 except IOError, err:
50 if err.errno != errno.ENOENT: 53 if err.errno != errno.ENOENT:
51 raise 54 raise