def backgroundrepack(repo, incremental=True, packsonly=False): cmd = [procutil.hgexecutable(), '-R', repo.origroot, 'repack'] msg = _("(running background repack)\n") if incremental: cmd.append('--incremental') msg = _("(running background incremental repack)\n") if packsonly: cmd.append('--packsonly') repo.ui.warn(msg) procutil.runbgcommand(cmd, encoding.environ)
def backgroundrepack(repo, incremental=True, packsonly=False): cmd = [procutil.hgexecutable(), '-R', repo.origroot, 'repack'] msg = _("(running background repack)\n") if incremental: cmd.append('--incremental') msg = _("(running background incremental repack)\n") if packsonly: cmd.append('--packsonly') repo.ui.warn(msg) # We know this command will find a binary, so don't block on it starting. procutil.runbgcommand(cmd, encoding.environ, ensurestart=False)
def backgroundrepack(repo, incremental=True, packsonly=False): cmd = [procutil.hgexecutable(), b'-R', repo.origroot, b'repack'] msg = _(b"(running background repack)\n") if incremental: cmd.append(b'--incremental') msg = _(b"(running background incremental repack)\n") if packsonly: cmd.append(b'--packsonly') repo.ui.warn(msg) # We know this command will find a binary, so don't block on it starting. kwargs = {} if repo.ui.configbool(b'devel', b'remotefilelog.bg-wait'): kwargs['record_wait'] = repo.ui.atexit procutil.runbgcommand(cmd, encoding.environ, ensurestart=False, **kwargs)
def backgroundprefetch(self, revs, base=None, repack=False, pats=None, opts=None): """Runs prefetch in background with optional repack """ cmd = [procutil.hgexecutable(), '-R', repo.origroot, 'prefetch'] if repack: cmd.append('--repack') if revs: cmd += ['-r', revs] # We know this command will find a binary, so don't block # on it starting. procutil.runbgcommand(cmd, encoding.environ, ensurestart=False)
def backgroundprefetch( self, revs, base=None, repack=False, pats=None, opts=None ): """Runs prefetch in background with optional repack""" cmd = [procutil.hgexecutable(), b'-R', repo.origroot, b'prefetch'] if repack: cmd.append(b'--repack') if revs: cmd += [b'-r', revs] # We know this command will find a binary, so don't block # on it starting. kwargs = {} if repo.ui.configbool(b'devel', b'remotefilelog.bg-wait'): kwargs['record_wait'] = repo.ui.atexit procutil.runbgcommand( cmd, encoding.environ, ensurestart=False, **kwargs )