Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
24721:774ee9800146 | 24722:02a5618e2fbf |
---|---|
4 # | 4 # |
5 # This software may be used and distributed according to the terms of the | 5 # This software may be used and distributed according to the terms of the |
6 # GNU General Public License version 2 or any later version. | 6 # GNU General Public License version 2 or any later version. |
7 | 7 |
8 import re | 8 import re |
9 import parser, util, error, discovery, hbisect, phases | 9 import parser, util, error, hbisect, phases |
10 import node | 10 import node |
11 import heapq | 11 import heapq |
12 import match as matchmod | 12 import match as matchmod |
13 from i18n import _ | 13 from i18n import _ |
14 import encoding | 14 import encoding |
1370 def outgoing(repo, subset, x): | 1370 def outgoing(repo, subset, x): |
1371 """``outgoing([path])`` | 1371 """``outgoing([path])`` |
1372 Changesets not found in the specified destination repository, or the | 1372 Changesets not found in the specified destination repository, or the |
1373 default push location. | 1373 default push location. |
1374 """ | 1374 """ |
1375 import hg # avoid start-up nasties | 1375 # Avoid cycles. |
1376 import discovery | |
1377 import hg | |
1376 # i18n: "outgoing" is a keyword | 1378 # i18n: "outgoing" is a keyword |
1377 l = getargs(x, 0, 1, _("outgoing takes one or no arguments")) | 1379 l = getargs(x, 0, 1, _("outgoing takes one or no arguments")) |
1378 # i18n: "outgoing" is a keyword | 1380 # i18n: "outgoing" is a keyword |
1379 dest = l and getstring(l[0], _("outgoing requires a repository path")) or '' | 1381 dest = l and getstring(l[0], _("outgoing requires a repository path")) or '' |
1380 dest = repo.ui.expandpath(dest or 'default-push', dest or 'default') | 1382 dest = repo.ui.expandpath(dest or 'default-push', dest or 'default') |