##// END OF EJS Templates
outgoing: pass subrepo path using function argument instead of abssource hack...
marmoute -
r47692:0afe96e3 default
parent child Browse files
Show More
@@ -4985,11 +4985,7 b' def outgoing(ui, repo, dest=None, **opts'
4985 4985 finally:
4986 4986 other.close()
4987 4987
4988 repo._subtoppath = path.pushloc or path.loc
4989 try:
4990 return hg.outgoing(ui, repo, dest, opts)
4991 finally:
4992 del repo._subtoppath
4988 return hg.outgoing(ui, repo, dest, opts)
4993 4989
4994 4990
4995 4991 @command(
@@ -1320,7 +1320,7 b' def incoming(ui, repo, source, opts):'
1320 1320 return _incoming(display, subreporecurse, ui, repo, source, opts)
1321 1321
1322 1322
1323 def _outgoing(ui, repo, dest, opts):
1323 def _outgoing(ui, repo, dest, opts, subpath=None):
1324 1324 path = ui.getpath(dest, default=(b'default-push', b'default'))
1325 1325 if not path:
1326 1326 raise error.Abort(
@@ -1328,6 +1328,15 b' def _outgoing(ui, repo, dest, opts):'
1328 1328 hint=_(b"see 'hg help config.paths'"),
1329 1329 )
1330 1330 dest = path.pushloc or path.loc
1331 if subpath is not None:
1332 subpath = urlutil.url(subpath)
1333 if subpath.isabs():
1334 dest = bytes(subpath)
1335 else:
1336 p = urlutil.url(dest)
1337 p.path = os.path.normpath(b'%s/%s' % (p.path, subpath))
1338 dest = bytes(p)
1339
1331 1340 branches = path.branch, opts.get(b'branch') or []
1332 1341
1333 1342 ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(dest))
@@ -1382,10 +1391,10 b' def _outgoing_filter(repo, revs, opts):'
1382 1391 yield n
1383 1392
1384 1393
1385 def outgoing(ui, repo, dest, opts):
1394 def outgoing(ui, repo, dest, opts, subpath=None):
1386 1395 if opts.get(b'graph'):
1387 1396 logcmdutil.checkunsupportedgraphflags([], opts)
1388 o, other = _outgoing(ui, repo, dest, opts)
1397 o, other = _outgoing(ui, repo, dest, opts, subpath=subpath)
1389 1398 ret = 1
1390 1399 try:
1391 1400 if o:
@@ -873,7 +873,8 b' class hgsubrepo(abstractsubrepo):'
873 873 opts = copy.copy(opts)
874 874 opts.pop(b'rev', None)
875 875 opts.pop(b'branch', None)
876 return hg.outgoing(ui, self._repo, _abssource(self._repo, True), opts)
876 subpath = subrepoutil.repo_rel_or_abs_source(self._repo)
877 return hg.outgoing(ui, self._repo, dest, opts, subpath=subpath)
877 878
878 879 @annotatesubrepoerror
879 880 def incoming(self, ui, source, opts):
General Comments 0
You need to be logged in to leave comments. Login now