[issue3166] Unnecessary subrepo push blocks main repo push

Piotr Klecha bugs at mercurial.selenic.com
Tue Dec 20 12:12:45 CST 2011


New submission from Piotr Klecha <pklecha at forcom.com.pl>:

Before making a push on main repo, Mercurial performs a full push on all 
subrepos, even if outgoing main repo revisions do not contain any changes 
to subrepos. This is particularly problematic if a subrepo contains 
unpushed revisions - push will fail if it creates remote heads and/or 
branches (especially if target repo has hooks that prevent this, so passing 
--new-branch and --force options won't help). However, there is no need to 
push those subrepo revisions at all, since they are not referenced by any 
main repo revisions - main repo push will definitely not break anything and 
should be allowed to proceed.

So IMHO this is what should happen in such case: before attempting a 
subrepo push check outgoing main repo revisions substates and pick those 
that differ from substates of their (already pushed) parents. If there are 
any such substates, use them as arguments of their respective subrepo 
pushes. Once those are completed (or there were none to push) main repo 
push can proceed.

----------
messages: 18379
nosy: czarnyczarodziej
priority: bug
status: unread
title: Unnecessary subrepo push blocks main repo push

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3166>
____________________________________________________


More information about the Mercurial-devel mailing list