##// END OF EJS Templates
fold-or-prune-me: update proposal...
marmoute -
r52887:fc317bd5 stable
parent child Browse files
Show More
@@ -1420,44 +1420,58 b' def incoming(ui, repo, source, opts, sub'
1420 )
1420 )
1421
1421
1422
1422
1423 _no_subtoppath = object()
1424
1425
1423 def _outgoing(ui, repo, dests, opts, subpath=None):
1426 def _outgoing(ui, repo, dests, opts, subpath=None):
1424 out = set()
1427 out = set()
1425 others = []
1428 others = []
1426 for path in urlutil.get_push_paths(repo, ui, dests):
1429 for path in urlutil.get_push_paths(repo, ui, dests):
1427 dest = path.loc
1430 dest = path.loc
1428 repo._subtoppath = dest
1431 prev_subtopath = getattr(repo, "_subtoppath", _no_subtoppath)
1429 if subpath is not None:
1432 try:
1430 subpath = urlutil.url(subpath)
1433 repo._subtoppath = dest
1431 if subpath.isabs():
1434 if subpath is not None:
1432 dest = bytes(subpath)
1435 subpath = urlutil.url(subpath)
1433 else:
1436 if subpath.isabs():
1434 p = urlutil.url(dest)
1437 dest = bytes(subpath)
1435 if p.islocal():
1436 normpath = os.path.normpath
1437 else:
1438 else:
1438 normpath = posixpath.normpath
1439 p = urlutil.url(dest)
1439 p.path = normpath(b'%s/%s' % (p.path, subpath))
1440 if p.islocal():
1440 dest = bytes(p)
1441 normpath = os.path.normpath
1441 branches = path.branch, opts.get(b'branch') or []
1442 else:
1443 normpath = posixpath.normpath
1444 p.path = normpath(b'%s/%s' % (p.path, subpath))
1445 dest = bytes(p)
1446 branches = path.branch, opts.get(b'branch') or []
1442
1447
1443 ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(dest))
1448 ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(dest))
1444 revs, checkout = addbranchrevs(repo, repo, branches, opts.get(b'rev'))
1449 revs, checkout = addbranchrevs(
1445 if revs:
1450 repo, repo, branches, opts.get(b'rev')
1446 revs = [repo[rev].node() for rev in logcmdutil.revrange(repo, revs)]
1451 )
1452 if revs:
1453 revs = [
1454 repo[rev].node() for rev in logcmdutil.revrange(repo, revs)
1455 ]
1447
1456
1448 other = peer(repo, opts, dest)
1457 other = peer(repo, opts, dest)
1449 try:
1458 try:
1450 outgoing = discovery.findcommonoutgoing(
1459 outgoing = discovery.findcommonoutgoing(
1451 repo, other, revs, force=opts.get(b'force')
1460 repo, other, revs, force=opts.get(b'force')
1452 )
1461 )
1453 o = outgoing.missing
1462 o = outgoing.missing
1454 out.update(o)
1463 out.update(o)
1455 if not o:
1464 if not o:
1456 scmutil.nochangesfound(repo.ui, repo, outgoing.excluded)
1465 scmutil.nochangesfound(repo.ui, repo, outgoing.excluded)
1457 others.append(other)
1466 others.append(other)
1458 except: # re-raises
1467 except: # re-raises
1459 other.close()
1468 other.close()
1460 raise
1469 raise
1470 finally:
1471 if prev_subtopath is _no_subtoppath:
1472 del repo._subtoppath
1473 else:
1474 repo._subtoppath = prev_subtopath
1461 # make sure this is ordered by revision number
1475 # make sure this is ordered by revision number
1462 outgoing_revs = list(out)
1476 outgoing_revs = list(out)
1463 cl = repo.changelog
1477 cl = repo.changelog
@@ -1529,7 +1543,6 b' def outgoing(ui, repo, dests, opts, subp'
1529 finally:
1543 finally:
1530 for oth in others:
1544 for oth in others:
1531 oth.close()
1545 oth.close()
1532 del repo._subtoppath
1533
1546
1534
1547
1535 def verify(repo, level=None):
1548 def verify(repo, level=None):
General Comments 0
You need to be logged in to leave comments. Login now