##// END OF EJS Templates
separate import lines from mercurial and general python modules
Simon Heimberg -
r8312:b87a50b7 default
parent child Browse files
Show More
@@ -7,7 +7,8 b''
7 7
8 8 from i18n import _
9 9 from node import hex
10 import cStringIO, os, stat, tarfile, time, util, zipfile
10 import util
11 import cStringIO, os, stat, tarfile, time, zipfile
11 12 import zlib, gzip
12 13
13 14 def tidyprefix(dest, prefix, suffixes):
@@ -13,7 +13,8 b' were part of the actual repository.'
13 13
14 14 from node import nullid
15 15 from i18n import _
16 import changegroup, util, os, struct, bz2, zlib, tempfile, shutil, mdiff
16 import os, struct, bz2, zlib, tempfile, shutil
17 import changegroup, util, mdiff
17 18 import localrepo, changelog, manifest, filelog, revlog, error
18 19
19 20 class bundlerevlog(revlog.revlog):
@@ -6,7 +6,8 b''
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 8 from i18n import _
9 import struct, os, bz2, zlib, util, tempfile
9 import util
10 import struct, os, bz2, zlib, tempfile
10 11
11 12 def getchunk(source):
12 13 """get a chunk from a changegroup"""
@@ -7,8 +7,8 b''
7 7
8 8 from node import hex, nullid, nullrev, short
9 9 from i18n import _
10 import os, sys, bisect, stat, encoding
11 import mdiff, bdiff, util, templater, templatefilters, patch, errno, error
10 import os, sys, bisect, stat, errno
11 import mdiff, bdiff, util, templater, templatefilters, patch, error, encoding
12 12 import match as _match
13 13
14 14 revrangesep = ':'
@@ -8,10 +8,11 b''
8 8 from node import hex, nullid, nullrev, short
9 9 from lock import release
10 10 from i18n import _, gettext
11 import os, re, sys, textwrap, subprocess
11 import os, re, sys, textwrap, subprocess, difflib, time
12 12 import hg, util, revlog, bundlerepo, extensions, copies, context, error
13 import difflib, patch, time, help, mdiff, tempfile, url, encoding
14 import archival, changegroup, cmdutil, hgweb.server, sshserver, hbisect
13 import patch, help, mdiff, tempfile, url, encoding
14 import archival, changegroup, cmdutil, sshserver, hbisect
15 from hgweb import server
15 16 import merge as merge_
16 17
17 18 # Commands start here, listed alphabetically
@@ -2698,7 +2699,7 b' def serve(ui, repo, **opts):'
2698 2699 class service:
2699 2700 def init(self):
2700 2701 util.set_signal_handler()
2701 self.httpd = hgweb.server.create_server(baseui, repo)
2702 self.httpd = server.create_server(baseui, repo)
2702 2703
2703 2704 if not ui.verbose: return
2704 2705
@@ -6,7 +6,8 b''
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 8 from i18n import _
9 import re, error, os
9 import error
10 import re, os
10 11
11 12 class sortdict(dict):
12 13 'a simple sorted dictionary'
@@ -7,7 +7,8 b''
7 7
8 8 from node import nullid, nullrev, short, hex
9 9 from i18n import _
10 import ancestor, bdiff, error, util, os, errno
10 import ancestor, bdiff, error, util
11 import os, errno
11 12
12 13 propertycache = util.propertycache
13 14
@@ -6,7 +6,8 b''
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 8 from i18n import _
9 import util, heapq
9 import util
10 import heapq
10 11
11 12 def _nonoverlap(d1, d2, d3):
12 13 "Return list of elements in d1 not in d2 or d3"
@@ -7,8 +7,9 b''
7 7
8 8 from node import nullid
9 9 from i18n import _
10 import struct, os, stat, util, errno, ignore
11 import cStringIO, osutil, sys, parsers
10 import util, ignore, osutil, parsers
11 import struct, os, stat, errno
12 import cStringIO, sys
12 13
13 14 _unknown = ('?', 0, 0, 0)
14 15 _format = ">cllll"
@@ -5,7 +5,8 b''
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 import sys, unicodedata, locale, os, error
8 import error
9 import sys, unicodedata, locale, os
9 10
10 11 _encodingfixup = {'646': 'ascii', 'ANSI_X3.4-1968': 'ascii'}
11 12
@@ -7,7 +7,8 b''
7 7
8 8 from node import short
9 9 from i18n import _
10 import util, os, tempfile, simplemerge, re, filecmp
10 import util, simplemerge
11 import os, tempfile, re, filecmp
11 12
12 13 def _toolstr(ui, tool, part, default=""):
13 14 return ui.config("merge-tools", tool + "." + part, default)
@@ -9,9 +9,10 b''
9 9 from i18n import _
10 10 from lock import release
11 11 import localrepo, bundlerepo, httprepo, sshrepo, statichttprepo
12 import errno, lock, os, shutil, util, extensions, error
12 import lock, util, extensions, error
13 13 import merge as _merge
14 14 import verify as _verify
15 import errno, os, shutil
15 16
16 17 def _local(path):
17 18 return (os.path.isfile(util.drop_scheme('file', path)) and
@@ -6,8 +6,8 b''
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 8 from i18n import _
9 import util, os, sys
10 from mercurial import extensions
9 import os, sys
10 import extensions, util
11 11
12 12 def _pythonhook(ui, repo, name, hname, funcname, args, throw):
13 13 '''call python hook. hook is callable object, looked up as
@@ -8,8 +8,9 b''
8 8
9 9 from node import bin, hex, nullid
10 10 from i18n import _
11 import repo, os, urllib, urllib2, urlparse, zlib, util, httplib
12 import errno, socket, changegroup, statichttprepo, error, url
11 import repo, changegroup, statichttprepo, error, url, util
12 import os, urllib, urllib2, urlparse, zlib, httplib
13 import errno, socket
13 14
14 15 def zgenerator(f):
15 16 zd = zlib.decompressobj()
@@ -5,7 +5,8 b''
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 import gettext, sys, os, encoding
8 import encoding
9 import gettext, sys, os
9 10
10 11 # modelled after templater.templatepath:
11 12 if hasattr(sys, 'frozen'):
@@ -6,7 +6,8 b''
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 8 from i18n import _
9 import util, re
9 import util
10 import re
10 11
11 12 _commentre = None
12 13
@@ -8,13 +8,13 b''
8 8 from node import bin, hex, nullid, nullrev, short
9 9 from i18n import _
10 10 import repo, changegroup
11 import changelog, dirstate, filelog, manifest, context, weakref
12 import lock, transaction, stat, errno, ui, store, encoding
13 import os, time, util, extensions, hook, inspect, error
11 import changelog, dirstate, filelog, manifest, context
12 import lock, transaction, ui, store, encoding
13 import util, extensions, hook, error
14 14 import match as match_
15 15 import merge as merge_
16
17 16 from lock import release
17 import weakref, stat, errno, os, time, inspect
18 18 propertycache = util.propertycache
19 19
20 20 class localrepository(repo.repository):
@@ -5,7 +5,8 b''
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 import errno, os, socket, time, util, error
8 import util, error
9 import errno, os, socket, time
9 10 import warnings
10 11
11 12 class lock(object):
@@ -6,9 +6,9 b''
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 8 from i18n import _
9 import util, encoding
9 10 import os, smtplib, socket
10 11 import email.Header, email.MIMEText, email.Utils
11 import util, encoding
12 12
13 13 def _smtp(ui):
14 14 '''build an smtp connection and return a function to send mail'''
@@ -6,7 +6,8 b''
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 8 from i18n import _
9 import array, struct, mdiff, parsers, util, error, revlog
9 import mdiff, parsers, util, error, revlog
10 import array, struct
10 11
11 12 class manifestdict(dict):
12 13 def __init__(self, mapping=None, flags=None):
@@ -6,7 +6,8 b''
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 8 from i18n import _
9 import bdiff, mpatch, re, struct, util
9 import bdiff, mpatch, util
10 import re, struct
10 11
11 12 def splitnewlines(text):
12 13 '''like str.splitlines, but only split on newlines.'''
@@ -7,7 +7,8 b''
7 7
8 8 from node import nullid, nullrev, hex, bin
9 9 from i18n import _
10 import errno, util, os, filemerge, copies, shutil
10 import util, filemerge, copies
11 import errno, os, shutil
11 12
12 13 class mergestate(object):
13 14 '''track 3-way merge state of individual files'''
@@ -6,7 +6,8 b''
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 8 from i18n import _
9 import os, sys, osutil, errno, stat, getpass, pwd, grp
9 import osutil
10 import os, sys, errno, stat, getpass, pwd, grp
10 11
11 12 posixfile = file
12 13 nulldev = '/dev/null'
@@ -6,9 +6,10 b''
6 6 # This software may be used and distributed according to the terms of the
7 7 # GNU General Public License version 2, incorporated herein by reference.
8 8
9 import changegroup, os
9 import changegroup
10 10 from node import nullrev, short
11 11 from i18n import _
12 import os
12 13
13 14 def _bundle(repo, bases, heads, node, suffix, extranodes=None):
14 15 """create a bundle with the specified revisions as a backup"""
@@ -14,8 +14,8 b' and O(changes) merge between branches.'
14 14 # import stuff from node for others to import from revlog
15 15 from node import bin, hex, nullid, nullrev, short #@UnusedImport
16 16 from i18n import _
17 import changegroup, errno, ancestor, mdiff, parsers
18 import struct, util, zlib, error
17 import changegroup, ancestor, mdiff, parsers, error, util
18 import struct, zlib, errno
19 19
20 20 _pack = struct.pack
21 21 _unpack = struct.unpack
@@ -19,7 +19,8 b''
19 19 # s: "i hate that."
20 20
21 21 from i18n import _
22 import util, mdiff, sys, os
22 import util, mdiff
23 import sys, os
23 24
24 25 class CantReprocessAndShowBase(Exception):
25 26 pass
@@ -7,7 +7,8 b''
7 7
8 8 from node import bin, hex
9 9 from i18n import _
10 import repo, re, util, error
10 import repo, util, error
11 import re
11 12
12 13 class remotelock(object):
13 14 def __init__(self, repo):
@@ -8,7 +8,8 b''
8 8
9 9 from i18n import _
10 10 from node import bin, hex
11 import os, streamclone, sys, tempfile, util, hook
11 import streamclone, util, hook
12 import os, sys, tempfile
12 13
13 14 class sshserver(object):
14 15 def __init__(self, ui, repo):
@@ -6,7 +6,8 b''
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 8 from i18n import _
9 import os, stat, osutil, util
9 import osutil, util
10 import os, stat
10 11
11 12 _sha = util.sha1
12 13
@@ -7,7 +7,7 b''
7 7
8 8 from i18n import _
9 9 import re, sys, os
10 from mercurial import util, config
10 import util, config
11 11
12 12 path = ['templates', '../templates']
13 13
@@ -6,8 +6,8 b''
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 8 from i18n import _
9 import errno, getpass, os, re, socket, sys, tempfile
10 import config, traceback, util, error
9 import errno, getpass, os, re, socket, sys, tempfile, traceback
10 import config, util, error
11 11
12 12 _booleans = {'1': True, 'yes': True, 'true': True, 'on': True,
13 13 '0': False, 'no': False, 'false': False, 'off': False}
@@ -14,8 +14,9 b' hide platform-specific details from the '
14 14 """
15 15
16 16 from i18n import _
17 import cStringIO, errno, re, shutil, sys, tempfile, traceback, error
18 import os, stat, threading, time, calendar, glob, osutil, random
17 import error, osutil
18 import cStringIO, errno, re, shutil, sys, tempfile, traceback
19 import os, stat, threading, time, calendar, glob, random
19 20 import imp
20 21
21 22 # Python compatibility
@@ -6,7 +6,8 b''
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 8 from i18n import _
9 import errno, msvcrt, os, osutil, re, sys, error
9 import osutil, error
10 import errno, msvcrt, os, re, sys
10 11 nulldev = 'NUL:'
11 12
12 13 umask = 002
General Comments 0
You need to be logged in to leave comments. Login now