comparison mercurial/subrepo.py @ 15911:c654eac03452

add: fix subrepo recursion for explicit path handling When support for handling explicit paths in subrepos was added to the add command (9e99d2bbb1b1), subrepo recursion wasn't taken into account. This change adds an explicitonly argument to cmdutil.add to allow controlling which levels of recursion should include only explicit paths versus all matched paths.
author David M. Carr <david@carrclan.us>
date Tue, 17 Jan 2012 19:10:58 -0500
parents 4bc715f2a356
children 2bd54ffaa27e
comparison
equal deleted inserted replaced
15910:2b8d5c55ae67 15911:c654eac03452
308 308
309 This may be a no-op on some systems. 309 This may be a no-op on some systems.
310 """ 310 """
311 raise NotImplementedError 311 raise NotImplementedError
312 312
313 def add(self, ui, match, dryrun, prefix): 313 def add(self, ui, match, dryrun, listsubrepos, prefix, explicitonly):
314 return [] 314 return []
315 315
316 def status(self, rev2, **opts): 316 def status(self, rev2, **opts):
317 return [], [], [], [], [], [], [] 317 return [], [], [], [], [], [], []
318 318
394 addpathconfig('default', defpath) 394 addpathconfig('default', defpath)
395 if defpath != defpushpath: 395 if defpath != defpushpath:
396 addpathconfig('default-push', defpushpath) 396 addpathconfig('default-push', defpushpath)
397 fp.close() 397 fp.close()
398 398
399 def add(self, ui, match, dryrun, prefix): 399 def add(self, ui, match, dryrun, listsubrepos, prefix, explicitonly):
400 return cmdutil.add(ui, self._repo, match, dryrun, True, 400 return cmdutil.add(ui, self._repo, match, dryrun, listsubrepos,
401 os.path.join(prefix, self._path)) 401 os.path.join(prefix, self._path), explicitonly)
402 402
403 def status(self, rev2, **opts): 403 def status(self, rev2, **opts):
404 try: 404 try:
405 rev1 = self._state[1] 405 rev1 = self._state[1]
406 ctx1 = self._repo[rev1] 406 ctx1 = self._repo[rev1]