# HG changeset patch # User Matt Mackall # Date 1306208950 18000 # Node ID 25137d99a5ed215f302ffc1793590bdbdb437b55 # Parent 253bda94372e30aef5e2dc6848f77166f5c2f1f9 subrepo: handle local added subrepo case correctly diff -r 253bda94372e -r 25137d99a5ed mercurial/subrepo.py --- a/mercurial/subrepo.py Mon May 23 23:22:47 2011 +0300 +++ b/mercurial/subrepo.py Mon May 23 22:49:10 2011 -0500 @@ -137,6 +137,10 @@ elif ld == a: # remote removed, local unchanged debug(s, "remote removed, remove") wctx.sub(s).remove() + elif a == nullstate: # not present in remote or ancestor + debug(s, "local added, keep") + sm[s] = l + continue else: if repo.ui.promptchoice( _(' local changed subrepository %s which remote removed\n'