Mercurial > public > mercurial-scm > hg-stable
diff mercurial/changelog.py @ 42443:027f1567f97f
copies: separate added/removed files by newline instead of null
This makes it more consistent with how we encode copies
(newline-separated lists of null-separated pairs). This perhaps makes
{extras} a little less readable (?) despite avoiding the escaping. I
don't know how I feel about this patch. I'm okay with it being queued
or dropped.
Differential Revision: https://phab.mercurial-scm.org/D6486
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 06 Jun 2019 10:07:14 -0700 |
parents | a1f87294471f |
children | 055c3e2c44f0 |
line wrap: on
line diff
--- a/mercurial/changelog.py Wed May 22 09:54:00 2019 -0700 +++ b/mercurial/changelog.py Thu Jun 06 10:07:14 2019 -0700 @@ -109,12 +109,12 @@ for i, f in enumerate(files): if f in subset: indices.append('%d' % i) - return '\0'.join(indices) + return '\n'.join(indices) def decodefileindices(files, data): try: subset = [] - for strindex in data.split('\0'): + for strindex in data.split('\n'): i = int(strindex) if i < 0 or i >= len(files): return None