# HG changeset patch # User Mads Kiilerich # Date 1489346250 25200 # Node ID 7dd2f51f38ac224cec522d093ff6f805beb0dd3e # Parent 906be86990c4b445366090b29eb46f5045e8f170 rbc: empty (and invalid) rbc-names file should give an empty name list An empty file (if it somehow should exist) used to give a list with an empty name. That didn't do any harm, but it was "wrong". Fix that. diff -r 906be86990c4 -r 7dd2f51f38ac mercurial/branchmap.py --- a/mercurial/branchmap.py Wed Oct 19 02:46:35 2016 +0200 +++ b/mercurial/branchmap.py Sun Mar 12 12:17:30 2017 -0700 @@ -360,7 +360,9 @@ try: bndata = repo.vfs.read(_rbcnames) self._rbcsnameslen = len(bndata) # for verification before writing - self._names = [encoding.tolocal(bn) for bn in bndata.split('\0')] + if bndata: + self._names = [encoding.tolocal(bn) + for bn in bndata.split('\0')] except (IOError, OSError): if readonly: # don't try to use cache - fall back to the slow path