comparison hgext/convert/bzr.py @ 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 a0939666b836
children 6bda8a9d8431
comparison
equal deleted inserted replaced
29611:334632380e22 29612:a234b32b744a
226 226
227 if kind[0] == 'directory' and None not in paths: 227 if kind[0] == 'directory' and None not in paths:
228 renaming = paths[0] != paths[1] 228 renaming = paths[0] != paths[1]
229 # neither an add nor an delete - a move 229 # neither an add nor an delete - a move
230 # rename all directory contents manually 230 # rename all directory contents manually
231 subdir = origin.inventory.path2id(paths[0]) 231 subdir = origin.root_inventory.path2id(paths[0])
232 # get all child-entries of the directory 232 # get all child-entries of the directory
233 for name, entry in origin.inventory.iter_entries(subdir): 233 for name, entry in origin.root_inventory.iter_entries(
234 subdir):
234 # hg does not track directory renames 235 # hg does not track directory renames
235 if entry.kind == 'directory': 236 if entry.kind == 'directory':
236 continue 237 continue
237 frompath = self.recode(paths[0] + '/' + name) 238 frompath = self.recode(paths[0] + '/' + name)
238 if frompath in seen: 239 if frompath in seen: