Commits

Anonymous committed b032163

make taskspush work with new mercurial api
refs #15

Comments (0)

Files changed (1)

         return orig(ui, repo, dest, **opts)
 
     # get remote repo
-    dest, revs, checkout = hg.parseurl( ui.expandpath(dest or 'default-push',
+    dest, revs, checkout = hg.parseurl(ui.expandpath(dest or 'default-push',
         dest or 'default'), opts.get('rev'))
-    cmdutil.setremoteconfig(ui, opts)
-    remote = hg.repository(ui, dest)
+    try:
+        remote = hg.repository(cmdutil.remoteui(repo, opts), dest)
+    except AttributeError:
+        cmdutil.setremoteconfig(ui, opts)
+        remote = hg.repository(ui, dest)
 
     # suppress output of this since it unfortunately gets called again
     ui.pushbuffer()