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

sync: move hg.localpath() version safe logic to hglib and update

Changeset 28e82e8c3588

Parent 700b842344e2

by Steve Borho

Changes to 2 files · Browse files at 28e82e8c3588 Showing diff from parent 700b842344e2 Diff from another changeset...

 
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 
372
373
374
375
 
376
377
378
 
394
395
396
397
 
398
399
400
 
23
24
25
 
 
 
 
 
 
 
 
 
26
27
28
 
363
364
365
 
366
367
368
369
 
385
386
387
 
388
389
390
391
@@ -23,15 +23,6 @@
   _schemes = ['local', 'ssh', 'http', 'https']   -demandimport.disable() -try: - # hg <= 1.8 - from mercurial.hg import localpath -except ImportError: - # hg >= 1.9 - from mercurial.url import localpath -demandimport.enable() -  def parseurl(path):   if path.startswith('ssh://'):   scheme = 'ssh' @@ -372,7 +363,7 @@
  known.add(os.path.abspath(self.repo.root).lower())   for path in self.paths.values():   if hg.islocal(path): - known.add(os.path.abspath(localpath(path)).lower()) + known.add(os.path.abspath(hglib.localpath(path)).lower())   else:   known.add(path)   related = {} @@ -394,7 +385,7 @@
  ui = tempui   for alias, path in ui.configitems('paths'):   if hg.islocal(path): - abs = os.path.abspath(localpath(path)).lower() + abs = os.path.abspath(hglib.localpath(path)).lower()   else:   abs = path   if abs not in known:
 
21
22
23
 
 
 
 
 
 
24
25
26
 
21
22
23
24
25
26
27
28
29
30
31
32
@@ -21,6 +21,12 @@
 except (ImportError, AttributeError):   # hg <= 1.8   from mercurial.util import canonpath, user_rcpath +try: + # hg >= 1.9 + from mercurial.util import localpath +except ImportError: + # hg <= 1.8 + from mercurial.hg import localpath  demandimport.enable()    _encoding = encoding.encoding