Kiln » Kiln Extensions
Clone URL:  
Pushed to 2 repositories · View In Graph Contained in tip

Update to Kiln 3.0.119

Changeset 5db43cc31ff4

Parent 50302f954e2f

by Profile picture of Jacob KrallJacob Krall

Changes to one file · Browse files at 5db43cc31ff4 Showing diff from parent 50302f954e2f Diff from another changeset...

Change 1 of 6 Show Entire File kiln.py Stacked
 
1
 
2
3
4
 
60
61
62
 
63
64
65
66
67
 
 
 
 
 
 
68
69
70
 
425
426
427
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
428
429
430
 
437
438
439
440
441
442
443
444
 
445
446
447
 
464
465
466
467
468
469
470
471
 
472
473
474
 
918
919
920
921
 
922
923
924
925
 
926
927
928
 
 
1
2
3
4
 
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
 
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
 
459
460
461
 
 
 
 
 
462
463
464
465
 
482
483
484
 
 
 
 
 
485
486
487
488
 
932
933
934
 
935
936
937
938
 
939
940
941
942
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2013 Fog Creek Software. All rights reserved. +# Copyright (C) 2011-2014 Fog Creek Software. All rights reserved.  #  # To enable the "kiln" extension put these lines in your ~/.hgrc:  # [extensions] @@ -60,11 +60,18 @@
 from mercurial.i18n import _  from mercurial.node import nullrev   +# Mercurial pre-2.9  try:   from mercurial import scmutil  except ImportError:   pass   +# Mercurial 2.9 - pathauditor moved from scmutil to pathutil +try: + from mercurial import pathutil +except ImportError: + pass +  demandimport.disable()  try:   import json @@ -425,6 +432,21 @@
  if cookie.name == 'fbToken':   return cookie.value   +# Get the path auditor available for the current version of Mercurial. +# Mercurial moved this class in versions 1.9 and 2.9. +def build_audit_path(repo): + try: + # Mercurial 2.9 + return pathutil.pathauditor(repo.root) + except ImportError: + try: + # Mercurial 1.9 to 2.9 + return scmutil.pathauditor(repo.root) + except ImportError: + # Mercurial < 1.9 + return getattr(repo.opener, 'audit_path', util.path_auditor(repo.root)) + +    def remember_path(ui, repo, path, value):   '''appends the path to the working copy's hgrc and backs up the original''' @@ -437,11 +459,7 @@
  if re.search(r'[:=\s]', path):   return   - try: - audit_path = scmutil.pathauditor(repo.root) - except ImportError: - audit_path = getattr(repo.opener, 'audit_path', util.path_auditor(repo.root)) - + audit_path = build_audit_path(repo)   audit_path('hgrc')   audit_path('hgrc.backup')   base = repo.opener.base @@ -464,11 +482,7 @@
 def unremember_path(ui, repo):   '''restores the working copy's hgrc'''   - try: - audit_path = scmutil.pathauditor(repo.root) - except ImportError: - audit_path = getattr(repo.opener, 'audit_path', util.path_auditor(repo.root)) - + audit_path = build_audit_path(repo)   audit_path('hgrc')   audit_path('hgrc.backup')   base = repo.opener.base @@ -918,11 +932,11 @@
  if opts['annotate']:   default = False   for f in files('annotate'): - browse(urljoin(url, 'File', f) + '?view=annotate') + browse(urljoin(url, 'Files', f) + '?view=annotate')   if opts['file']:   default = False   for f in files('file'): - browse(urljoin(url, 'File', f)) + browse(urljoin(url, 'Files', f))   if opts['filehistory']:   default = False   for f in files('filehistory'):