Esempio n. 1
0
def resolveprefetchopts(ui, opts):
    if not opts.get('rev'):
        revset = ['.', 'draft()']

        prefetchrevset = ui.config('remotefilelog', 'pullprefetch', None)
        if prefetchrevset:
            revset.append('(%s)' % prefetchrevset)
        bgprefetchrevs = ui.config('remotefilelog', 'bgprefetchrevs', None)
        if bgprefetchrevs:
            revset.append('(%s)' % bgprefetchrevs)
        revset = '+'.join(revset)

        # update a revset with a date limit
        revset = revdatelimit(ui, revset)

        opts['rev'] = [revset]

    if not opts.get('base'):
        opts['base'] = None

    return opts
Esempio n. 2
0
def resolveprefetchopts(ui, opts):
    if not opts.get(b'rev'):
        revset = [b'.', b'draft()']

        prefetchrevset = ui.config(b'remotefilelog', b'pullprefetch', None)
        if prefetchrevset:
            revset.append(b'(%s)' % prefetchrevset)
        bgprefetchrevs = ui.config(b'remotefilelog', b'bgprefetchrevs', None)
        if bgprefetchrevs:
            revset.append(b'(%s)' % bgprefetchrevs)
        revset = b'+'.join(revset)

        # update a revset with a date limit
        revset = revdatelimit(ui, revset)

        opts[b'rev'] = [revset]

    if not opts.get(b'base'):
        opts[b'base'] = None

    return opts