diff -r ab668c92a036 -r e87b0fc4750b mercurial/commands.py --- a/mercurial/commands.py Mon Jun 15 02:45:38 2009 -0500 +++ b/mercurial/commands.py Mon Jun 15 02:46:20 2009 -0500 @@ -2289,6 +2289,13 @@ ui.status(_('pushing to %s\n') % url.hidepassword(dest)) if revs: revs = [repo.lookup(rev) for rev in revs] + + # push subrepos depth-first for coherent ordering + c = repo[''] + subs = c.substate # only repos that are committed + for s in sorted(subs): + c.sub(s).push(opts.get('force')) + r = repo.push(other, opts.get('force'), revs=revs) return r == 0