##// END OF EJS Templates
path: pass `path` to `peer` in `hg incoming`...
marmoute -
r50613:e64b1e9f default
parent child Browse files
Show More
@@ -1311,23 +1311,28 b' def _incoming('
1311 1311 msg %= len(srcs)
1312 1312 raise error.Abort(msg)
1313 1313 path = srcs[0]
1314 source, branches = urlutil.parseurl(path.rawloc, opts.get(b'branch'))
1315 if subpath is not None:
1314 if subpath is None:
1315 peer_path = path
1316 url = path.loc
1317 else:
1318 # XXX path: we are losing the `path` object here. Keeping it would be
1319 # valuable. For example as a "variant" as we do for pushes.
1316 1320 subpath = urlutil.url(subpath)
1317 1321 if subpath.isabs():
1318 source = bytes(subpath)
1322 peer_path = url = bytes(subpath)
1319 1323 else:
1320 p = urlutil.url(source)
1324 p = urlutil.url(path.loc)
1321 1325 if p.islocal():
1322 1326 normpath = os.path.normpath
1323 1327 else:
1324 1328 normpath = posixpath.normpath
1325 1329 p.path = normpath(b'%s/%s' % (p.path, subpath))
1326 source = bytes(p)
1327 other = peer(repo, opts, source)
1330 peer_path = url = bytes(p)
1331 other = peer(repo, opts, peer_path)
1328 1332 cleanupfn = other.close
1329 1333 try:
1330 ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(source))
1334 ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(url))
1335 branches = (path.branch, opts.get(b'branch', []))
1331 1336 revs, checkout = addbranchrevs(repo, other, branches, opts.get(b'rev'))
1332 1337
1333 1338 if revs:
General Comments 0
You need to be logged in to leave comments. Login now