Mercurial > public > mercurial-scm > hg-stable
diff tests/test-subrepo-git.t @ 12994:845c602b8635
subrepo: allow git subrepos to push and merge
(master branch only)
gitsubrepo based on patch from David Soria Parra:
http://bitbucket.org/segv/davids-poor-git-subrepo-attempt/
author | Eric Eisner <ede@mit.edu> |
---|---|
date | Sun, 14 Nov 2010 18:22:33 -0500 |
parents | a91334380699 |
children | d90fc91c8377 |
line wrap: on
line diff
--- 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