Submitter | timeless@gcc2-power8.osuosl.org |
---|---|
Date | Dec. 31, 2015, 7:41 a.m. |
Message ID | <1c05a339cbaff1bd145a.1451547714@gcc2-power8.osuosl.org> |
Download | mbox | patch |
Permalink | /patch/12465/ |
State | Changes Requested |
Delegated to: | Yuya Nishihara |
Headers | show |
Comments
On Thu, 31 Dec 2015 07:41:54 +0000, timeless@gcc2-power8.osuosl.org wrote: > # HG changeset patch > # User timeless <timeless@mozdev.org> > # Date 1451543379 0 > # Thu Dec 31 06:29:39 2015 +0000 > # Node ID 1c05a339cbaff1bd145ac3b909d447dbd275d290 > # Parent 23541bdd1610c08af247f9c8719045cf247ce541 > debugdiscovery: support default-push > > diff -r 23541bdd1610 -r 1c05a339cbaf mercurial/commands.py > --- a/mercurial/commands.py Wed Dec 23 16:22:20 2015 -0800 > +++ b/mercurial/commands.py Thu Dec 31 06:29:39 2015 +0000 > @@ -2271,9 +2271,12 @@ > _('use old-style discovery with non-heads included')), > ] + remoteopts, > _('[-l REV] [-r REV] [-b BRANCH]... [OTHER]')) > -def debugdiscovery(ui, repo, remoteurl="default", **opts): > +def debugdiscovery(ui, repo, remoteurl=None, **opts): > """runs the changeset discovery protocol in isolation""" > - remoteurl, branches = hg.parseurl(ui.expandpath(remoteurl), > + > + remoteurl = ui.expandpath(remoteurl or 'default-push', > + remoteurl or 'default') > + remoteurl, branches = hg.parseurl(remoteurl, > opts.get('branch')) > remote = hg.peer(repo, opts, remoteurl) It should be ported to new ui.paths.getpath() API. Can you take a look?
OK On Jan 3, 2016 10:08 AM, "Yuya Nishihara" <yuya@tcha.org> wrote: > On Thu, 31 Dec 2015 07:41:54 +0000, timeless@gcc2-power8.osuosl.org wrote: > > # HG changeset patch > > # User timeless <timeless@mozdev.org> > > # Date 1451543379 0 > > # Thu Dec 31 06:29:39 2015 +0000 > > # Node ID 1c05a339cbaff1bd145ac3b909d447dbd275d290 > > # Parent 23541bdd1610c08af247f9c8719045cf247ce541 > > debugdiscovery: support default-push > > > > diff -r 23541bdd1610 -r 1c05a339cbaf mercurial/commands.py > > --- a/mercurial/commands.py Wed Dec 23 16:22:20 2015 -0800 > > +++ b/mercurial/commands.py Thu Dec 31 06:29:39 2015 +0000 > > @@ -2271,9 +2271,12 @@ > > _('use old-style discovery with non-heads included')), > > ] + remoteopts, > > _('[-l REV] [-r REV] [-b BRANCH]... [OTHER]')) > > -def debugdiscovery(ui, repo, remoteurl="default", **opts): > > +def debugdiscovery(ui, repo, remoteurl=None, **opts): > > """runs the changeset discovery protocol in isolation""" > > - remoteurl, branches = hg.parseurl(ui.expandpath(remoteurl), > > + > > + remoteurl = ui.expandpath(remoteurl or 'default-push', > > + remoteurl or 'default') > > + remoteurl, branches = hg.parseurl(remoteurl, > > opts.get('branch')) > > remote = hg.peer(repo, opts, remoteurl) > > It should be ported to new ui.paths.getpath() API. Can you take a look? > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@selenic.com > https://selenic.com/mailman/listinfo/mercurial-devel >
Patch
diff -r 23541bdd1610 -r 1c05a339cbaf mercurial/commands.py --- a/mercurial/commands.py Wed Dec 23 16:22:20 2015 -0800 +++ b/mercurial/commands.py Thu Dec 31 06:29:39 2015 +0000 @@ -2271,9 +2271,12 @@ _('use old-style discovery with non-heads included')), ] + remoteopts, _('[-l REV] [-r REV] [-b BRANCH]... [OTHER]')) -def debugdiscovery(ui, repo, remoteurl="default", **opts): +def debugdiscovery(ui, repo, remoteurl=None, **opts): """runs the changeset discovery protocol in isolation""" - remoteurl, branches = hg.parseurl(ui.expandpath(remoteurl), + + remoteurl = ui.expandpath(remoteurl or 'default-push', + remoteurl or 'default') + remoteurl, branches = hg.parseurl(remoteurl, opts.get('branch')) remote = hg.peer(repo, opts, remoteurl) ui.status(_('comparing with %s\n') % util.hidepassword(remoteurl))