--- a/tests/test-subrepo Fri Apr 30 19:49:35 2010 -0300
+++ b/tests/test-subrepo Fri Apr 30 19:50:37 2010 -0300
@@ -207,4 +207,24 @@
| "$TESTDIR/filtertmp.py"
rm -rf mercurial mercurial2
+echo % issue 1977
+hg init repo
+hg init repo/s
+echo a > repo/s/a
+hg -R repo/s ci -Am0
+echo s = s > repo/.hgsub
+hg -R repo ci -Am1
+hg clone repo repo2
+hg -q -R repo2 pull -u
+echo 1 > repo2/s/a
+hg -R repo2/s ci -m2
+hg -q -R repo2/s push
+hg -R repo2/s up -C 0
+echo 2 > repo2/s/a
+hg -R repo2/s ci -m3
+hg -R repo2 ci -m3
+hg -q -R repo2 push
+hg -R repo update
+rm -rf repo2 repo
+
exit 0
--- a/tests/test-subrepo.out Fri Apr 30 19:49:35 2010 -0300
+++ b/tests/test-subrepo.out Fri Apr 30 19:50:37 2010 -0300
@@ -261,3 +261,20 @@
default = $HGTMP/test-subrepo/sub/mercurial/nested_absolute
[paths]
default = $HGTMP/test-subrepo/sub/mercurial/main/../nested_relative
+% issue 1977
+adding a
+adding .hgsub
+committing subrepository s
+updating to branch default
+pulling subrepo s
+requesting all changes
+adding changesets
+adding manifests
+adding file changes
+added 1 changesets with 1 changes to 1 files
+2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+created new head
+committing subrepository s
+abort: push creates new remote heads on branch 'default'!
+0 files updated, 0 files merged, 0 files removed, 0 files unresolved