diff -r e24793fae424 -r 1b734faab67a mod_hg.py --- a/mod_hg.py Tue Aug 11 19:12:30 2015 +0300 +++ b/mod_hg.py Sun Aug 16 10:59:22 2015 +0300 @@ -53,13 +53,6 @@ }, { - 'name': 'hg', - 'description': 'Executes a hg command', - 'args': '', - 'level': 'admin', - }, - - { 'name': 'resolves', 'description': '''Manually cause a ticket to be resolved by a changeset''', 'args': ' ', @@ -137,20 +130,16 @@ def cmd_cset (bot, args, reply, **rest): node, repo = resolve_node (args['key']) - - try: - commit = repo.get_commit_data (rev=node, - node='node|short', - message='desc', - author='author', - diffstat='diffstat', - time='date|hgdate', - bookmarks='bookmarks', - latesttagdistance='latesttagdistance', - latesttag='latesttag', - email='author|email') - except Subprocess.CalledProcessError: - command_error ('''couldn't find changeset %s in %s''' % (node, repo.name)) + commit = repo.get_commit_data (rev=node, + node='node|short', + message='desc', + author='author', + diffstat='diffstat', + time='date|hgdate', + bookmarks='bookmarks', + latesttagdistance='latesttagdistance', + latesttag='latesttag', + email='author|email') del node commit['date'] = datetime.utcfromtimestamp (int (commit['time'].split (' ')[0])) @@ -207,12 +196,5 @@ reply ('url: %s/commits/%s' % (repo.url, commit['node'])) -def cmd_hg (bot, args, reply, **rest): - try: - result = subprocess.check_output (['hg'] + args['command']) - reply (result) - except Exception as e: - command_error (str (e)) - def cmd_resolves (bot, args, **rest): hgpoll.announce_ticket_resolved (args['ticket'], args['changeset']) \ No newline at end of file