# HG changeset patch # User Martin von Zweigbergk # Date 1559840834 25200 # Node ID 027f1567f97fa094a43f9d99e821b57cf44520b8 # Parent a1f87294471fa58c9d4c28940fd170a7c62c451c 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 diff -r a1f87294471f -r 027f1567f97f mercurial/changelog.py --- 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 diff -r a1f87294471f -r 027f1567f97f tests/test-copies-in-changeset.t --- a/tests/test-copies-in-changeset.t Wed May 22 09:54:00 2019 -0700 +++ b/tests/test-copies-in-changeset.t Thu Jun 06 10:07:14 2019 -0700 @@ -25,7 +25,9 @@ $ hg ci -m 'copy a to b, c, and d' $ hg changesetcopies files: b c d - filesadded: 0\x001\x002 (esc) + filesadded: 0 + 1 + 2 p1copies: 0\x00a (esc) 1\x00a (esc) @@ -95,7 +97,9 @@ $ hg ci -m 'merge' $ hg changesetcopies files: g h i - filesadded: 0\x001\x002 (esc) + filesadded: 0 + 1 + 2 p1copies: 0\x00a (esc) 2\x00f (esc) diff -r a1f87294471f -r 027f1567f97f tests/test-copies.t --- a/tests/test-copies.t Wed May 22 09:54:00 2019 -0700 +++ b/tests/test-copies.t Thu Jun 06 10:07:14 2019 -0700 @@ -620,7 +620,7 @@ $ hg rebase -r . -d 2 -t :other rebasing 5:5018b1509e94 "added willconflict and d" (tip) (no-changeset !) - rebasing 5:619047c26bf8 "added willconflict and d" (tip) (changeset !) + rebasing 5:af8d273bf580 "added willconflict and d" (tip) (changeset !) $ hg up 3 -q $ hg l --hidden @@ -644,4 +644,4 @@ $ hg graft -r 6 --base 4 --hidden -t :other grafting 6:99802e4f1e46 "added willconflict and d" (tip) (no-changeset !) - grafting 6:9ddc6fb3b691 "added willconflict and d" (tip) (changeset !) + grafting 6:b19f0df72728 "added willconflict and d" (tip) (changeset !)