diff tests/test-subrepo-git.t @ 13087:cca0779b4832

subrepo: lazily update git's local tracking branches This continues the strategy of separation between hg pull and hg update in git subrepos by only dealing with git's branches on an update. This behavior tries to cover the bare essentials of the semantics of git pull in the subrepo when the parent repo does hg pull and hg update.
author Eric Eisner <ede@mit.edu>
date Sun, 28 Nov 2010 17:19:23 -0500
parents f930032aa6d5
children 8cecea387574
line wrap: on
line diff
--- a/tests/test-subrepo-git.t	Sun Nov 28 15:21:23 2010 -0500
+++ b/tests/test-subrepo-git.t	Sun Nov 28 17:19:23 2010 -0500
@@ -209,6 +209,31 @@
   adding file changes
   added 1 changesets with 1 changes to 1 files
 
+sync to upstream git, distribute changes
+
+  $ cd ../ta
+  $ hg pull -u -q
+  $ cd s
+  $ git pull -q
+  $ cd ..
+  $ hg commit -m 'git upstream sync'
+  committing subrepository $TESTTMP/ta/s
+  $ hg debugsub
+  path s
+   source   ../gitroot
+   revision 32a343883b74769118bb1d3b4b1fbf9156f4dddc
+  $ hg push -q
+
+  $ cd ../tb
+  $ hg pull -q
+  $ hg update
+  pulling subrepo s
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg debugsub
+  path s
+   source   ../gitroot
+   revision 32a343883b74769118bb1d3b4b1fbf9156f4dddc
+
 update to a revision without the subrepo, keeping the local git repository
 
   $ cd ../t
@@ -230,7 +255,7 @@
 archive subrepos
 
   $ cd ../t
-  $ hg archive --subrepos -r tip ../archive
+  $ hg archive --subrepos -r 5 ../archive
   pulling subrepo s
   $ cd ../archive
   $ cat s/f
@@ -239,4 +264,3 @@
   g
   gg
   ggg
-