Patchwork [1,of,2] remotefilelog: drop some compatibility cruft for finding the hg exeutable

login
register
mail settings
Submitter Matt Harbison
Date Nov. 24, 2018, 6:46 a.m.
Message ID <2abf33243bea3e4679ac.1543041996@Envy>
Download mbox | patch
Permalink /patch/36760/
State Accepted
Headers show

Comments

Matt Harbison - Nov. 24, 2018, 6:46 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1543029536 18000
#      Fri Nov 23 22:18:56 2018 -0500
# Node ID 2abf33243bea3e4679ac944315d82fce21918d8f
# Parent  197f7eebf5f89fb2b9d0e117157b4a040dde0a89
remotefilelog: drop some compatibility cruft for finding the hg exeutable
Yuya Nishihara - Nov. 25, 2018, 2:53 a.m.
On Sat, 24 Nov 2018 01:46:36 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1543029536 18000
> #      Fri Nov 23 22:18:56 2018 -0500
> # Node ID 2abf33243bea3e4679ac944315d82fce21918d8f
> # Parent  197f7eebf5f89fb2b9d0e117157b4a040dde0a89
> remotefilelog: drop some compatibility cruft for finding the hg exeutable

Queued the series, thanks.

Patch

diff --git a/hgext/remotefilelog/repack.py b/hgext/remotefilelog/repack.py
--- a/hgext/remotefilelog/repack.py
+++ b/hgext/remotefilelog/repack.py
@@ -34,15 +34,8 @@  osutil = policy.importmod(r'osutil')
 class RepackAlreadyRunning(error.Abort):
     pass
 
-if util.safehasattr(util, '_hgexecutable'):
-    # Before 5be286db
-    _hgexecutable = util.hgexecutable
-else:
-    from mercurial.utils import procutil
-    _hgexecutable = procutil.hgexecutable
-
 def backgroundrepack(repo, incremental=True, packsonly=False):
-    cmd = [_hgexecutable(), '-R', repo.origroot, 'repack']
+    cmd = [procutil.hgexecutable(), '-R', repo.origroot, 'repack']
     msg = _("(running background repack)\n")
     if incremental:
         cmd.append('--incremental')