tests/test-bundle2-exchange.t
changeset 24285 8e13cc0825f1
parent 23759 cdfc47266e53
child 24686 e0e28e910fa3
equal deleted inserted replaced
24284:ff14b26fe5f4 24285:8e13cc0825f1
    23   > push_ssl = false
    23   > push_ssl = false
    24   > allow_push = *
    24   > allow_push = *
    25   > [phases]
    25   > [phases]
    26   > publish=False
    26   > publish=False
    27   > [hooks]
    27   > [hooks]
    28   > changegroup = sh -c  "HG_LOCAL= python \"$TESTDIR/printenv.py\" changegroup"
    28   > pretxnclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n"
    29   > b2x-pretransactionclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n"
    29   > txnclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n"
    30   > b2x-transactionclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n"
    30   > txnclose.env = sh -c  "HG_LOCAL= python \"$TESTDIR/printenv.py\" txnclose"
    31   > b2x-transactionclose.env = sh -c  "HG_LOCAL= python \"$TESTDIR/printenv.py\" b2x-transactionclose"
       
    32   > pushkey= sh "$TESTTMP/bundle2-pushkey-hook.sh"
    31   > pushkey= sh "$TESTTMP/bundle2-pushkey-hook.sh"
    33   > EOF
    32   > EOF
    34 
    33 
    35 The extension requires a repo (currently unused)
    34 The extension requires a repo (currently unused)
    36 
    35 
    37   $ hg init main
    36   $ hg init main
    38   $ cd main
    37   $ cd main
    39   $ touch a
    38   $ touch a
    40   $ hg add a
    39   $ hg add a
    41   $ hg commit -m 'a'
    40   $ hg commit -m 'a'
       
    41   pre-close-tip:3903775176ed draft 
       
    42   postclose-tip:3903775176ed draft 
       
    43   txnclose hook: HG_PHASES_MOVED=1 HG_TXNNAME=commit
    42 
    44 
    43   $ hg unbundle $TESTDIR/bundles/rebase.hg
    45   $ hg unbundle $TESTDIR/bundles/rebase.hg
    44   adding changesets
    46   adding changesets
    45   adding manifests
    47   adding manifests
    46   adding file changes
    48   adding file changes
    47   added 8 changesets with 7 changes to 7 files (+3 heads)
    49   added 8 changesets with 7 changes to 7 files (+3 heads)
    48   changegroup hook: HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_SOURCE=unbundle HG_URL=bundle:*/rebase.hg (glob)
    50   pre-close-tip:02de42196ebe draft 
       
    51   postclose-tip:02de42196ebe draft 
       
    52   txnclose hook: HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_PHASES_MOVED=1 HG_SOURCE=unbundle HG_TXNNAME=unbundle
       
    53   bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob)
    49   (run 'hg heads' to see heads, 'hg merge' to merge)
    54   (run 'hg heads' to see heads, 'hg merge' to merge)
    50 
    55 
    51   $ cd ..
    56   $ cd ..
    52 
    57 
    53 Real world exchange
    58 Real world exchange
    54 =====================
    59 =====================
    55 
    60 
    56 Add more obsolescence information
    61 Add more obsolescence information
    57 
    62 
    58   $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc`
    63   $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc`
       
    64   pre-close-tip:02de42196ebe draft 
       
    65   postclose-tip:02de42196ebe draft 
       
    66   txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNNAME=debugobsolete
    59   $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c`
    67   $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c`
       
    68   pre-close-tip:02de42196ebe draft 
       
    69   postclose-tip:02de42196ebe draft 
       
    70   txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNNAME=debugobsolete
    60 
    71 
    61 clone --pull
    72 clone --pull
    62 
    73 
    63   $ hg -R main phase --public cd010b8cd998
    74   $ hg -R main phase --public cd010b8cd998
       
    75   pre-close-tip:000000000000 public 
       
    76   postclose-tip:02de42196ebe draft 
       
    77   txnclose hook: HG_PHASES_MOVED=1 HG_TXNNAME=phase
    64   $ hg clone main other --pull --rev 9520eea781bc
    78   $ hg clone main other --pull --rev 9520eea781bc
    65   adding changesets
    79   adding changesets
    66   adding manifests
    80   adding manifests
    67   adding file changes
    81   adding file changes
    68   added 2 changesets with 2 changes to 2 files
    82   added 2 changesets with 2 changes to 2 files
    69   1 new obsolescence markers
    83   1 new obsolescence markers
    70   pre-close-tip:9520eea781bc draft 
    84   pre-close-tip:9520eea781bc draft 
    71   postclose-tip:9520eea781bc draft 
    85   postclose-tip:9520eea781bc draft 
    72   b2x-transactionclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
    86   txnclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNNAME=pull
    73   changegroup hook: HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
    87   file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
    74   updating to branch default
    88   updating to branch default
    75   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
    89   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
    76   $ hg -R other log -G
    90   $ hg -R other log -G
    77   @  1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com>  E
    91   @  1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com>  E
    78   |
    92   |
    82   1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
    96   1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
    83 
    97 
    84 pull
    98 pull
    85 
    99 
    86   $ hg -R main phase --public 9520eea781bc
   100   $ hg -R main phase --public 9520eea781bc
       
   101   pre-close-tip:000000000000 public 
       
   102   postclose-tip:02de42196ebe draft 
       
   103   txnclose hook: HG_PHASES_MOVED=1 HG_TXNNAME=phase
    87   $ hg -R other pull -r 24b6387c8c8c
   104   $ hg -R other pull -r 24b6387c8c8c
    88   pulling from $TESTTMP/main (glob)
   105   pulling from $TESTTMP/main (glob)
    89   searching for changes
   106   searching for changes
    90   adding changesets
   107   adding changesets
    91   adding manifests
   108   adding manifests
    92   adding file changes
   109   adding file changes
    93   added 1 changesets with 1 changes to 1 files (+1 heads)
   110   added 1 changesets with 1 changes to 1 files (+1 heads)
    94   1 new obsolescence markers
   111   1 new obsolescence markers
    95   pre-close-tip:24b6387c8c8c draft 
   112   pre-close-tip:24b6387c8c8c draft 
    96   postclose-tip:24b6387c8c8c draft 
   113   postclose-tip:24b6387c8c8c draft 
    97   b2x-transactionclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
   114   txnclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNNAME=pull
    98   changegroup hook: HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
   115   file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
    99   (run 'hg heads' to see heads, 'hg merge' to merge)
   116   (run 'hg heads' to see heads, 'hg merge' to merge)
   100   $ hg -R other log -G
   117   $ hg -R other log -G
   101   o  2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com>  F
   118   o  2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com>  F
   102   |
   119   |
   103   | @  1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com>  E
   120   | @  1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com>  E
   109   2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   126   2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   110 
   127 
   111 pull empty (with phase movement)
   128 pull empty (with phase movement)
   112 
   129 
   113   $ hg -R main phase --public 24b6387c8c8c
   130   $ hg -R main phase --public 24b6387c8c8c
       
   131   pre-close-tip:000000000000 public 
       
   132   postclose-tip:02de42196ebe draft 
       
   133   txnclose hook: HG_PHASES_MOVED=1 HG_TXNNAME=phase
   114   $ hg -R other pull -r 24b6387c8c8c
   134   $ hg -R other pull -r 24b6387c8c8c
   115   pulling from $TESTTMP/main (glob)
   135   pulling from $TESTTMP/main (glob)
   116   no changes found
   136   no changes found
   117   pre-close-tip:000000000000 public 
   137   pre-close-tip:000000000000 public 
   118   postclose-tip:24b6387c8c8c public 
   138   postclose-tip:24b6387c8c8c public 
   119   b2x-transactionclose hook: HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
   139   txnclose hook: HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNNAME=pull
       
   140   file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
   120   $ hg -R other log -G
   141   $ hg -R other log -G
   121   o  2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com>  F
   142   o  2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com>  F
   122   |
   143   |
   123   | @  1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com>  E
   144   | @  1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com>  E
   124   |/
   145   |/
   133   $ hg -R other pull -r 24b6387c8c8c
   154   $ hg -R other pull -r 24b6387c8c8c
   134   pulling from $TESTTMP/main (glob)
   155   pulling from $TESTTMP/main (glob)
   135   no changes found
   156   no changes found
   136   pre-close-tip:24b6387c8c8c public 
   157   pre-close-tip:24b6387c8c8c public 
   137   postclose-tip:24b6387c8c8c public 
   158   postclose-tip:24b6387c8c8c public 
   138   b2x-transactionclose hook: HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
   159   txnclose hook: HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_TXNNAME=pull
       
   160   file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
   139   $ hg -R other log -G
   161   $ hg -R other log -G
   140   o  2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com>  F
   162   o  2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com>  F
   141   |
   163   |
   142   | @  1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com>  E
   164   | @  1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com>  E
   143   |/
   165   |/
   149 
   171 
   150 add extra data to test their exchange during push
   172 add extra data to test their exchange during push
   151 
   173 
   152   $ hg -R main bookmark --rev eea13746799a book_eea1
   174   $ hg -R main bookmark --rev eea13746799a book_eea1
   153   $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a`
   175   $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a`
       
   176   pre-close-tip:02de42196ebe draft 
       
   177   postclose-tip:02de42196ebe draft 
       
   178   txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNNAME=debugobsolete
   154   $ hg -R main bookmark --rev 02de42196ebe book_02de
   179   $ hg -R main bookmark --rev 02de42196ebe book_02de
   155   $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe`
   180   $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe`
       
   181   pre-close-tip:02de42196ebe draft book_02de
       
   182   postclose-tip:02de42196ebe draft book_02de
       
   183   txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNNAME=debugobsolete
   156   $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc
   184   $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc
   157   $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16`
   185   $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16`
       
   186   pre-close-tip:02de42196ebe draft book_02de
       
   187   postclose-tip:02de42196ebe draft book_02de
       
   188   txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNNAME=debugobsolete
   158   $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd
   189   $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd
   159   $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8`
   190   $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8`
       
   191   pre-close-tip:02de42196ebe draft book_02de
       
   192   postclose-tip:02de42196ebe draft book_02de
       
   193   txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNNAME=debugobsolete
   160   $ hg -R main bookmark --rev 32af7686d403 book_32af
   194   $ hg -R main bookmark --rev 32af7686d403 book_32af
   161   $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403`
   195   $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403`
       
   196   pre-close-tip:02de42196ebe draft book_02de
       
   197   postclose-tip:02de42196ebe draft book_02de
       
   198   txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNNAME=debugobsolete
   162 
   199 
   163   $ hg -R other bookmark --rev cd010b8cd998 book_eea1
   200   $ hg -R other bookmark --rev cd010b8cd998 book_eea1
   164   $ hg -R other bookmark --rev cd010b8cd998 book_02de
   201   $ hg -R other bookmark --rev cd010b8cd998 book_02de
   165   $ hg -R other bookmark --rev cd010b8cd998 book_42cc
   202   $ hg -R other bookmark --rev cd010b8cd998 book_42cc
   166   $ hg -R other bookmark --rev cd010b8cd998 book_5fdd
   203   $ hg -R other bookmark --rev cd010b8cd998 book_5fdd
   167   $ hg -R other bookmark --rev cd010b8cd998 book_32af
   204   $ hg -R other bookmark --rev cd010b8cd998 book_32af
   168 
   205 
   169   $ hg -R main phase --public eea13746799a
   206   $ hg -R main phase --public eea13746799a
       
   207   pre-close-tip:000000000000 public 
       
   208   postclose-tip:02de42196ebe draft book_02de
       
   209   txnclose hook: HG_PHASES_MOVED=1 HG_TXNNAME=phase
   170 
   210 
   171 push
   211 push
   172   $ hg -R main push other --rev eea13746799a --bookmark book_eea1
   212   $ hg -R main push other --rev eea13746799a --bookmark book_eea1
   173   pushing to other
   213   pushing to other
   174   searching for changes
   214   searching for changes
   178   wlock: free
   218   wlock: free
   179   pushkey: lock state after "bookmarks"
   219   pushkey: lock state after "bookmarks"
   180   lock:  free
   220   lock:  free
   181   wlock: free
   221   wlock: free
   182   postclose-tip:eea13746799a public book_eea1
   222   postclose-tip:eea13746799a public book_eea1
   183   b2x-transactionclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2-EXP=1 HG_NEW_OBSMARKERS=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_PHASES_MOVED=1 HG_SOURCE=push HG_URL=push
   223   txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2-EXP=1 HG_NEW_OBSMARKERS=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_PHASES_MOVED=1 HG_SOURCE=push HG_TXNNAME=unbundle HG_URL=push
   184   changegroup hook: HG_BUNDLE2-EXP=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_SOURCE=push HG_URL=push
       
   185   remote: adding changesets
   224   remote: adding changesets
   186   remote: adding manifests
   225   remote: adding manifests
   187   remote: adding file changes
   226   remote: adding file changes
   188   remote: added 1 changesets with 0 changes to 0 files (-1 heads)
   227   remote: added 1 changesets with 0 changes to 0 files (-1 heads)
   189   remote: 1 new obsolescence markers
   228   remote: 1 new obsolescence markers
   190   updating bookmark book_eea1
   229   updating bookmark book_eea1
   191   pre-close-tip:02de42196ebe draft book_02de
   230   pre-close-tip:02de42196ebe draft book_02de
   192   postclose-tip:02de42196ebe draft book_02de
   231   postclose-tip:02de42196ebe draft book_02de
   193   b2x-transactionclose hook: HG_SOURCE=push-response HG_URL=file:$TESTTMP/other
   232   txnclose hook: HG_SOURCE=push-response HG_TXNNAME=push-response
       
   233   file:/*/$TESTTMP/other HG_URL=file:$TESTTMP/other (glob)
   194   $ hg -R other log -G
   234   $ hg -R other log -G
   195   o    3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
   235   o    3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
   196   |\
   236   |\
   197   | o  2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com>  F
   237   | o  2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com>  F
   198   | |
   238   | |
   216   added 1 changesets with 1 changes to 1 files (+1 heads)
   256   added 1 changesets with 1 changes to 1 files (+1 heads)
   217   1 new obsolescence markers
   257   1 new obsolescence markers
   218   updating bookmark book_02de
   258   updating bookmark book_02de
   219   pre-close-tip:02de42196ebe draft book_02de
   259   pre-close-tip:02de42196ebe draft book_02de
   220   postclose-tip:02de42196ebe draft book_02de
   260   postclose-tip:02de42196ebe draft book_02de
   221   b2x-transactionclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=ssh://user@dummy/main
   261   txnclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNNAME=pull
   222   changegroup hook: HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_SOURCE=pull HG_URL=ssh://user@dummy/main
   262   ssh://user@dummy/main HG_URL=ssh://user@dummy/main
   223   (run 'hg heads' to see heads, 'hg merge' to merge)
   263   (run 'hg heads' to see heads, 'hg merge' to merge)
   224   $ hg -R other debugobsolete
   264   $ hg -R other debugobsolete
   225   1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   265   1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   226   2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   266   2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   227   3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   267   3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   241   added 1 changesets with 1 changes to 1 files (+1 heads)
   281   added 1 changesets with 1 changes to 1 files (+1 heads)
   242   1 new obsolescence markers
   282   1 new obsolescence markers
   243   updating bookmark book_42cc
   283   updating bookmark book_42cc
   244   pre-close-tip:42ccdea3bb16 draft book_42cc
   284   pre-close-tip:42ccdea3bb16 draft book_42cc
   245   postclose-tip:42ccdea3bb16 draft book_42cc
   285   postclose-tip:42ccdea3bb16 draft book_42cc
   246   b2x-transactionclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/
   286   txnclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNNAME=pull
   247   changegroup hook: HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/
   287   http://localhost:$HGPORT/ HG_URL=http://localhost:$HGPORT/
   248   (run 'hg heads .' to see heads, 'hg merge' to merge)
   288   (run 'hg heads .' to see heads, 'hg merge' to merge)
   249   $ cat main-error.log
   289   $ cat main-error.log
   250   $ hg -R other debugobsolete
   290   $ hg -R other debugobsolete
   251   1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   291   1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   252   2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   292   2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   268   remote: pre-close-tip:5fddd98957c8 draft book_5fdd
   308   remote: pre-close-tip:5fddd98957c8 draft book_5fdd
   269   remote: pushkey: lock state after "bookmarks"
   309   remote: pushkey: lock state after "bookmarks"
   270   remote: lock:  free
   310   remote: lock:  free
   271   remote: wlock: free
   311   remote: wlock: free
   272   remote: postclose-tip:5fddd98957c8 draft book_5fdd
   312   remote: postclose-tip:5fddd98957c8 draft book_5fdd
   273   remote: b2x-transactionclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2-EXP=1 HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1
   313   remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2-EXP=1 HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_TXNNAME=unbundle HG_URL=remote:ssh:127.0.0.1
   274   remote: changegroup hook: HG_BUNDLE2-EXP=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1
   314   pre-close-tip:02de42196ebe draft book_02de
   275   pre-close-tip:02de42196ebe draft book_02de
   315   postclose-tip:02de42196ebe draft book_02de
   276   postclose-tip:02de42196ebe draft book_02de
   316   txnclose hook: HG_SOURCE=push-response HG_TXNNAME=push-response
   277   b2x-transactionclose hook: HG_SOURCE=push-response HG_URL=ssh://user@dummy/other
   317   ssh://user@dummy/other HG_URL=ssh://user@dummy/other
   278   $ hg -R other log -G
   318   $ hg -R other log -G
   279   o  6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
   319   o  6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
   280   |
   320   |
   281   o  5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
   321   o  5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
   282   |
   322   |
   302 
   342 
   303   $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
   343   $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
   304   $ cat other.pid >> $DAEMON_PIDS
   344   $ cat other.pid >> $DAEMON_PIDS
   305 
   345 
   306   $ hg -R main phase --public 32af7686d403
   346   $ hg -R main phase --public 32af7686d403
       
   347   pre-close-tip:000000000000 public 
       
   348   postclose-tip:02de42196ebe draft book_02de
       
   349   txnclose hook: HG_PHASES_MOVED=1 HG_TXNNAME=phase
   307   $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af
   350   $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af
   308   pushing to http://localhost:$HGPORT2/
   351   pushing to http://localhost:$HGPORT2/
   309   searching for changes
   352   searching for changes
   310   remote: adding changesets
   353   remote: adding changesets
   311   remote: adding manifests
   354   remote: adding manifests
   313   remote: added 1 changesets with 1 changes to 1 files
   356   remote: added 1 changesets with 1 changes to 1 files
   314   remote: 1 new obsolescence markers
   357   remote: 1 new obsolescence markers
   315   updating bookmark book_32af
   358   updating bookmark book_32af
   316   pre-close-tip:02de42196ebe draft book_02de
   359   pre-close-tip:02de42196ebe draft book_02de
   317   postclose-tip:02de42196ebe draft book_02de
   360   postclose-tip:02de42196ebe draft book_02de
   318   b2x-transactionclose hook: HG_SOURCE=push-response HG_URL=http://localhost:$HGPORT2/
   361   txnclose hook: HG_SOURCE=push-response HG_TXNNAME=push-response
       
   362   http://localhost:$HGPORT2/ HG_URL=http://localhost:$HGPORT2/
   319   $ cat other-error.log
   363   $ cat other-error.log
   320 
   364 
   321 Check final content.
   365 Check final content.
   322 
   366 
   323   $ hg -R other log -G
   367   $ hg -R other log -G
   398   $ hg up tip
   442   $ hg up tip
   399   3 files updated, 0 files merged, 1 files removed, 0 files unresolved
   443   3 files updated, 0 files merged, 1 files removed, 0 files unresolved
   400   $ echo 'I' > I
   444   $ echo 'I' > I
   401   $ hg add I
   445   $ hg add I
   402   $ hg ci -m 'I'
   446   $ hg ci -m 'I'
       
   447   pre-close-tip:e7ec4e813ba6 draft 
       
   448   postclose-tip:e7ec4e813ba6 draft 
       
   449   txnclose hook: HG_TXNNAME=commit
   403   $ hg id
   450   $ hg id
   404   e7ec4e813ba6 tip
   451   e7ec4e813ba6 tip
   405   $ cd ..
   452   $ cd ..
   406 
   453 
   407   $ cat << EOF >> $HGRCPATH
   454   $ cat << EOF >> $HGRCPATH
   499 
   546 
   500   $ cat << EOF >> $HGRCPATH
   547   $ cat << EOF >> $HGRCPATH
   501   > [failpush]
   548   > [failpush]
   502   > reason =
   549   > reason =
   503   > [hooks]
   550   > [hooks]
   504   > b2x-pretransactionclose.failpush = false
   551   > pretxnclose.failpush = false
   505   > EOF
   552   > EOF
   506 
   553 
   507   $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
   554   $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
   508   $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
   555   $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
   509   $ cat other.pid >> $DAEMON_PIDS
   556   $ cat other.pid >> $DAEMON_PIDS
   512   pushing to other
   559   pushing to other
   513   searching for changes
   560   searching for changes
   514   pre-close-tip:e7ec4e813ba6 draft 
   561   pre-close-tip:e7ec4e813ba6 draft 
   515   transaction abort!
   562   transaction abort!
   516   rollback completed
   563   rollback completed
   517   abort: b2x-pretransactionclose.failpush hook exited with status 1
   564   abort: pretxnclose.failpush hook exited with status 1
   518   [255]
   565   [255]
   519 
   566 
   520   $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
   567   $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
   521   pushing to ssh://user@dummy/other
   568   pushing to ssh://user@dummy/other
   522   searching for changes
   569   searching for changes
   523   abort: b2x-pretransactionclose.failpush hook exited with status 1
   570   abort: pretxnclose.failpush hook exited with status 1
   524   remote: pre-close-tip:e7ec4e813ba6 draft 
   571   remote: pre-close-tip:e7ec4e813ba6 draft 
   525   remote: transaction abort!
   572   remote: transaction abort!
   526   remote: rollback completed
   573   remote: rollback completed
   527   [255]
   574   [255]
   528 
   575 
   529   $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
   576   $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
   530   pushing to http://localhost:$HGPORT2/
   577   pushing to http://localhost:$HGPORT2/
   531   searching for changes
   578   searching for changes
   532   abort: b2x-pretransactionclose.failpush hook exited with status 1
   579   abort: pretxnclose.failpush hook exited with status 1
   533   [255]
   580   [255]
   534 
   581 
   535 (check that no 'pending' files remain)
   582 (check that no 'pending' files remain)
   536 
   583 
   537   $ ls -1 other/.hg/bookmarks*
   584   $ ls -1 other/.hg/bookmarks*