# HG changeset patch # User Augie Fackler # Date 1512404909 18000 # Node ID 15d38e8fcb1ec963584509b4ace582d9cbc04530 # Parent 9153871d50e036c88ef1e82c16075084371ad808# Parent 759234670d19c6834e999c5efcef75626ca8f543 merge with stable diff -r 9153871d50e0 -r 15d38e8fcb1e hgext/convert/bzr.py --- a/hgext/convert/bzr.py Wed Nov 29 20:39:59 2017 -0500 +++ b/hgext/convert/bzr.py Mon Dec 04 11:28:29 2017 -0500 @@ -205,6 +205,13 @@ changes = [] renames = {} seen = set() + + # Fall back to the deprecated attribute for legacy installations. + try: + inventory = origin.root_inventory + except AttributeError: + inventory = origin.inventory + # Process the entries by reverse lexicographic name order to # handle nested renames correctly, most specific first. curchanges = sorted(current.iter_changes(origin), @@ -229,10 +236,9 @@ renaming = paths[0] != paths[1] # neither an add nor an delete - a move # rename all directory contents manually - subdir = origin.root_inventory.path2id(paths[0]) + subdir = inventory.path2id(paths[0]) # get all child-entries of the directory - for name, entry in origin.root_inventory.iter_entries( - subdir): + for name, entry in inventory.iter_entries(subdir): # hg does not track directory renames if entry.kind == 'directory': continue