changeset 14417:25137d99a5ed

subrepo: handle local added subrepo case correctly
author Matt Mackall <mpm@selenic.com>
date Mon, 23 May 2011 22:49:10 -0500
parents 253bda94372e
children 0174d1f79280
files mercurial/subrepo.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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'