Mercurial > public > mercurial-scm > hg-stable
diff tests/test-subrepo-git.t @ 13029:f930032aa6d5
subrepo: lazier git push logic
Avoids calls to git push when the revision is already known to be
in the remote repository. Now, when using a read-only git subrepo,
git will never need to talk to its upstream repository.
author | Eric Eisner <ede@mit.edu> |
---|---|
date | Sun, 21 Nov 2010 22:00:51 -0500 |
parents | 7f2ecb64140d |
children | cca0779b4832 |
line wrap: on
line diff
--- a/tests/test-subrepo-git.t Mon Nov 22 17:39:46 2010 +0100 +++ b/tests/test-subrepo-git.t Sun Nov 21 22:00:51 2010 -0500 @@ -134,6 +134,7 @@ $ hg push pushing to $TESTTMP/t + pushing branch testing of subrepo s searching for changes adding changesets adding manifests @@ -170,12 +171,44 @@ revision f47b465e1bce645dbf37232a00574aa1546ca8d3 $ hg push pushing to $TESTTMP/t + pushing branch testing of subrepo s searching for changes adding changesets adding manifests adding file changes added 2 changesets with 2 changes to 1 files +make upstream git changes + + $ cd .. + $ git clone -q gitroot gitclone + $ cd gitclone + $ echo ff >> f + $ git commit -q -a -m ff + $ echo fff >> f + $ git commit -q -a -m fff + $ git push -q origin testing + +make and push changes to hg without updating the subrepo + + $ cd ../t + $ hg clone . ../td + updating to branch default + cloning subrepo s + checking out detached HEAD in subrepo s + check out a git branch if you intend to make changes + 3 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd ../td + $ echo aa >> a + $ hg commit -m aa + $ 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 + update to a revision without the subrepo, keeping the local git repository $ cd ../t