Mercurial > evolve
diff tests/test-sharing.t @ 1259:0daf56a2032d stable
docs: update sharing guide based (mostly) on marmoute's review
- don't claim certain scenarios are more/less common, just
simple/advanced
- mention code review as a multiple-developer scenario (not described
in detail yet!)
- suggest "hg config --edit --local" instead of "cat >> .hg/hgrc"
- use -q less often (and show resulting output)
- edit some section headers to be consistent with user guide
(example numbers; "amend" instead of "amending")
(These are just the small changes; big changes are yet to come.)
author | Greg Ward <greg@gerg.ca> |
---|---|
date | Tue, 14 Apr 2015 12:43:37 -0400 |
parents | be31c34bb341 |
children | 56cc2eb5995a |
line wrap: on
line diff
--- a/tests/test-sharing.t Mon Apr 20 13:52:43 2015 +0200 +++ b/tests/test-sharing.t Tue Apr 14 12:43:37 2015 -0400 @@ -11,8 +11,12 @@ > EOF $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH $ hg init public - $ hg clone -q public test-repo - $ hg clone -q test-repo dev-repo + $ hg clone public test-repo + updating to branch default + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg clone test-repo dev-repo + updating to branch default + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat >> test-repo/.hg/hgrc <<EOF > [phases] > publish = false @@ -24,12 +28,26 @@ $ echo 'my new project' > file1 $ hg add file1 $ hg commit -m'create new project' - $ hg push -q + $ hg push + pushing to $TESTTMP/public + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files and pull that into the development repository:: $ cd ../dev-repo - $ hg pull -q -u + $ hg pull -u + pulling from $TESTTMP/test-repo + requesting all changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + pull obsolescence markers + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved Let's commit a preliminary change and push it to ``test-repo`` for testing. :: @@ -92,7 +110,8 @@ Figure SG04 (test-repo) $ cd ../test-repo - $ hg update -q + $ hg update + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg shortlog --hidden -G @ 4:de6151c48e1c draft fix bug 37 | @@ -132,8 +151,12 @@ First, setup repos for them. $ cd .. - $ hg clone -q public alice - $ hg clone -q public bob + $ hg clone public alice + updating to branch default + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg clone public bob + updating to branch default + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat >> alice/.hg/hgrc <<EOF > [phases] > publish = false @@ -143,13 +166,23 @@ Alice commits a bug fix. $ cd alice $ echo 'fix' > file2 - $ hg commit -q -A -u alice -m 'fix bug 15' + $ hg commit -A -u alice -m 'fix bug 15' + adding file2 Bob pulls and amends Alice's fix. $ cd ../bob - $ hg pull -q -u ../alice + $ hg pull -u ../alice + pulling from ../alice + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + pull obsolescence markers + 0 obsolescence markers added + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ echo 'Fix.' > file2 - $ hg amend -q -A -u bob -m 'fix bug 15 (amended)' + $ hg amend -A -u bob -m 'fix bug 15 (amended)' Figure SG06: Bob's repository after amending Alice's fix. (Nothing new here; we could have seen this in the user guide. @@ -167,7 +200,15 @@ But in the meantime, Alice decides the fix is just fine and publishes it. $ cd ../alice - $ hg push -q + $ hg push + pushing to $TESTTMP/public + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + pushing 4 obsolescence markers (369 bytes) + 0 obsolescence markers added Which means that Bob now has an formerly obsolete changeset that is also public (2:6e83). As soon as he pulls its phase change, he's got @@ -234,7 +275,16 @@ Alice pulls Bob's fix and improves it. $ cd ../alice - $ hg pull -q -u ../bob + $ hg pull -u ../bob + pulling from ../bob + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + pull obsolescence markers + 0 obsolescence markers added + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ echo 'better (alice)' >> file1 $ hg amend -u alice -m 'fix bug 24 (v2 by alice)'