diff tests/drawdag.py @ 36742:4e41b59633fa stable

lfs: add a test showing bundle application could be broken When a bundle containing LFS delta uses non-LFS delta-base, or vice-versa, the bundle will fail to apply. Differential Revision: https://phab.mercurial-scm.org/D2066
author Jun Wu <quark@fb.com>
date Tue, 06 Feb 2018 16:08:57 -0800
parents 5a1b41268b7c
children 9a813e4c8406
line wrap: on
line diff
--- a/tests/drawdag.py	Sun Mar 04 14:53:57 2018 -0500
+++ b/tests/drawdag.py	Tue Feb 06 16:08:57 2018 -0800
@@ -371,7 +371,8 @@
     comments = list(_getcomments(text))
     filere = re.compile(br'^(\w+)/([\w/]+)\s*=\s*(.*)$', re.M)
     for name, path, content in filere.findall(b'\n'.join(comments)):
-        files[name][path] = content.replace(br'\n', b'\n')
+        content = content.replace(br'\n', b'\n').replace(br'\1', b'\1')
+        files[name][path] = content
 
     committed = {None: node.nullid}  # {name: node}