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