Mon, 17 Nov 2014 22:22:05 +0200
- ..
hgpoll.py | file | annotate | diff | comparison | revisions |
--- a/hgpoll.py Mon Nov 17 22:17:41 2014 +0200 +++ b/hgpoll.py Mon Nov 17 22:22:05 2014 +0200 @@ -77,7 +77,19 @@ return self.message def announce_ticket_resolved (ticket_id, commit_node): - zanrepo = hgapi.Repo ('zandronum-everything') + try: + repo_name = 'zandronum-stable' + zanrepo = hgapi.Repo (repo_name) + zanrepo.hg_command ('log', '-r', commit_node) + except hgapi.hgapi.HgException: + try: + repo_name = 'zandronum' + zanrepo = hgapi.Repo (repo_name) + zanrepo.hg_command ('log', '-r', commit_node) + except hgapi.hgapi.HgException: + raise HgProcessError ('unknown commit %s' % commit_node) + + repo_url = 'https://bitbucket.org/Torr_Samaho/%s' % repo_name # Acquire additional data moredata = get_commit_data (zanrepo, commit_node,