Mercurial > public > mercurial-scm > hg-stable
diff mercurial/changelog.py @ 4209:dbc3846c09a1
Merge with -stable, fix small test failure
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 14 Mar 2007 01:26:09 -0500 |
parents | 6b4127c7d52a f9bbcebcacea |
children | 1b5c38e9d7aa |
line wrap: on
line diff
--- a/mercurial/changelog.py Tue Mar 13 21:54:34 2007 -0700 +++ b/mercurial/changelog.py Wed Mar 14 01:26:09 2007 -0500 @@ -58,7 +58,7 @@ changelog v0 doesn't use extra """ if not text: - return (nullid, "", (0, 0), [], "", {}) + return (nullid, "", (0, 0), [], "", {'branch': 'default'}) last = text.index("\n\n") desc = util.tolocal(text[last + 2:]) l = text[:last].split('\n') @@ -78,6 +78,8 @@ time, timezone, extra = extra_data time, timezone = float(time), int(timezone) extra = self.decode_extra(extra) + if not extra.get('branch'): + extra['branch'] = 'default' files = l[3:] return (manifest, user, (time, timezone), files, desc, extra) @@ -93,6 +95,8 @@ parseddate = "%d %d" % util.parsedate(date) else: parseddate = "%d %d" % util.makedate() + if extra and extra.get("branch") in ("default", ""): + del extra["branch"] if extra: extra = self.encode_extra(extra) parseddate = "%s %s" % (parseddate, extra)