mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 08:25:44 +01:00
implement mercurial getChangeset
This commit is contained in:
@@ -131,8 +131,7 @@ def printFooter():
|
||||
print ' </changesets>'
|
||||
print '</changeset-paging>'
|
||||
|
||||
def printChangesetsForPath(repo, path):
|
||||
rev = os.environ['SCM_REVISION']
|
||||
def printChangesetsForPath(repo, rev, path):
|
||||
if len(rev) <= 0:
|
||||
rev = "tip"
|
||||
|
||||
@@ -178,9 +177,14 @@ repo = hg.repository(ui.ui(), path = repositoryPath)
|
||||
path = os.environ['SCM_PATH']
|
||||
startNode = os.environ['SCM_REVISION_START']
|
||||
endNode = os.environ['SCM_REVISION_END']
|
||||
rev = os.environ['SCM_REVISION']
|
||||
|
||||
if len(path) > 0:
|
||||
printChangesetsForPath(repo, path)
|
||||
printChangesetsForPath(repo, rev, path)
|
||||
elif len(rev) > 0:
|
||||
ctx = repo[rev]
|
||||
print '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'
|
||||
printChangeset(repo, ctx)
|
||||
else:
|
||||
if len(startNode) > 0 and len(endNode) > 0:
|
||||
# start and end revision
|
||||
|
||||
Reference in New Issue
Block a user