--- a/tests/test-subrepo-git.t Sun Nov 14 18:20:13 2010 -0500
+++ b/tests/test-subrepo-git.t Sun Nov 14 18:22:33 2010 -0500
@@ -81,3 +81,93 @@
path s
source ../gitroot
revision da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
+
+make $GITROOT pushable, by replacing it with a clone with nothing checked out
+
+ $ cd ..
+ $ git clone gitroot gitrootbare --bare -q
+ $ rm -rf gitroot
+ $ mv gitrootbare gitroot
+
+clone root, make local change
+
+ $ cd t
+ $ hg clone . ../ta
+ updating to branch default
+ cloning subrepo s
+ 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+ $ cd ../ta
+ $ echo ggg >> s/g
+ $ hg commit -m ggg
+ committing subrepository $TESTTMP/ta/s
+ $ hg debugsub
+ path s
+ source ../gitroot
+ revision 79695940086840c99328513acbe35f90fcd55e57
+
+clone root separately, make different local change
+
+ $ cd ../t
+ $ hg clone . ../tb
+ updating to branch default
+ cloning subrepo s
+ 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+ $ cd ../tb/s
+ $ echo f > f
+ $ git add f
+ $ cd ..
+
+ $ hg commit -m f
+ committing subrepository $TESTTMP/tb/s
+ $ hg debugsub
+ path s
+ source ../gitroot
+ revision aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
+
+user b push changes
+
+ $ hg push
+ pushing to $TESTTMP/t
+ searching for changes
+ adding changesets
+ adding manifests
+ adding file changes
+ added 1 changesets with 1 changes to 1 files
+
+user a pulls, merges, commits
+
+ $ cd ../ta
+ $ hg pull
+ pulling from $TESTTMP/t
+ searching for changes
+ adding changesets
+ adding manifests
+ adding file changes
+ added 1 changesets with 1 changes to 1 files (+1 heads)
+ (run 'hg heads' to see heads, 'hg merge' to merge)
+ $ hg merge
+ Automatic merge went well; stopped before committing as requested
+ pulling subrepo s
+ 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ (branch merge, don't forget to commit)
+ $ cat s/f
+ f
+ $ cat s/g
+ g
+ gg
+ ggg
+ $ hg commit -m 'merge'
+ committing subrepository $TESTTMP/ta/s
+ $ hg debugsub
+ path s
+ source ../gitroot
+ revision f47b465e1bce645dbf37232a00574aa1546ca8d3
+ $ hg push
+ pushing to $TESTTMP/t
+ searching for changes
+ adding changesets
+ adding manifests
+ adding file changes
+ added 2 changesets with 2 changes to 1 files