tests/test-sharing.t
changeset 1544 3e907ff1981f
parent 1477 6ab5c0f40699
child 1595 edcd2f0474c8
equal deleted inserted replaced
1543:54394d2aaf5e 1544:3e907ff1981f
   385   1 new obsolescence markers
   385   1 new obsolescence markers
   386   updating bookmark bug15
   386   updating bookmark bug15
   387 
   387 
   388 Figure SG08: review and public changesets after Alice pushes.
   388 Figure SG08: review and public changesets after Alice pushes.
   389   $ hg --hidden -R ../review shortlog -G -r 1::
   389   $ hg --hidden -R ../review shortlog -G -r 1::
   390   o  7:a06ec1bf97bd  public  fix bug 15 (v2)
   390   o  7:754cbfea9b13  public  fix bug 15 (v2)
   391   |
   391   |
   392   o  6:540ba8f317e6  public  implement feature X (v3)
   392   o  6:540ba8f317e6  public  implement feature X (v3)
   393   |
   393   |
   394   | x  5:0eb74a7b6698  draft  implement feature X (v2)
   394   | x  5:0eb74a7b6698  draft  implement feature X (v2)
   395   |/
   395   |/
   400   | x  2:f91e97234c2b  draft  fix bug 15 (v1)
   400   | x  2:f91e97234c2b  draft  fix bug 15 (v1)
   401   |/
   401   |/
   402   @  1:de6151c48e1c  public  fix bug 37
   402   @  1:de6151c48e1c  public  fix bug 37
   403   |
   403   |
   404   $ hg --hidden -R ../public shortlog -G -r 1::
   404   $ hg --hidden -R ../public shortlog -G -r 1::
   405   o  3:a06ec1bf97bd  public  fix bug 15 (v2)
   405   o  3:754cbfea9b13  public  fix bug 15 (v2)
   406   |
   406   |
   407   o  2:540ba8f317e6  public  implement feature X (v3)
   407   o  2:540ba8f317e6  public  implement feature X (v3)
   408   |
   408   |
   409   o  1:de6151c48e1c  public  fix bug 37
   409   o  1:de6151c48e1c  public  fix bug 37
   410   |
   410   |
   429 
   429 
   430   $ cd bob
   430   $ cd bob
   431   $ echo 'pretty good fix' >> file1
   431   $ echo 'pretty good fix' >> file1
   432   $ hg commit -u bob -m 'fix bug 24 (v1)'
   432   $ hg commit -u bob -m 'fix bug 24 (v1)'
   433   $ hg shortlog -r .
   433   $ hg shortlog -r .
   434   4:2fe6c4bd32d0  draft  fix bug 24 (v1)
   434   4:6d407e4bc7f4  draft  fix bug 24 (v1)
   435 
   435 
   436 Since Alice and Bob are now in cowboy mode, Alice pulls Bob's draft
   436 Since Alice and Bob are now in cowboy mode, Alice pulls Bob's draft
   437 changeset and amends it herself. ::
   437 changeset and amends it herself. ::
   438 
   438 
   439   $ cd ../alice
   439   $ cd ../alice
   452 
   452 
   453   $ cd ../bob
   453   $ cd ../bob
   454   $ echo 'better fix (bob)' >> file1
   454   $ echo 'better fix (bob)' >> file1
   455   $ hg amend -u bob -m 'fix bug 24 (v2 by bob)'
   455   $ hg amend -u bob -m 'fix bug 24 (v2 by bob)'
   456   $ hg --hidden shortlog -G -r 3::
   456   $ hg --hidden shortlog -G -r 3::
   457   @  6:a360947f6faf  draft  fix bug 24 (v2 by bob)
   457   @  6:059a6be5b63a  draft  fix bug 24 (v2 by bob)
   458   |
   458   |
   459   | x  5:3466c7f5a149  draft  temporary amend commit for 2fe6c4bd32d0
   459   | x  5:a2493482aafe  draft  temporary amend commit for 6d407e4bc7f4
   460   | |
   460   | |
   461   | x  4:2fe6c4bd32d0  draft  fix bug 24 (v1)
   461   | x  4:6d407e4bc7f4  draft  fix bug 24 (v1)
   462   |/
   462   |/
   463   o  3:a06ec1bf97bd  public  fix bug 15 (v2)
   463   o  3:754cbfea9b13  public  fix bug 15 (v2)
   464   |
   464   |
   465 
   465 
   466 Bob discovers the divergence.
   466 Bob discovers the divergence.
   467   $ hg pull ../alice
   467   $ hg pull ../alice
   468   pulling from ../alice
   468   pulling from ../alice
   475   (run 'hg heads' to see heads, 'hg merge' to merge)
   475   (run 'hg heads' to see heads, 'hg merge' to merge)
   476   2 new divergent changesets
   476   2 new divergent changesets
   477 
   477 
   478 Figure SG09: multiple heads! divergence! oh my!
   478 Figure SG09: multiple heads! divergence! oh my!
   479   $ hg --hidden shortlog -G -r 3::
   479   $ hg --hidden shortlog -G -r 3::
   480   o  7:e3f99ce9d9cd  draft  fix bug 24 (v2 by alice)
   480   o  7:cdcc922d8d15  draft  fix bug 24 (v2 by alice)
   481   |
   481   |
   482   | @  6:a360947f6faf  draft  fix bug 24 (v2 by bob)
   482   | @  6:059a6be5b63a  draft  fix bug 24 (v2 by bob)
   483   |/
   483   |/
   484   | x  5:3466c7f5a149  draft  temporary amend commit for 2fe6c4bd32d0
   484   | x  5:a2493482aafe  draft  temporary amend commit for 6d407e4bc7f4
   485   | |
   485   | |
   486   | x  4:2fe6c4bd32d0  draft  fix bug 24 (v1)
   486   | x  4:6d407e4bc7f4  draft  fix bug 24 (v1)
   487   |/
   487   |/
   488   o  3:a06ec1bf97bd  public  fix bug 15 (v2)
   488   o  3:754cbfea9b13  public  fix bug 15 (v2)
   489   |
   489   |
   490   $ hg --hidden shortlog -r 'successors(2fe6)'
   490   $ hg --hidden shortlog -r 'successors(6d407)'
   491   6:a360947f6faf  draft  fix bug 24 (v2 by bob)
   491   6:059a6be5b63a  draft  fix bug 24 (v2 by bob)
   492   7:e3f99ce9d9cd  draft  fix bug 24 (v2 by alice)
   492   7:cdcc922d8d15  draft  fix bug 24 (v2 by alice)
   493 
   493 
   494 Use evolve to fix the divergence.
   494 Use evolve to fix the divergence.
   495   $ HGMERGE=internal:other hg evolve --divergent
   495   $ HGMERGE=internal:other hg evolve --divergent
   496   merge:[6] fix bug 24 (v2 by bob)
   496   merge:[6] fix bug 24 (v2 by bob)
   497   with: [7] fix bug 24 (v2 by alice)
   497   with: [7] fix bug 24 (v2 by alice)
   498   base: [4] fix bug 24 (v1)
   498   base: [4] fix bug 24 (v1)
   499   0 files updated, 1 files merged, 0 files removed, 0 files unresolved
   499   0 files updated, 1 files merged, 0 files removed, 0 files unresolved
   500   working directory is now at 5ad6037c046c
   500   working directory is now at 70e807c6e67f
   501   $ hg log -q -r 'divergent()'
   501   $ hg log -q -r 'divergent()'
   502 
   502 
   503 Figure SG10: Bob's repository after fixing divergence.
   503 Figure SG10: Bob's repository after fixing divergence.
   504   $ hg --hidden shortlog -G -r 3::
   504   $ hg --hidden shortlog -G -r 3::
   505   @  9:5ad6037c046c  draft  fix bug 24 (v2 by bob)
   505   @  9:70e807c6e67f  draft  fix bug 24 (v2 by bob)
   506   |
   506   |
   507   | x  8:bcfc9a755ac3  draft  temporary amend commit for a360947f6faf
   507   | x  8:d8d2e15ab73d  draft  temporary amend commit for 059a6be5b63a
   508   | |
   508   | |
   509   +---x  7:e3f99ce9d9cd  draft  fix bug 24 (v2 by alice)
   509   +---x  7:cdcc922d8d15  draft  fix bug 24 (v2 by alice)
   510   | |
   510   | |
   511   | x  6:a360947f6faf  draft  fix bug 24 (v2 by bob)
   511   | x  6:059a6be5b63a  draft  fix bug 24 (v2 by bob)
   512   |/
   512   |/
   513   | x  5:3466c7f5a149  draft  temporary amend commit for 2fe6c4bd32d0
   513   | x  5:a2493482aafe  draft  temporary amend commit for 6d407e4bc7f4
   514   | |
   514   | |
   515   | x  4:2fe6c4bd32d0  draft  fix bug 24 (v1)
   515   | x  4:6d407e4bc7f4  draft  fix bug 24 (v1)
   516   |/
   516   |/
   517   o  3:a06ec1bf97bd  public  fix bug 15 (v2)
   517   o  3:754cbfea9b13  public  fix bug 15 (v2)
   518   |
   518   |
   519   $ hg --hidden shortlog -r 'precursors(9)'
   519   $ hg --hidden shortlog -r 'precursors(9)'
   520   6:a360947f6faf  draft  fix bug 24 (v2 by bob)
   520   6:059a6be5b63a  draft  fix bug 24 (v2 by bob)
   521   7:e3f99ce9d9cd  draft  fix bug 24 (v2 by alice)
   521   7:cdcc922d8d15  draft  fix bug 24 (v2 by alice)
   522   $ cat file1
   522   $ cat file1
   523   Do stuff.
   523   Do stuff.
   524   pretty good fix
   524   pretty good fix
   525   better fix (alice)
   525   better fix (alice)