@@ 6,10 6,14 @@ import re
import os
import sys
-from mercurial import cmdutil, commands, context, extensions, util
-
-cmdtable = {}
-command = cmdutil.command(cmdtable)
+from mercurial import (
+ cmdutil,
+ commands,
+ context,
+ extensions,
+ registrar,
+ util
+)
try:
from menu import make_selector
@@ 27,6 31,14 @@ except:
def json_load(datafile):
return eval(datafile.read(), {})
+cmdtable = {}
+
+# TRACKING hg43
+if util.safehasattr(registrar, 'command'):
+ command = registrar.command(cmdtable)
+else:
+ command = cmdutil.command(cmdtable)
+
SCRIPTDIR = os.path.dirname(os.path.realpath(__file__))
data = json_load(file(os.path.join(SCRIPTDIR, "jobs.json")))
@@ 289,5 301,6 @@ def trychooser_command(ui, repo, *args,
ui.write("Push to try server...\n")
commands.push(ui, repo, opts['server'], force=True, rev=[repo[m].rev()])
+ trans.abort()
# Intentionally do not commit the transaction, so it will abort and undo
# the temporary changeset.