Show More
@@ -569,6 +569,11 b' class hgsubrepo(abstractsubrepo):' | |||||
569 |
|
569 | |||
570 | @annotatesubrepoerror |
|
570 | @annotatesubrepoerror | |
571 | def add(self, ui, match, prefix, uipathfn, explicitonly, **opts): |
|
571 | def add(self, ui, match, prefix, uipathfn, explicitonly, **opts): | |
|
572 | # XXX Ideally, we could let the caller take the `changing_files` | |||
|
573 | # context. However this is not an abstraction that make sense for | |||
|
574 | # other repository types, and leaking that details purely related to | |||
|
575 | # dirstate seems unfortunate. So for now the context will be used here. | |||
|
576 | with self._repo.wlock(), self._repo.dirstate.changing_files(self._repo): | |||
572 | return cmdutil.add( |
|
577 | return cmdutil.add( | |
573 | ui, |
|
578 | ui, | |
574 | self._repo, |
|
579 | self._repo, | |
@@ -586,7 +591,18 b' class hgsubrepo(abstractsubrepo):' | |||||
586 | # be used to process sibling subrepos however. |
|
591 | # be used to process sibling subrepos however. | |
587 | opts = copy.copy(opts) |
|
592 | opts = copy.copy(opts) | |
588 | opts[b'subrepos'] = True |
|
593 | opts[b'subrepos'] = True | |
589 | return scmutil.addremove(self._repo, m, prefix, uipathfn, opts) |
|
594 | # XXX Ideally, we could let the caller take the `changing_files` | |
|
595 | # context. However this is not an abstraction that make sense for | |||
|
596 | # other repository types, and leaking that details purely related to | |||
|
597 | # dirstate seems unfortunate. So for now the context will be used here. | |||
|
598 | with self._repo.wlock(), self._repo.dirstate.changing_files(self._repo): | |||
|
599 | return scmutil.addremove( | |||
|
600 | self._repo, | |||
|
601 | m, | |||
|
602 | prefix, | |||
|
603 | uipathfn, | |||
|
604 | opts, | |||
|
605 | ) | |||
590 |
|
606 | |||
591 | @annotatesubrepoerror |
|
607 | @annotatesubrepoerror | |
592 | def cat(self, match, fm, fntemplate, prefix, **opts): |
|
608 | def cat(self, match, fm, fntemplate, prefix, **opts): | |
@@ -952,6 +968,11 b' class hgsubrepo(abstractsubrepo):' | |||||
952 |
|
968 | |||
953 | @annotatesubrepoerror |
|
969 | @annotatesubrepoerror | |
954 | def forget(self, match, prefix, uipathfn, dryrun, interactive): |
|
970 | def forget(self, match, prefix, uipathfn, dryrun, interactive): | |
|
971 | # XXX Ideally, we could let the caller take the `changing_files` | |||
|
972 | # context. However this is not an abstraction that make sense for | |||
|
973 | # other repository types, and leaking that details purely related to | |||
|
974 | # dirstate seems unfortunate. So for now the context will be used here. | |||
|
975 | with self._repo.wlock(), self._repo.dirstate.changing_files(self._repo): | |||
955 | return cmdutil.forget( |
|
976 | return cmdutil.forget( | |
956 | self.ui, |
|
977 | self.ui, | |
957 | self._repo, |
|
978 | self._repo, | |
@@ -975,6 +996,11 b' class hgsubrepo(abstractsubrepo):' | |||||
975 | dryrun, |
|
996 | dryrun, | |
976 | warnings, |
|
997 | warnings, | |
977 | ): |
|
998 | ): | |
|
999 | # XXX Ideally, we could let the caller take the `changing_files` | |||
|
1000 | # context. However this is not an abstraction that make sense for | |||
|
1001 | # other repository types, and leaking that details purely related to | |||
|
1002 | # dirstate seems unfortunate. So for now the context will be used here. | |||
|
1003 | with self._repo.wlock(), self._repo.dirstate.changing_files(self._repo): | |||
978 | return cmdutil.remove( |
|
1004 | return cmdutil.remove( | |
979 | self.ui, |
|
1005 | self.ui, | |
980 | self._repo, |
|
1006 | self._repo, | |
@@ -1015,6 +1041,11 b' class hgsubrepo(abstractsubrepo):' | |||||
1015 | pats = [b'set:modified()'] |
|
1041 | pats = [b'set:modified()'] | |
1016 | else: |
|
1042 | else: | |
1017 | pats = [] |
|
1043 | pats = [] | |
|
1044 | # XXX Ideally, we could let the caller take the `changing_files` | |||
|
1045 | # context. However this is not an abstraction that make sense for | |||
|
1046 | # other repository types, and leaking that details purely related to | |||
|
1047 | # dirstate seems unfortunate. So for now the context will be used here. | |||
|
1048 | with self._repo.wlock(), self._repo.dirstate.changing_files(self._repo): | |||
1018 | cmdutil.revert(self.ui, self._repo, ctx, *pats, **opts) |
|
1049 | cmdutil.revert(self.ui, self._repo, ctx, *pats, **opts) | |
1019 |
|
1050 | |||
1020 | def shortid(self, revid): |
|
1051 | def shortid(self, revid): |
General Comments 0
You need to be logged in to leave comments.
Login now