##// END OF EJS Templates
use demandload more.
Vadim Gelfer -
r2470:fe168927 default
parent child Browse files
Show More
@@ -6,10 +6,9 b' changegroup.py - Mercurial changegroup m'
6 This software may be used and distributed according to the terms
6 This software may be used and distributed according to the terms
7 of the GNU General Public License, incorporated herein by reference.
7 of the GNU General Public License, incorporated herein by reference.
8 """
8 """
9 import struct
10 from i18n import gettext as _
9 from i18n import gettext as _
11 from demandload import *
10 from demandload import *
12 demandload(globals(), "util")
11 demandload(globals(), "struct util")
13
12
14 def getchunk(source):
13 def getchunk(source):
15 """get a chunk from a changegroup"""
14 """get a chunk from a changegroup"""
@@ -7,11 +7,10 b' This software may be used and distribute'
7 of the GNU General Public License, incorporated herein by reference.
7 of the GNU General Public License, incorporated herein by reference.
8 """
8 """
9
9
10 import struct, os
11 from node import *
10 from node import *
12 from i18n import gettext as _
11 from i18n import gettext as _
13 from demandload import *
12 from demandload import *
14 demandload(globals(), "time bisect stat util re errno")
13 demandload(globals(), "struct os time bisect stat util re errno")
15
14
16 class dirstate(object):
15 class dirstate(object):
17 format = ">cllll"
16 format = ">cllll"
@@ -5,10 +5,9 b''
5 # This software may be used and distributed according to the terms
5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7
7
8 import os
9 from revlog import *
8 from revlog import *
10 from demandload import *
9 from demandload import *
11 demandload(globals(), "bdiff")
10 demandload(globals(), "bdiff os")
12
11
13 class filelog(revlog):
12 class filelog(revlog):
14 def __init__(self, opener, path, defversion=REVLOG_DEFAULT_VERSION):
13 def __init__(self, opener, path, defversion=REVLOG_DEFAULT_VERSION):
@@ -5,14 +5,13 b''
5 # This software may be used and distributed according to the terms
5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7
7
8 import os, util
9 import filelog, manifest, changelog, dirstate, repo
10 from node import *
8 from node import *
11 from i18n import gettext as _
9 from i18n import gettext as _
12 from demandload import *
10 from demandload import *
13 demandload(globals(), "appendfile changegroup")
11 demandload(globals(), "appendfile changegroup")
12 demandload(globals(), "changelog dirstate filelog manifest repo")
14 demandload(globals(), "re lock transaction tempfile stat mdiff errno ui")
13 demandload(globals(), "re lock transaction tempfile stat mdiff errno ui")
15 demandload(globals(), "revlog")
14 demandload(globals(), "os revlog util")
16
15
17 class localrepository(object):
16 class localrepository(object):
18 capabilities = ()
17 capabilities = ()
@@ -5,11 +5,10 b''
5 # This software may be used and distributed according to the terms
5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7
7
8 import struct
9 from revlog import *
8 from revlog import *
10 from i18n import gettext as _
9 from i18n import gettext as _
11 from demandload import *
10 from demandload import *
12 demandload(globals(), "bisect array")
11 demandload(globals(), "array bisect struct")
13
12
14 class manifest(revlog):
13 class manifest(revlog):
15 def __init__(self, opener, defversion=REVLOGV0):
14 def __init__(self, opener, defversion=REVLOGV0):
@@ -6,8 +6,8 b''
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7
7
8 from demandload import demandload
8 from demandload import demandload
9 import struct, bdiff, util, mpatch
9 import bdiff, mpatch
10 demandload(globals(), "re")
10 demandload(globals(), "re struct util")
11
11
12 def splitnewlines(text):
12 def splitnewlines(text):
13 '''like str.splitlines, but only split on newlines.'''
13 '''like str.splitlines, but only split on newlines.'''
@@ -7,7 +7,8 b' This software may be used and distribute'
7 of the GNU General Public License, incorporated herein by reference.
7 of the GNU General Public License, incorporated herein by reference.
8 """
8 """
9
9
10 import binascii
10 from demandload import demandload
11 demandload(globals(), "binascii")
11
12
12 nullid = "\0" * 20
13 nullid = "\0" * 20
13
14
@@ -5,7 +5,6 b''
5 # This software may be used and distributed according to the terms
5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7
7
8 import re
9 from demandload import demandload
8 from demandload import demandload
10 from i18n import gettext as _
9 from i18n import gettext as _
11 from node import *
10 from node import *
@@ -194,11 +193,16 b' def stringify(thing):'
194 walk(thing)
193 walk(thing)
195 return cs.getvalue()
194 return cs.getvalue()
196
195
197 para_re = re.compile('(\n\n|\n\\s*[-*]\\s*)', re.M)
196 para_re = None
198 space_re = re.compile(r' +')
197 space_re = None
199
198
200 def fill(text, width):
199 def fill(text, width):
201 '''fill many paragraphs.'''
200 '''fill many paragraphs.'''
201 global para_re, space_re
202 if para_re is None:
203 para_re = re.compile('(\n\n|\n\\s*[-*]\\s*)', re.M)
204 space_re = re.compile(r' +')
205
202 def findparas():
206 def findparas():
203 start = 0
207 start = 0
204 while True:
208 while True:
@@ -11,8 +11,9 b''
11 # This software may be used and distributed according to the terms
11 # This software may be used and distributed according to the terms
12 # of the GNU General Public License, incorporated herein by reference.
12 # of the GNU General Public License, incorporated herein by reference.
13
13
14 import os
14 from demandload import demandload
15 from i18n import gettext as _
15 from i18n import gettext as _
16 demandload(globals(), 'os')
16
17
17 class transaction(object):
18 class transaction(object):
18 def __init__(self, report, opener, journal, after=None):
19 def __init__(self, report, opener, journal, after=None):
@@ -5,11 +5,10 b''
5 # This software may be used and distributed according to the terms
5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7
7
8 import ConfigParser
9 from i18n import gettext as _
8 from i18n import gettext as _
10 from demandload import *
9 from demandload import *
11 demandload(globals(), "errno getpass os re smtplib socket sys tempfile")
10 demandload(globals(), "errno getpass os re smtplib socket sys tempfile")
12 demandload(globals(), "templater traceback util")
11 demandload(globals(), "ConfigParser templater traceback util")
13
12
14 class ui(object):
13 class ui(object):
15 def __init__(self, verbose=False, debug=False, quiet=False,
14 def __init__(self, verbose=False, debug=False, quiet=False,
@@ -10,11 +10,10 b' This contains helper routines that are i'
10 platform-specific details from the core.
10 platform-specific details from the core.
11 """
11 """
12
12
13 import os, errno
14 from i18n import gettext as _
13 from i18n import gettext as _
15 from demandload import *
14 from demandload import *
16 demandload(globals(), "cStringIO errno popen2 re shutil sys tempfile")
15 demandload(globals(), "cStringIO errno popen2 re shutil sys tempfile")
17 demandload(globals(), "threading time")
16 demandload(globals(), "os threading time")
18
17
19 class SignalInterrupt(Exception):
18 class SignalInterrupt(Exception):
20 """Exception raised on SIGTERM and SIGHUP."""
19 """Exception raised on SIGTERM and SIGHUP."""
General Comments 0
You need to be logged in to leave comments. Login now