Changeset 53ba8802ae68…
Parent 5f30074f4194…
by
Changes to one file · Browse files at 53ba8802ae68 Showing diff from parent 5f30074f4194 Diff from another changeset...
@@ -12,16 +12,7 @@ import time
import inspect
-from mercurial import demandimport
-demandimport.disable()
-try:
- # hg >= 1.7
- from mercurial.cmdutil import updatedir
-except ImportError:
- # hg <= 1.6
- from mercurial.patch import updatedir
-demandimport.enable()
-
+from mercurial.cmdutil import updatedir
from mercurial import ui, util, extensions, match, bundlerepo, url, cmdutil
from mercurial import dispatch, encoding, templatefilters, filemerge, error
@@ -439,21 +430,6 @@ return tools
-_funcre = re.compile('\w')
-def getchunkfunction(data, linenum):
- """Return the function containing the chunk at linenum.
-
- Stolen from mercurial/mdiff.py.
- """
- # Walk backwards starting from the line before the chunk
- # to find a line starting with an alphanumeric char.
- for x in xrange(int(linenum) - 2, -1, -1):
- t = data[x].rstrip()
- if _funcre.match(t):
- return ' ' + t[:40]
- return None
-
-
def hgcmd_toq(q, label, args):
'''
Run an hg command in a background thread, pipe all output to a Queue
@@ -569,20 +545,6 @@
return rev == parents[0].node()
-def is_descriptor(obj, attr):
- """
- Returns True if obj.attr is a descriptor - ie, accessing
- the attribute will actually invoke the '__get__' method of
- some object.
-
- Returns False if obj.attr exists, but is not a descriptor,
- and None if obj.attr was not found at all.
- """
- for cls in inspect.getmro(obj.__class__):
- if attr in cls.__dict__:
- return hasattr(cls.__dict__[attr], '__get__')
- return None
-
def export(repo, revs, template='hg-%h.patch', fp=None, switch_parent=False,
opts=None):
'''
|
Loading...