Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1, 2.1.1, and 2.1.2

hglib: prune unused functions and other logic

Changeset 53ba8802ae68

Parent 5f30074f4194

by Steve Borho

Changes to one file · Browse files at 53ba8802ae68 Showing diff from parent 5f30074f4194 Diff from another changeset...

 
12
13
14
15
16
17
18
19
20
21
22
23
24
 
25
26
27
 
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
 
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
 
12
13
14
 
 
 
 
 
 
 
 
 
 
15
16
17
18
 
430
431
432
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
433
434
435
 
545
546
547
 
 
 
 
 
 
 
 
 
 
 
 
 
 
548
549
550
@@ -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):   '''