Skip to content
Snippets Groups Projects
Commit 5135c2be6959 authored by Matt Harbison's avatar Matt Harbison
Browse files

subrepo: don't pass the outer repo's --rev or --branch to subrepo outgoing()

The previous behavior didn't reflect what would actually be pushed- push will
ignore --rev and --branch in the subrepo and push everything.  Therefore,
'push -r {rev}' would not list everything, unless {rev} was also the revision of
the subrepo's tip.  Worse, if a hash was passed in, the command would abort
because that hash would either not be in the outer repo or not in the subrepo.
parent 89fe9921511f
No related branches found
No related tags found
No related merge requests found
...@@ -873,6 +873,10 @@ ...@@ -873,6 +873,10 @@
@annotatesubrepoerror @annotatesubrepoerror
def outgoing(self, ui, dest, opts): def outgoing(self, ui, dest, opts):
if 'rev' in opts or 'branch' in opts:
opts = copy.copy(opts)
opts.pop('rev', None)
opts.pop('branch', None)
return hg.outgoing(ui, self._repo, _abssource(self._repo, True), opts) return hg.outgoing(ui, self._repo, _abssource(self._repo, True), opts)
@annotatesubrepoerror @annotatesubrepoerror
......
...@@ -598,6 +598,26 @@ ...@@ -598,6 +598,26 @@
$ echo foo >> s/ss/a $ echo foo >> s/ss/a
$ hg -R s/ss commit -m 'test dirty store detection' $ hg -R s/ss commit -m 'test dirty store detection'
$ hg out -S -r `hg log -r tip -T "{node|short}"`
comparing with $TESTTMP/t (glob)
searching for changes
no changes found
comparing with $TESTTMP/t/s
searching for changes
no changes found
comparing with $TESTTMP/t/s/ss
searching for changes
changeset: 1:79ea5566a333
tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: test dirty store detection
comparing with $TESTTMP/t/t
searching for changes
no changes found
$ hg push $ hg push
pushing to $TESTTMP/t (glob) pushing to $TESTTMP/t (glob)
pushing subrepo s/ss to $TESTTMP/t/s/ss (glob) pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment