예제 #1
0
파일: bzr.py 프로젝트: amirkarimi/starcal
def getCommitList(obj, startJd, endJd):
    '''
        returns a list of (epoch, rev_id) tuples
    '''
    return getCommitListFromEst(
        obj,
        startJd,
        endJd,
    )
예제 #2
0
def getCommitList(obj, startJd, endJd):
    '''
		returns a list of (epoch, rev_id) tuples
	'''
    return getCommitListFromEst(
        obj,
        startJd,
        endJd,
    )
예제 #3
0
파일: hg.py 프로젝트: amirkarimi/starcal
    obj.repo = localrepository(mercurial.ui.ui(), obj.vcsDir)
    ###
    obj.est = EventSearchTree()
    for rev_id in obj.repo.changelog:
        epoch = obj.repo[rev_id].date()[0]
        obj.est.add(epoch, epoch, rev_id)


def clearObj(obj):
    obj.repo = None
    obj.est = EventSearchTree()


## returns a list of (epoch, commit_id) tuples
getCommitList = lambda obj, startJd, endJd: getCommitListFromEst(
    obj, startJd, endJd, lambda repo, rev_id: str(repo[rev_id])
)


def getCommitInfo(obj, commid_id):
    ctx = obj.repo[commid_id]
    lines = ctx.description().split("\n")
    return {
        "epoch": ctx.date()[0],
        "author": ctx.user(),
        "shortHash": str(ctx),
        "summary": lines[0],
        "description": "\n".join(lines[1:]),
    }

예제 #4
0
def prepareObj(obj):
    obj.repo = localrepository(mercurial.ui.ui(), obj.vcsDir)
    ###
    obj.est = EventSearchTree()
    for rev_id in obj.repo.changelog:
        epoch = obj.repo[rev_id].date()[0]
        obj.est.add(epoch, epoch, rev_id)


def clearObj(obj):
    obj.repo = None
    obj.est = EventSearchTree()


## returns a list of (epoch, commit_id) tuples
getCommitList = lambda obj, startJd, endJd: getCommitListFromEst(
    obj, startJd, endJd, lambda repo, rev_id: str(repo[rev_id]))


def getCommitInfo(obj, commid_id):
    ctx = obj.repo[commid_id]
    lines = ctx.description().split('\n')
    return {
        'epoch': ctx.date()[0],
        'author': ctx.user(),
        'shortHash': str(ctx),
        'summary': lines[0],
        'description': '\n'.join(lines[1:]),
    }


def getShortStat(obj, node1, node2):  ## SLOW FIXME