comparison hgext/narrow/narrowcommands.py @ 51276:03665fd8ccb9

narrow: strip trailing `/` from manifest dir before matching it Commit 17a822d7943e broke some of our internal tests at Google because the `dir` variable contains a trailing slash since that commit. Let's restore the old behavior by stripping that trailing slash.
author Martin von Zweigbergk <martinvonz@google.com>
date Sat, 16 Dec 2023 10:48:20 -0800
parents 75b90a8eb168
children f4733654f144
comparison
equal deleted inserted replaced
51275:39f7b2b53c68 51276:03665fd8ccb9
294 if entry.is_filelog: 294 if entry.is_filelog:
295 if not newmatch(entry.target_id): 295 if not newmatch(entry.target_id):
296 for file_ in entry.files(): 296 for file_ in entry.files():
297 todelete.append(file_.unencoded_path) 297 todelete.append(file_.unencoded_path)
298 elif entry.is_manifestlog: 298 elif entry.is_manifestlog:
299 dir = entry.target_id 299 dir = entry.target_id[:-1]
300 dirs = sorted(pathutil.dirs({dir})) + [dir] 300 dirs = sorted(pathutil.dirs({dir})) + [dir]
301 include = True 301 include = True
302 for d in dirs: 302 for d in dirs:
303 visit = newmatch.visitdir(d) 303 visit = newmatch.visitdir(d)
304 if not visit: 304 if not visit: