Mercurial > public > mercurial-scm > hg
comparison mercurial/revset.py @ 25971:e9cd028f2dff
revset: use absolute_import
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 08 Aug 2015 18:36:58 -0700 |
parents | 289149111d46 |
children | a7527c5769bb |
comparison
equal
deleted
inserted
replaced
25970:d1419cfbd4f4 | 25971:e9cd028f2dff |
---|---|
3 # Copyright 2010 Matt Mackall <mpm@selenic.com> | 3 # Copyright 2010 Matt Mackall <mpm@selenic.com> |
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 from __future__ import absolute_import | |
9 | |
10 import heapq | |
8 import re | 11 import re |
9 import parser, util, error, hbisect, phases | 12 |
10 import node | 13 from .i18n import _ |
11 import heapq | 14 from . import ( |
12 import match as matchmod | 15 encoding, |
13 from i18n import _ | 16 error, |
14 import encoding | 17 hbisect, |
15 import obsolete as obsmod | 18 match as matchmod, |
16 import pathutil | 19 node, |
17 import repoview | 20 obsolete as obsmod, |
21 parser, | |
22 pathutil, | |
23 phases, | |
24 repoview, | |
25 util, | |
26 ) | |
18 | 27 |
19 def _revancestors(repo, revs, followfirst): | 28 def _revancestors(repo, revs, followfirst): |
20 """Like revlog.ancestors(), but supports followfirst.""" | 29 """Like revlog.ancestors(), but supports followfirst.""" |
21 if followfirst: | 30 if followfirst: |
22 cut = 1 | 31 cut = 1 |
1433 """``outgoing([path])`` | 1442 """``outgoing([path])`` |
1434 Changesets not found in the specified destination repository, or the | 1443 Changesets not found in the specified destination repository, or the |
1435 default push location. | 1444 default push location. |
1436 """ | 1445 """ |
1437 # Avoid cycles. | 1446 # Avoid cycles. |
1438 import discovery | 1447 from . import ( |
1439 import hg | 1448 discovery, |
1449 hg, | |
1450 ) | |
1440 # i18n: "outgoing" is a keyword | 1451 # i18n: "outgoing" is a keyword |
1441 l = getargs(x, 0, 1, _("outgoing takes one or no arguments")) | 1452 l = getargs(x, 0, 1, _("outgoing takes one or no arguments")) |
1442 # i18n: "outgoing" is a keyword | 1453 # i18n: "outgoing" is a keyword |
1443 dest = l and getstring(l[0], _("outgoing requires a repository path")) or '' | 1454 dest = l and getstring(l[0], _("outgoing requires a repository path")) or '' |
1444 dest = repo.ui.expandpath(dest or 'default-push', dest or 'default') | 1455 dest = repo.ui.expandpath(dest or 'default-push', dest or 'default') |
1615 Local revision that corresponds to the given identifier in a | 1626 Local revision that corresponds to the given identifier in a |
1616 remote repository, if present. Here, the '.' identifier is a | 1627 remote repository, if present. Here, the '.' identifier is a |
1617 synonym for the current local branch. | 1628 synonym for the current local branch. |
1618 """ | 1629 """ |
1619 | 1630 |
1620 import hg # avoid start-up nasties | 1631 from . import hg # avoid start-up nasties |
1621 # i18n: "remote" is a keyword | 1632 # i18n: "remote" is a keyword |
1622 l = getargs(x, 0, 2, _("remote takes one, two or no arguments")) | 1633 l = getargs(x, 0, 2, _("remote takes one, two or no arguments")) |
1623 | 1634 |
1624 q = '.' | 1635 q = '.' |
1625 if len(l) > 0: | 1636 if len(l) > 0: |