tests/test-sharing.t
branchmercurial-3.7
changeset 1818 f23df9d65565
parent 1748 83cf722eafc3
child 1751 bc590681de77
equal deleted inserted replaced
1817:5c86af0da91d 1818:f23df9d65565
    87   adding manifests
    87   adding manifests
    88   adding file changes
    88   adding file changes
    89   added 1 changesets with 1 changes to 1 files (+1 heads)
    89   added 1 changesets with 1 changes to 1 files (+1 heads)
    90   2 new obsolescence markers
    90   2 new obsolescence markers
    91   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
    91   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
    92   1 other heads for branch "default"
       
    93 
    92 
    94 Figure SG03
    93 Figure SG03
    95   $ hg shortlog --hidden -G
    94   $ hg shortlog --hidden -G
    96   @  2:60ffde5765c5  draft  fix bug 37
    95   @  2:60ffde5765c5  draft  fix bug 37
    97   |
    96   |
   118   
   117   
   119 Figure SG04 (test-repo)
   118 Figure SG04 (test-repo)
   120   $ cd ../test-repo
   119   $ cd ../test-repo
   121   $ hg update
   120   $ hg update
   122   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   121   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   123   1 other heads for branch "default"
       
   124   $ hg shortlog --hidden -G
   122   $ hg shortlog --hidden -G
   125   @  4:de6151c48e1c  draft  fix bug 37
   123   @  4:de6151c48e1c  draft  fix bug 37
   126   |
   124   |
   127   | x  3:60ffde5765c5  draft  fix bug 37
   125   | x  3:60ffde5765c5  draft  fix bug 37
   128   |/
   126   |/
   219   |
   217   |
   220   | x  2:f91e97234c2b  draft  fix bug 15 (v1)
   218   | x  2:f91e97234c2b  draft  fix bug 15 (v1)
   221   |/
   219   |/
   222   @  1:de6151c48e1c  public  fix bug 37
   220   @  1:de6151c48e1c  public  fix bug 37
   223   |
   221   |
   224   ~
       
   225 
   222 
   226 Bob commits a draft changeset, pushes to review repo.
   223 Bob commits a draft changeset, pushes to review repo.
   227   $ cd ../bob
   224   $ cd ../bob
   228   $ echo 'stuff' > file1
   225   $ echo 'stuff' > file1
   229   $ hg bookmark featureX
   226   $ hg bookmark featureX
   295   |/
   292   |/
   296   | x  2:f91e97234c2b  draft  fix bug 15 (v1)
   293   | x  2:f91e97234c2b  draft  fix bug 15 (v1)
   297   |/
   294   |/
   298   @  1:de6151c48e1c  public  fix bug 37
   295   @  1:de6151c48e1c  public  fix bug 37
   299   |
   296   |
   300   ~
       
   301   $ hg --hidden -R ../public shortlog -G -r 1::
   297   $ hg --hidden -R ../public shortlog -G -r 1::
   302   o  2:540ba8f317e6  public  implement feature X (v3)
   298   o  2:540ba8f317e6  public  implement feature X (v3)
   303   |
   299   |
   304   o  1:de6151c48e1c  public  fix bug 37
   300   o  1:de6151c48e1c  public  fix bug 37
   305   |
   301   |
   306   ~
       
   307 
   302 
   308 How do things look in the review repo?
   303 How do things look in the review repo?
   309   $ cd ../review
   304   $ cd ../review
   310   $ hg --hidden shortlog -G -r 1::
   305   $ hg --hidden shortlog -G -r 1::
   311   o  6:540ba8f317e6  public  implement feature X (v3)
   306   o  6:540ba8f317e6  public  implement feature X (v3)
   318   |/
   313   |/
   319   | x  2:f91e97234c2b  draft  fix bug 15 (v1)
   314   | x  2:f91e97234c2b  draft  fix bug 15 (v1)
   320   |/
   315   |/
   321   @  1:de6151c48e1c  public  fix bug 37
   316   @  1:de6151c48e1c  public  fix bug 37
   322   |
   317   |
   323   ~
       
   324 
   318 
   325 Meantime, Alice is back from lunch. While she was away, Bob approved
   319 Meantime, Alice is back from lunch. While she was away, Bob approved
   326 her change, so now she can publish it.
   320 her change, so now she can publish it.
   327   $ cd ../alice
   321   $ cd ../alice
   328   $ hg --hidden shortlog -G -r 1::
   322   $ hg --hidden shortlog -G -r 1::
   332   | |
   326   | |
   333   | x  2:f91e97234c2b  draft  fix bug 15 (v1)
   327   | x  2:f91e97234c2b  draft  fix bug 15 (v1)
   334   |/
   328   |/
   335   o  1:de6151c48e1c  public  fix bug 37
   329   o  1:de6151c48e1c  public  fix bug 37
   336   |
   330   |
   337   ~
       
   338   $ hg outgoing -q ../public
   331   $ hg outgoing -q ../public
   339   4:cbdfbd5a5db2
   332   4:cbdfbd5a5db2
   340   $ hg push ../public
   333   $ hg push ../public
   341   pushing to ../public
   334   pushing to ../public
   342   searching for changes
   335   searching for changes
   354   4 new obsolescence markers
   347   4 new obsolescence markers
   355   (run 'hg heads' to see heads, 'hg merge' to merge)
   348   (run 'hg heads' to see heads, 'hg merge' to merge)
   356   $ hg log -G -q -r 'head()'
   349   $ hg log -G -q -r 'head()'
   357   o  5:540ba8f317e6
   350   o  5:540ba8f317e6
   358   |
   351   |
   359   ~
   352   | @  4:cbdfbd5a5db2
   360   @  4:cbdfbd5a5db2
   353   |/
   361   |
       
   362   ~
       
   363   $ hg --hidden shortlog -G -r 1::
   354   $ hg --hidden shortlog -G -r 1::
   364   o  5:540ba8f317e6  public  implement feature X (v3)
   355   o  5:540ba8f317e6  public  implement feature X (v3)
   365   |
   356   |
   366   | @  4:cbdfbd5a5db2  draft  fix bug 15 (v2)
   357   | @  4:cbdfbd5a5db2  draft  fix bug 15 (v2)
   367   |/
   358   |/
   369   | |
   360   | |
   370   | x  2:f91e97234c2b  draft  fix bug 15 (v1)
   361   | x  2:f91e97234c2b  draft  fix bug 15 (v1)
   371   |/
   362   |/
   372   o  1:de6151c48e1c  public  fix bug 37
   363   o  1:de6151c48e1c  public  fix bug 37
   373   |
   364   |
   374   ~
       
   375 
   365 
   376 Alice rebases her draft changeset on top of Bob's public changeset and
   366 Alice rebases her draft changeset on top of Bob's public changeset and
   377 publishes the result.
   367 publishes the result.
   378   $ hg rebase -d 5
   368   $ hg rebase -d 5
   379   rebasing 4:cbdfbd5a5db2 "fix bug 15 (v2)" (bug15)
   369   rebasing 4:cbdfbd5a5db2 "fix bug 15 (v2)" (bug15)
   409   |/
   399   |/
   410   | x  2:f91e97234c2b  draft  fix bug 15 (v1)
   400   | x  2:f91e97234c2b  draft  fix bug 15 (v1)
   411   |/
   401   |/
   412   @  1:de6151c48e1c  public  fix bug 37
   402   @  1:de6151c48e1c  public  fix bug 37
   413   |
   403   |
   414   ~
       
   415   $ hg --hidden -R ../public shortlog -G -r 1::
   404   $ hg --hidden -R ../public shortlog -G -r 1::
   416   o  3:a06ec1bf97bd  public  fix bug 15 (v2)
   405   o  3:a06ec1bf97bd  public  fix bug 15 (v2)
   417   |
   406   |
   418   o  2:540ba8f317e6  public  implement feature X (v3)
   407   o  2:540ba8f317e6  public  implement feature X (v3)
   419   |
   408   |
   420   o  1:de6151c48e1c  public  fix bug 37
   409   o  1:de6151c48e1c  public  fix bug 37
   421   |
   410   |
   422   ~
       
   423   $ cd ..
   411   $ cd ..
   424 
   412 
   425 Setup for "cowboy mode" shared mutable history (to illustrate divergent
   413 Setup for "cowboy mode" shared mutable history (to illustrate divergent
   426 and bumped changesets).
   414 and bumped changesets).
   427   $ rm -rf review alice bob
   415   $ rm -rf review alice bob
   472   | |
   460   | |
   473   | x  4:2fe6c4bd32d0  draft  fix bug 24 (v1)
   461   | x  4:2fe6c4bd32d0  draft  fix bug 24 (v1)
   474   |/
   462   |/
   475   o  3:a06ec1bf97bd  public  fix bug 15 (v2)
   463   o  3:a06ec1bf97bd  public  fix bug 15 (v2)
   476   |
   464   |
   477   ~
       
   478 
   465 
   479 Bob discovers the divergence.
   466 Bob discovers the divergence.
   480   $ hg pull ../alice
   467   $ hg pull ../alice
   481   pulling from ../alice
   468   pulling from ../alice
   482   searching for changes
   469   searching for changes
   498   | |
   485   | |
   499   | x  4:2fe6c4bd32d0  draft  fix bug 24 (v1)
   486   | x  4:2fe6c4bd32d0  draft  fix bug 24 (v1)
   500   |/
   487   |/
   501   o  3:a06ec1bf97bd  public  fix bug 15 (v2)
   488   o  3:a06ec1bf97bd  public  fix bug 15 (v2)
   502   |
   489   |
   503   ~
       
   504   $ hg --hidden shortlog -r 'successors(2fe6)'
   490   $ hg --hidden shortlog -r 'successors(2fe6)'
   505   6:a360947f6faf  draft  fix bug 24 (v2 by bob)
   491   6:a360947f6faf  draft  fix bug 24 (v2 by bob)
   506   7:e3f99ce9d9cd  draft  fix bug 24 (v2 by alice)
   492   7:e3f99ce9d9cd  draft  fix bug 24 (v2 by alice)
   507 
   493 
   508 Use evolve to fix the divergence.
   494 Use evolve to fix the divergence.
   528   | |
   514   | |
   529   | x  4:2fe6c4bd32d0  draft  fix bug 24 (v1)
   515   | x  4:2fe6c4bd32d0  draft  fix bug 24 (v1)
   530   |/
   516   |/
   531   o  3:a06ec1bf97bd  public  fix bug 15 (v2)
   517   o  3:a06ec1bf97bd  public  fix bug 15 (v2)
   532   |
   518   |
   533   ~
       
   534   $ hg --hidden shortlog -r 'precursors(9)'
   519   $ hg --hidden shortlog -r 'precursors(9)'
   535   6:a360947f6faf  draft  fix bug 24 (v2 by bob)
   520   6:a360947f6faf  draft  fix bug 24 (v2 by bob)
   536   7:e3f99ce9d9cd  draft  fix bug 24 (v2 by alice)
   521   7:e3f99ce9d9cd  draft  fix bug 24 (v2 by alice)
   537   $ cat file1
   522   $ cat file1
   538   Do stuff.
   523   Do stuff.