Exemple #1
0
def repolen(repo, svnonly=False):
    """Naively calculate the amount of available revisions in a repository.

    this is usually equal to len(repo) -- except in the face of
    obsolete revisions.

    if svnonly is true, only count revisions converted from Subversion.
    """
    # kind of nasty way of calculating the length, but fortunately,
    # our test repositories tend to be rather small
    revs = set(repo)

    if obsolete:
        revs -= obsolete.getrevs(repo, 'obsolete')

    if svnonly:
        revs = set(r for r in revs if util.getsvnrev(revsymbol(repo, r)))

    return len(revs)
Exemple #2
0
 def d():
     repo.invalidatevolatilesets()
     obsolete.getrevs(repo, name)
Exemple #3
0
 def d():
     repo.invalidatevolatilesets()
     obsolete.getrevs(repo, name)
Exemple #4
0
 def d():
     repo.invalidatevolatilesets()
     if opts['clear_obsstore']:
         clearfilecache(repo, 'obsstore')
     obsolete.getrevs(repo, name)