comparison mercurial/context.py @ 43633:0b7733719d21

utils: move finddirs() to pathutil This is a follow-up to c21aca51b392 (utils: move the `dirs` definition in pathutil (API), 2019-11-06). finddirs() is closely related to dirs and used by it. Differential Revision: https://phab.mercurial-scm.org/D7388
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 14 Nov 2019 08:03:26 -0800
parents 9f70512ae2cf
children e035a8f71d52
comparison
equal deleted inserted replaced
43632:2e017696181f 43633:0b7733719d21
2078 ): 2078 ):
2079 # remove files under the directory as they should already be 2079 # remove files under the directory as they should already be
2080 # warned and backed up 2080 # warned and backed up
2081 if wvfs.isdir(f) and not wvfs.islink(f): 2081 if wvfs.isdir(f) and not wvfs.islink(f):
2082 wvfs.rmtree(f, forcibly=True) 2082 wvfs.rmtree(f, forcibly=True)
2083 for p in reversed(list(util.finddirs(f))): 2083 for p in reversed(list(pathutil.finddirs(f))):
2084 if wvfs.isfileorlink(p): 2084 if wvfs.isfileorlink(p):
2085 wvfs.unlink(p) 2085 wvfs.unlink(p)
2086 break 2086 break
2087 else: 2087 else:
2088 # don't remove files if path conflicts are not processed 2088 # don't remove files if path conflicts are not processed