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)
def d(): repo.invalidatevolatilesets() obsolete.getrevs(repo, name)
def d(): repo.invalidatevolatilesets() obsolete.getrevs(repo, name)
def d(): repo.invalidatevolatilesets() if opts['clear_obsstore']: clearfilecache(repo, 'obsstore') obsolete.getrevs(repo, name)