comparison tests/drawdag.py @ 37528: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
comparison
equal deleted inserted replaced
37484:52b344e977b7 37528:4e41b59633fa
369 # parse comments to get extra file content instructions 369 # parse comments to get extra file content instructions
370 files = collections.defaultdict(dict) # {(name, path): content} 370 files = collections.defaultdict(dict) # {(name, path): content}
371 comments = list(_getcomments(text)) 371 comments = list(_getcomments(text))
372 filere = re.compile(br'^(\w+)/([\w/]+)\s*=\s*(.*)$', re.M) 372 filere = re.compile(br'^(\w+)/([\w/]+)\s*=\s*(.*)$', re.M)
373 for name, path, content in filere.findall(b'\n'.join(comments)): 373 for name, path, content in filere.findall(b'\n'.join(comments)):
374 files[name][path] = content.replace(br'\n', b'\n') 374 content = content.replace(br'\n', b'\n').replace(br'\1', b'\1')
375 files[name][path] = content
375 376
376 committed = {None: node.nullid} # {name: node} 377 committed = {None: node.nullid} # {name: node}
377 378
378 # for leaf nodes, try to find existing nodes in repo 379 # for leaf nodes, try to find existing nodes in repo
379 for name, parents in edges.items(): 380 for name, parents in edges.items():