brianar  committed 56ae2c1

Updating the push functionality to be compatible with the changes made to the api in 1.5 and 1.6

  • Participants
  • Parent commits 3e41ef4

Comments (0)

Files changed (1)

File hgext/

 from mercurial.i18n import _
 from mercurial.node import nullid, nullrev, hex, short
 from mercurial import util, commands, localrepo, repair, extensions, hg
-from mercurial import cmdutil, url, error, patch
+from mercurial import cmdutil, url, error, patch, discovery
 import os, time, shutil, errno
 def prettynode(ui, repo, node):
 def outgoingnodes(ui, repo, dest=None, **opts):
     # get remote repo
-    dest, revs, checkout = hg.parseurl(ui.expandpath(dest or 'default-push',
+    dest, branches = hg.parseurl(ui.expandpath(dest or 'default-push',
         dest or 'default'), opts.get('rev'))
-        remote = hg.repository(cmdutil.remoteui(repo, opts), dest)
+        remote = hg.repository(hg.remoteui(repo, opts), dest)
     except AttributeError:
         cmdutil.setremoteconfig(ui, opts)
         remote = hg.repository(ui, dest)
+    revs, checkout = hg.addbranchrevs(repo, remote, branches, None)
     # suppress output
-    out = repo.findoutgoing(remote, None)
+    out = discovery.findoutgoing(repo, remote, None)