##// END OF EJS Templates
incoming: use `urlutil.get_pull_paths`...
marmoute -
r47694:dec31caf default
parent child Browse files
Show More
@@ -4311,16 +4311,17 b' def incoming(ui, repo, source=b"default"'
4311 4311 cmdutil.check_incompatible_arguments(opts, b'subrepos', [b'bundle'])
4312 4312
4313 4313 if opts.get(b'bookmarks'):
4314 source, branches = urlutil.parseurl(
4315 ui.expandpath(source), opts.get(b'branch')
4316 )
4314 srcs = urlutil.get_pull_paths(repo, ui, [source], opts.get(b'branch'))
4315 for source, branches in srcs:
4317 4316 other = hg.peer(repo, opts, source)
4318 4317 try:
4319 4318 if b'bookmarks' not in other.listkeys(b'namespaces'):
4320 4319 ui.warn(_(b"remote doesn't support bookmarks\n"))
4321 4320 return 0
4322 4321 ui.pager(b'incoming')
4323 ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(source))
4322 ui.status(
4323 _(b'comparing with %s\n') % urlutil.hidepassword(source)
4324 )
4324 4325 return bookmarks.incoming(ui, repo, other)
4325 4326 finally:
4326 4327 other.close()
@@ -1263,9 +1263,13 b' def _incoming('
1263 1263 (remoterepo, incomingchangesetlist, displayer) parameters,
1264 1264 and is supposed to contain only code that can't be unified.
1265 1265 """
1266 source, branches = urlutil.parseurl(
1267 ui.expandpath(source), opts.get(b'branch')
1268 )
1266 srcs = urlutil.get_pull_paths(repo, ui, [source], opts.get(b'branch'))
1267 srcs = list(srcs)
1268 if len(srcs) != 1:
1269 msg = _('for now, incoming supports only a single source, %d provided')
1270 msg %= len(srcs)
1271 raise error.Abort(msg)
1272 source, branches = srcs[0]
1269 1273 other = peer(repo, opts, source)
1270 1274 cleanupfn = other.close
1271 1275 try:
General Comments 0
You need to be logged in to leave comments. Login now