changeset 29612:a234b32b744a stable

convert: update use of deprecated bzrlib property The inventory property was deprecated in favor of root_inventory in bzr 2.5.0. Current version is 2.7.0. I noticed this when testing locally on Python 2.6.9, which has warnings turned on by default. The failure that occurs without this patch can be seen on Python 2.7 by running with warnings enabled: $ PYTHONWARNINGS=::DeprecationWarning make 'test-convert-bzr*'
author Kevin Bullock <kbullock+mercurial@ringworld.org>
date Tue, 19 Jul 2016 11:00:32 -0500
parents 334632380e22
children 616cbcb59e05
files hgext/convert/bzr.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/bzr.py	Tue Jul 19 21:16:44 2016 +0900
+++ b/hgext/convert/bzr.py	Tue Jul 19 11:00:32 2016 -0500
@@ -228,9 +228,10 @@
                     renaming = paths[0] != paths[1]
                     # neither an add nor an delete - a move
                     # rename all directory contents manually
-                    subdir = origin.inventory.path2id(paths[0])
+                    subdir = origin.root_inventory.path2id(paths[0])
                     # get all child-entries of the directory
-                    for name, entry in origin.inventory.iter_entries(subdir):
+                    for name, entry in origin.root_inventory.iter_entries(
+                            subdir):
                         # hg does not track directory renames
                         if entry.kind == 'directory':
                             continue