comparison mercurial/context.py @ 49292:d44e3c45f0e4

py3: replace `pycompat.xrange` by `range`
author Manuel Jacob <me@manueljacob.de>
date Sun, 29 May 2022 15:17:27 +0200
parents 5b65721a75eb
children 2e726c934fcd
comparison
equal deleted inserted replaced
49291:44b26349127b 49292:d44e3c45f0e4
30 metadata, 30 metadata,
31 obsolete as obsmod, 31 obsolete as obsmod,
32 patch, 32 patch,
33 pathutil, 33 pathutil,
34 phases, 34 phases,
35 pycompat,
36 repoview, 35 repoview,
37 scmutil, 36 scmutil,
38 sparse, 37 sparse,
39 subrepo, 38 subrepo,
40 subrepoutil, 39 subrepoutil,
2429 ) 2428 )
2430 2429
2431 # Test that each new directory to be created to write this path from p2 2430 # Test that each new directory to be created to write this path from p2
2432 # is not a file in p1. 2431 # is not a file in p1.
2433 components = path.split(b'/') 2432 components = path.split(b'/')
2434 for i in pycompat.xrange(len(components)): 2433 for i in range(len(components)):
2435 component = b"/".join(components[0:i]) 2434 component = b"/".join(components[0:i])
2436 if component in self: 2435 if component in self:
2437 fail(path, component) 2436 fail(path, component)
2438 2437
2439 # Test the other direction -- that this path from p2 isn't a directory 2438 # Test the other direction -- that this path from p2 isn't a directory