Show More
@@ -569,15 +569,20 b' class hgsubrepo(abstractsubrepo):' | |||
|
569 | 569 | |
|
570 | 570 | @annotatesubrepoerror |
|
571 | 571 | def add(self, ui, match, prefix, uipathfn, explicitonly, **opts): |
|
572 | return cmdutil.add( | |
|
573 | ui, | |
|
574 | self._repo, | |
|
575 | match, | |
|
576 | prefix, | |
|
577 | uipathfn, | |
|
578 |
|
|
|
579 |
|
|
|
580 | ) | |
|
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): | |
|
577 | return cmdutil.add( | |
|
578 | ui, | |
|
579 | self._repo, | |
|
580 | match, | |
|
581 | prefix, | |
|
582 | uipathfn, | |
|
583 | explicitonly, | |
|
584 | **opts, | |
|
585 | ) | |
|
581 | 586 | |
|
582 | 587 | @annotatesubrepoerror |
|
583 | 588 | def addremove(self, m, prefix, uipathfn, opts): |
@@ -586,7 +591,18 b' class hgsubrepo(abstractsubrepo):' | |||
|
586 | 591 | # be used to process sibling subrepos however. |
|
587 | 592 | opts = copy.copy(opts) |
|
588 | 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 | 607 | @annotatesubrepoerror |
|
592 | 608 | def cat(self, match, fm, fntemplate, prefix, **opts): |
@@ -952,16 +968,21 b' class hgsubrepo(abstractsubrepo):' | |||
|
952 | 968 | |
|
953 | 969 | @annotatesubrepoerror |
|
954 | 970 | def forget(self, match, prefix, uipathfn, dryrun, interactive): |
|
955 | return cmdutil.forget( | |
|
956 | self.ui, | |
|
957 | self._repo, | |
|
958 | match, | |
|
959 | prefix, | |
|
960 | uipathfn, | |
|
961 |
|
|
|
962 | dryrun=dryrun, | |
|
963 | interactive=interactive, | |
|
964 | ) | |
|
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): | |
|
976 | return cmdutil.forget( | |
|
977 | self.ui, | |
|
978 | self._repo, | |
|
979 | match, | |
|
980 | prefix, | |
|
981 | uipathfn, | |
|
982 | True, | |
|
983 | dryrun=dryrun, | |
|
984 | interactive=interactive, | |
|
985 | ) | |
|
965 | 986 | |
|
966 | 987 | @annotatesubrepoerror |
|
967 | 988 | def removefiles( |
@@ -975,17 +996,22 b' class hgsubrepo(abstractsubrepo):' | |||
|
975 | 996 | dryrun, |
|
976 | 997 | warnings, |
|
977 | 998 | ): |
|
978 | return cmdutil.remove( | |
|
979 | self.ui, | |
|
980 | self._repo, | |
|
981 | matcher, | |
|
982 | prefix, | |
|
983 | uipathfn, | |
|
984 |
|
|
|
985 |
|
|
|
986 |
|
|
|
987 |
|
|
|
988 | ) | |
|
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): | |
|
1004 | return cmdutil.remove( | |
|
1005 | self.ui, | |
|
1006 | self._repo, | |
|
1007 | matcher, | |
|
1008 | prefix, | |
|
1009 | uipathfn, | |
|
1010 | after, | |
|
1011 | force, | |
|
1012 | subrepos, | |
|
1013 | dryrun, | |
|
1014 | ) | |
|
989 | 1015 | |
|
990 | 1016 | @annotatesubrepoerror |
|
991 | 1017 | def revert(self, substate, *pats, **opts): |
@@ -1015,7 +1041,12 b' class hgsubrepo(abstractsubrepo):' | |||
|
1015 | 1041 | pats = [b'set:modified()'] |
|
1016 | 1042 | else: |
|
1017 | 1043 | pats = [] |
|
1018 | cmdutil.revert(self.ui, self._repo, ctx, *pats, **opts) | |
|
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): | |
|
1049 | cmdutil.revert(self.ui, self._repo, ctx, *pats, **opts) | |
|
1019 | 1050 | |
|
1020 | 1051 | def shortid(self, revid): |
|
1021 | 1052 | return revid[:12] |
General Comments 0
You need to be logged in to leave comments.
Login now