Target:
Source:
Actions:
Time | Author | Commit | Description | |
---|---|---|---|---|
No commits in this compare |
@@ -56,8 +56,6 b' UnhandledException = functools.partial(_' | |||
|
56 | 56 | |
|
57 | 57 | URLError = functools.partial(_make_exception, 'url_error') |
|
58 | 58 | |
|
59 | SubrepoMergeException = functools.partial(_make_exception, 'subrepo_merge_error') | |
|
60 | ||
|
61 | 59 | |
|
62 | 60 | class HTTPRepoLocked(HTTPLocked): |
|
63 | 61 | """ |
@@ -683,13 +683,6 b' class HgRemote(object):' | |||
|
683 | 683 | repo = self._factory.repo(wire) |
|
684 | 684 | baseui = self._factory._create_config(wire['config']) |
|
685 | 685 | repo.ui.setconfig('ui', 'merge', 'internal:dump') |
|
686 | ||
|
687 | # In case of sub repositories are used mercurial prompts the user in | |
|
688 | # case of merge conflicts or different sub repository sources. By | |
|
689 | # setting the interactive flag to `False` mercurial doesn't prompt the | |
|
690 | # used but instead uses a default value. | |
|
691 | repo.ui.setconfig('ui', 'interactive', False) | |
|
692 | ||
|
693 | 686 | commands.merge(baseui, repo, rev=revision) |
|
694 | 687 | |
|
695 | 688 | @reraise_safe_exceptions |
@@ -35,7 +35,6 b' from mercurial import discovery' | |||
|
35 | 35 | from mercurial import unionrepo |
|
36 | 36 | from mercurial import localrepo |
|
37 | 37 | from mercurial import merge as hg_merge |
|
38 | from mercurial import subrepo | |
|
39 | 38 | |
|
40 | 39 | from mercurial.commands import clone, nullid, pull |
|
41 | 40 | from mercurial.context import memctx, memfilectx |
@@ -58,77 +58,3 b' def _dynamic_capabilities_wrapper(lfprot' | |||
|
58 | 58 | return calc_capabilities(repo, proto) |
|
59 | 59 | |
|
60 | 60 | return _dynamic_capabilities |
|
61 | ||
|
62 | ||
|
63 | def patch_subrepo_type_mapping(): | |
|
64 | from collections import defaultdict | |
|
65 | from hgcompat import subrepo | |
|
66 | from exceptions import SubrepoMergeException | |
|
67 | ||
|
68 | class NoOpSubrepo(subrepo.abstractsubrepo): | |
|
69 | ||
|
70 | def __init__(self, ctx, path, *args, **kwargs): | |
|
71 | """Initialize abstractsubrepo part | |
|
72 | ||
|
73 | ``ctx`` is the context referring this subrepository in the | |
|
74 | parent repository. | |
|
75 | ||
|
76 | ``path`` is the path to this subrepository as seen from | |
|
77 | innermost repository. | |
|
78 | """ | |
|
79 | self.ui = ctx.repo().ui | |
|
80 | self._ctx = ctx | |
|
81 | self._path = path | |
|
82 | ||
|
83 | def storeclean(self, path): | |
|
84 | """ | |
|
85 | returns true if the repository has not changed since it was last | |
|
86 | cloned from or pushed to a given repository. | |
|
87 | """ | |
|
88 | return True | |
|
89 | ||
|
90 | def dirty(self, ignoreupdate=False): | |
|
91 | """returns true if the dirstate of the subrepo is dirty or does not | |
|
92 | match current stored state. If ignoreupdate is true, only check | |
|
93 | whether the subrepo has uncommitted changes in its dirstate. | |
|
94 | """ | |
|
95 | return False | |
|
96 | ||
|
97 | def basestate(self): | |
|
98 | """current working directory base state, disregarding .hgsubstate | |
|
99 | state and working directory modifications""" | |
|
100 | substate = subrepo.state(self._ctx, self.ui) | |
|
101 | file_system_path, rev, repotype = substate.get(self._path) | |
|
102 | return rev | |
|
103 | ||
|
104 | def remove(self): | |
|
105 | """remove the subrepo | |
|
106 | ||
|
107 | (should verify the dirstate is not dirty first) | |
|
108 | """ | |
|
109 | pass | |
|
110 | ||
|
111 | def get(self, state, overwrite=False): | |
|
112 | """run whatever commands are needed to put the subrepo into | |
|
113 | this state | |
|
114 | """ | |
|
115 | pass | |
|
116 | ||
|
117 | def merge(self, state): | |
|
118 | """merge currently-saved state with the new state.""" | |
|
119 | raise SubrepoMergeException() | |
|
120 | ||
|
121 | def push(self, opts): | |
|
122 | """perform whatever action is analogous to 'hg push' | |
|
123 | ||
|
124 | This may be a no-op on some systems. | |
|
125 | """ | |
|
126 | pass | |
|
127 | ||
|
128 | # Patch subrepo type mapping to always return our NoOpSubrepo class | |
|
129 | # whenever a subrepo class is looked up. | |
|
130 | subrepo.types = { | |
|
131 | 'hg': NoOpSubrepo, | |
|
132 | 'git': NoOpSubrepo, | |
|
133 | 'svn': NoOpSubrepo | |
|
134 | } |
@@ -354,6 +354,5 b' class ResponseFilter(object):' | |||
|
354 | 354 | def main(global_config, **settings): |
|
355 | 355 | if MercurialFactory: |
|
356 | 356 | hgpatches.patch_largefiles_capabilities() |
|
357 | hgpatches.patch_subrepo_type_mapping() | |
|
358 | 357 | app = HTTPApplication(settings=settings) |
|
359 | 358 | return app.wsgi_app() |
@@ -503,6 +503,5 b' class VcsServerCommand(object):' | |||
|
503 | 503 | def main(argv=sys.argv, quiet=False): |
|
504 | 504 | if MercurialFactory: |
|
505 | 505 | hgpatches.patch_largefiles_capabilities() |
|
506 | hgpatches.patch_subrepo_type_mapping() | |
|
507 | 506 | command = VcsServerCommand(argv, quiet=quiet) |
|
508 | 507 | return command.run() |