Mercurial > public > mercurial-scm > hg
comparison mercurial/subrepo.py @ 23325:4165cfd67519
remove: recurse into subrepositories with --subrepos/-S flag
Like 'forget', git and svn subrepos are currently not supported. Unfortunately
the name 'remove' is already used in the subrepo classes, so we break the
convention of naming the subrepo function after the command.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 15 Nov 2014 21:36:19 -0500 |
parents | 7d754b7acd55 |
children | 55525924af43 |
comparison
equal
deleted
inserted
replaced
23324:69f86b937035 | 23325:4165cfd67519 |
---|---|
499 pass | 499 pass |
500 | 500 |
501 def forget(self, ui, match, prefix): | 501 def forget(self, ui, match, prefix): |
502 return ([], []) | 502 return ([], []) |
503 | 503 |
504 def removefiles(self, ui, matcher, prefix, after, force, subrepos): | |
505 """remove the matched files from the subrepository and the filesystem, | |
506 possibly by force and/or after the file has been removed from the | |
507 filesystem. Return 0 on success, 1 on any warning. | |
508 """ | |
509 return 1 | |
510 | |
504 def revert(self, ui, substate, *pats, **opts): | 511 def revert(self, ui, substate, *pats, **opts): |
505 ui.warn('%s: reverting %s subrepos is unsupported\n' \ | 512 ui.warn('%s: reverting %s subrepos is unsupported\n' \ |
506 % (substate[0], substate[2])) | 513 % (substate[0], substate[2])) |
507 return [] | 514 return [] |
508 | 515 |
850 | 857 |
851 @annotatesubrepoerror | 858 @annotatesubrepoerror |
852 def forget(self, ui, match, prefix): | 859 def forget(self, ui, match, prefix): |
853 return cmdutil.forget(ui, self._repo, match, | 860 return cmdutil.forget(ui, self._repo, match, |
854 os.path.join(prefix, self._path), True) | 861 os.path.join(prefix, self._path), True) |
862 | |
863 @annotatesubrepoerror | |
864 def removefiles(self, ui, matcher, prefix, after, force, subrepos): | |
865 return cmdutil.remove(ui, self._repo, matcher, | |
866 os.path.join(prefix, self._path), after, force, | |
867 subrepos) | |
855 | 868 |
856 @annotatesubrepoerror | 869 @annotatesubrepoerror |
857 def revert(self, ui, substate, *pats, **opts): | 870 def revert(self, ui, substate, *pats, **opts): |
858 # reverting a subrepo is a 2 step process: | 871 # reverting a subrepo is a 2 step process: |
859 # 1. if the no_backup is not set, revert all modified | 872 # 1. if the no_backup is not set, revert all modified |