Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revset.py @ 24722:02a5618e2fbf
revset: don't import discovery at module level
discovery.py imports a lot of the world. Pierre-Yves told me to move it
to a function-level import to avoid an import cycle in a future patch.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 14 Apr 2015 12:54:16 -0400 |
parents | fb47816e1a9c |
children | 077683371b7b |
line wrap: on
line diff
--- a/mercurial/revset.py Tue Apr 14 10:59:26 2015 -0400 +++ b/mercurial/revset.py Tue Apr 14 12:54:16 2015 -0400 @@ -6,7 +6,7 @@ # GNU General Public License version 2 or any later version. import re -import parser, util, error, discovery, hbisect, phases +import parser, util, error, hbisect, phases import node import heapq import match as matchmod @@ -1372,7 +1372,9 @@ Changesets not found in the specified destination repository, or the default push location. """ - import hg # avoid start-up nasties + # Avoid cycles. + import discovery + import hg # i18n: "outgoing" is a keyword l = getargs(x, 0, 1, _("outgoing takes one or no arguments")) # i18n: "outgoing" is a keyword