comparison mercurial/commands.py @ 28323:ffc693f87148

commands: use absolute_import All mercurial.* modules are now using absolute_import \o/
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 21 Dec 2015 22:26:31 -0800
parents aa73d6a5d9ea
children 549ff28a345f
comparison
equal deleted inserted replaced
28322:ebd0e86bdf89 28323:ffc693f87148
3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> 3 # Copyright 2005-2007 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 node import hex, bin, nullhex, nullid, nullrev, short 8 from __future__ import absolute_import
9 from lock import release 9
10 from i18n import _ 10 import difflib
11 import os, re, difflib, time, tempfile, errno, shlex 11 import errno
12 import sys, socket 12 import operator
13 import hg, scmutil, util, revlog, copies, error, bookmarks 13 import os
14 import patch, help, encoding, templatekw, discovery 14 import random
15 import archival, changegroup, cmdutil, hbisect 15 import re
16 import sshserver, hgweb 16 import shlex
17 import extensions 17 import socket
18 import merge as mergemod 18 import sys
19 import minirst, revset, fileset 19 import tempfile
20 import dagparser, context, simplemerge, graphmod, copies 20 import time
21 import random, operator 21
22 import setdiscovery, treediscovery, dagutil, pvec, localrepo, destutil 22 from .i18n import _
23 import phases, obsolete, exchange, bundle2, repair, lock as lockmod 23 from .node import (
24 import ui as uimod 24 bin,
25 import streamclone 25 hex,
26 import commandserver 26 nullhex,
27 nullid,
28 nullrev,
29 short,
30 )
31 from . import (
32 archival,
33 bookmarks,
34 bundle2,
35 changegroup,
36 cmdutil,
37 commandserver,
38 context,
39 copies,
40 dagparser,
41 dagutil,
42 destutil,
43 discovery,
44 encoding,
45 error,
46 exchange,
47 extensions,
48 fileset,
49 graphmod,
50 hbisect,
51 help,
52 hg,
53 hgweb,
54 localrepo,
55 lock as lockmod,
56 merge as mergemod,
57 minirst,
58 obsolete,
59 patch,
60 phases,
61 pvec,
62 repair,
63 revlog,
64 revset,
65 scmutil,
66 setdiscovery,
67 simplemerge,
68 sshserver,
69 streamclone,
70 templatekw,
71 treediscovery,
72 ui as uimod,
73 util,
74 )
75
76 release = lockmod.release
27 77
28 table = {} 78 table = {}
29 79
30 command = cmdutil.command(table) 80 command = cmdutil.command(table)
31 81
2675 2725
2676 # compiled modules 2726 # compiled modules
2677 ui.status(_("checking installed modules (%s)...\n") 2727 ui.status(_("checking installed modules (%s)...\n")
2678 % os.path.dirname(__file__)) 2728 % os.path.dirname(__file__))
2679 try: 2729 try:
2680 import bdiff, mpatch, base85, osutil 2730 from . import (
2731 base85,
2732 bdiff,
2733 mpatch,
2734 osutil,
2735 )
2681 dir(bdiff), dir(mpatch), dir(base85), dir(osutil) # quiet pyflakes 2736 dir(bdiff), dir(mpatch), dir(base85), dir(osutil) # quiet pyflakes
2682 except Exception as inst: 2737 except Exception as inst:
2683 ui.write(" %s\n" % inst) 2738 ui.write(" %s\n" % inst)
2684 ui.write(_(" One or more extensions could not be found")) 2739 ui.write(_(" One or more extensions could not be found"))
2685 ui.write(_(" (check that you compiled the extensions)\n")) 2740 ui.write(_(" (check that you compiled the extensions)\n"))
2686 problems += 1 2741 problems += 1
2687 2742
2688 # templates 2743 # templates
2689 import templater 2744 from . import templater
2690 p = templater.templatepaths() 2745 p = templater.templatepaths()
2691 ui.status(_("checking templates (%s)...\n") % ' '.join(p)) 2746 ui.status(_("checking templates (%s)...\n") % ' '.join(p))
2692 if p: 2747 if p:
2693 m = templater.templatepath("map-cmdline.default") 2748 m = templater.templatepath("map-cmdline.default")
2694 if m: 2749 if m: