Ejemplo n.º 1
0
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)
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
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)
Ejemplo n.º 4
0
 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)
Ejemplo n.º 5
0
        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
            )