changeset 40496:60eb35b0c11c

remotefilelog: remove function that was described as deprecated Differential Revision: https://phab.mercurial-scm.org/D4937
author Augie Fackler <augie@google.com>
date Wed, 03 Oct 2018 13:54:45 -0400
parents 3a333a582d7b
children 3fbfbc8c9f82
files hgext/remotefilelog/extutil.py hgext/remotefilelog/repack.py hgext/remotefilelog/shallowrepo.py
diffstat 3 files changed, 2 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/remotefilelog/extutil.py	Thu Sep 27 13:03:19 2018 -0400
+++ b/hgext/remotefilelog/extutil.py	Wed Oct 03 13:54:45 2018 -0400
@@ -92,18 +92,6 @@
             # continue the hg process here.
             os._exit(returncode)
 
-def runshellcommand(script, env):
-    '''
-    Run a shell command in the background.
-    This spawns the command and returns before it completes.
-
-    Prefer using runbgcommand() instead of this function.  This function should
-    be discouraged in new code.  Running commands through a subshell requires
-    you to be very careful about correctly escaping arguments, and you need to
-    make sure your command works with both Windows and Unix shells.
-    '''
-    runbgcommand(script, env=env, shell=True)
-
 @contextlib.contextmanager
 def flock(lockpath, description, timeout=-1):
     """A flock based lock object. Currently it is always non-blocking.
--- a/hgext/remotefilelog/repack.py	Thu Sep 27 13:03:19 2018 -0400
+++ b/hgext/remotefilelog/repack.py	Wed Oct 03 13:54:45 2018 -0400
@@ -49,10 +49,8 @@
         msg = _("(running background incremental repack)\n")
     if packsonly:
         cmd.append('--packsonly')
-    cmd = ' '.join(map(procutil.shellquote, cmd))
-
     repo.ui.warn(msg)
-    extutil.runshellcommand(cmd, encoding.environ)
+    extutil.runbgcommand(cmd, encoding.environ)
 
 def fullrepack(repo, options=None):
     """If ``packsonly`` is True, stores creating only loose objects are skipped.
--- a/hgext/remotefilelog/shallowrepo.py	Thu Sep 27 13:03:19 2018 -0400
+++ b/hgext/remotefilelog/shallowrepo.py	Wed Oct 03 13:54:45 2018 -0400
@@ -199,9 +199,7 @@
                 cmd.append('--repack')
             if revs:
                 cmd += ['-r', revs]
-            cmd = ' '.join(map(procutil.shellquote, cmd))
-
-            extutil.runshellcommand(cmd, encoding.environ)
+            extutil.runbgcommand(cmd, encoding.environ)
 
         def prefetch(self, revs, base=None, pats=None, opts=None):
             """Prefetches all the necessary file revisions for the given revs