[PATCH 2 of 7] test-subrepo-git.t: make gitroot pushable earlier

Eric Eisner ede at MIT.EDU
Mon Dec 6 20:37:06 CST 2010


# HG changeset patch
# User Eric Eisner <ede at mit.edu>
# Date 1291688247 18000
# Node ID 83986af605e5b3f756fdd6eecfe185574119f400
# Parent  8cecea3875747a9f088240426129495724f9eeda
test-subrepo-git.t: make gitroot pushable earlier

Older git versions get confused when the git repo becomes bare.

diff --git a/tests/test-subrepo-git.t b/tests/test-subrepo-git.t
--- a/tests/test-subrepo-git.t
+++ b/tests/test-subrepo-git.t
@@ -59,8 +59,16 @@ record a new commit from upstream from a
    source   ../gitroot
    revision 126f2a14290cd5ce061fdedc430170e8d39e1c5a
 
+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
 
+  $ cd t
   $ hg clone . ../tc
   updating to branch default
   cloning subrepo s
@@ -82,16 +90,9 @@ update to previous substate
    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
+  $ cd ../t
   $ hg clone . ../ta
   updating to branch default
   cloning subrepo s


More information about the Mercurial-devel mailing list