equal
deleted
inserted
replaced
1469 """strip a group of nodes from the repository |
1469 """strip a group of nodes from the repository |
1470 |
1470 |
1471 The set of node to strip may contains unknown nodes.""" |
1471 The set of node to strip may contains unknown nodes.""" |
1472 ui.debug('should strip %s nodes %s\n' % |
1472 ui.debug('should strip %s nodes %s\n' % |
1473 (name, ', '.join([node.short(n) for n in nodes]))) |
1473 (name, ', '.join([node.short(n) for n in nodes]))) |
1474 lock = None |
1474 with repo.lock(): |
1475 try: |
|
1476 lock = repo.lock() |
|
1477 # do not let filtering get in the way of the cleanse |
1475 # do not let filtering get in the way of the cleanse |
1478 # we should probably get rid of obsolescence marker created during the |
1476 # we should probably get rid of obsolescence marker created during the |
1479 # histedit, but we currently do not have such information. |
1477 # histedit, but we currently do not have such information. |
1480 repo = repo.unfiltered() |
1478 repo = repo.unfiltered() |
1481 # Find all nodes that need to be stripped |
1479 # Find all nodes that need to be stripped |
1486 for c in roots: |
1484 for c in roots: |
1487 # We should process node in reverse order to strip tip most first. |
1485 # We should process node in reverse order to strip tip most first. |
1488 # but this trigger a bug in changegroup hook. |
1486 # but this trigger a bug in changegroup hook. |
1489 # This would reduce bundle overhead |
1487 # This would reduce bundle overhead |
1490 repair.strip(ui, repo, c) |
1488 repair.strip(ui, repo, c) |
1491 finally: |
|
1492 release(lock) |
|
1493 |
1489 |
1494 def stripwrapper(orig, ui, repo, nodelist, *args, **kwargs): |
1490 def stripwrapper(orig, ui, repo, nodelist, *args, **kwargs): |
1495 if isinstance(nodelist, str): |
1491 if isinstance(nodelist, str): |
1496 nodelist = [nodelist] |
1492 nodelist = [nodelist] |
1497 if os.path.exists(os.path.join(repo.path, 'histedit-state')): |
1493 if os.path.exists(os.path.join(repo.path, 'histedit-state')): |