tests/test-obsolete-checkheads.t
changeset 17564 6d0efc802856
parent 17549 be0fcbb1c92f
child 17834 743d04dd48ec
equal deleted inserted replaced
17563:46db0ec640f3 17564:6d0efc802856
    39 
    39 
    40 setup
    40 setup
    41 
    41 
    42   $ mkcommit old
    42   $ mkcommit old
    43   $ hg push
    43   $ hg push
    44   pushing to $TESTTMP/remote
    44   pushing to $TESTTMP/remote (glob)
    45   searching for changes
    45   searching for changes
    46   adding changesets
    46   adding changesets
    47   adding manifests
    47   adding manifests
    48   adding file changes
    48   adding file changes
    49   added 1 changesets with 1 changes to 1 files
    49   added 1 changesets with 1 changes to 1 files
    62 
    62 
    63 old exists remotely as draft. It is obsoleted by new that we now push.
    63 old exists remotely as draft. It is obsoleted by new that we now push.
    64 Push should not warn about creating new head
    64 Push should not warn about creating new head
    65 
    65 
    66   $ hg push
    66   $ hg push
    67   pushing to $TESTTMP/remote
    67   pushing to $TESTTMP/remote (glob)
    68   searching for changes
    68   searching for changes
    69   adding changesets
    69   adding changesets
    70   adding manifests
    70   adding manifests
    71   adding file changes
    71   adding file changes
    72   added 1 changesets with 1 changes to 1 files (+1 heads)
    72   added 1 changesets with 1 changes to 1 files (+1 heads)
    78 
    78 
    79   $ rm -fr ../remote
    79   $ rm -fr ../remote
    80   $ cp -r ../backup1 ../remote
    80   $ cp -r ../backup1 ../remote
    81   $ hg -R ../remote phase --public c70b08862e08
    81   $ hg -R ../remote phase --public c70b08862e08
    82   $ hg pull -v
    82   $ hg pull -v
    83   pulling from $TESTTMP/remote
    83   pulling from $TESTTMP/remote (glob)
    84   searching for changes
    84   searching for changes
    85   no changes found
    85   no changes found
    86   $ hg glog --hidden
    86   $ hg glog --hidden
    87   @  71e3228bffe1 (draft) add new
    87   @  71e3228bffe1 (draft) add new
    88   |
    88   |
    92   
    92   
    93 
    93 
    94 Abort: old will still be an head because it's public.
    94 Abort: old will still be an head because it's public.
    95 
    95 
    96   $ hg push
    96   $ hg push
    97   pushing to $TESTTMP/remote
    97   pushing to $TESTTMP/remote (glob)
    98   searching for changes
    98   searching for changes
    99   abort: push creates new remote head 71e3228bffe1!
    99   abort: push creates new remote head 71e3228bffe1!
   100   (did you forget to merge? use push -f to force)
   100   (did you forget to merge? use push -f to force)
   101   [255]
   101   [255]
   102 
   102 
   152 
   152 
   153 old exists remotely as draft. It is obsoleted by new but we don't push new.
   153 old exists remotely as draft. It is obsoleted by new but we don't push new.
   154 Push should abort on new head
   154 Push should abort on new head
   155 
   155 
   156   $ hg push -r 'desc("other")'
   156   $ hg push -r 'desc("other")'
   157   pushing to $TESTTMP/remote
   157   pushing to $TESTTMP/remote (glob)
   158   searching for changes
   158   searching for changes
   159   abort: push creates new remote head d7d41ccbd4de!
   159   abort: push creates new remote head d7d41ccbd4de!
   160   (did you forget to merge? use push -f to force)
   160   (did you forget to merge? use push -f to force)
   161   [255]
   161   [255]
   162 
   162 
   179   [1]
   179   [1]
   180   $ hg up -q '.^'
   180   $ hg up -q '.^'
   181   $ mkcommit new
   181   $ mkcommit new
   182   created new head
   182   created new head
   183   $ hg push -f
   183   $ hg push -f
   184   pushing to $TESTTMP/remote
   184   pushing to $TESTTMP/remote (glob)
   185   searching for changes
   185   searching for changes
   186   adding changesets
   186   adding changesets
   187   adding manifests
   187   adding manifests
   188   adding file changes
   188   adding file changes
   189   added 1 changesets with 1 changes to 1 files (+1 heads)
   189   added 1 changesets with 1 changes to 1 files (+1 heads)
   214 
   214 
   215 Push should not warn about adding new heads. We create one, but we'll delete
   215 Push should not warn about adding new heads. We create one, but we'll delete
   216 one anyway.
   216 one anyway.
   217 
   217 
   218   $ hg push
   218   $ hg push
   219   pushing to $TESTTMP/remote
   219   pushing to $TESTTMP/remote (glob)
   220   searching for changes
   220   searching for changes
   221   adding changesets
   221   adding changesets
   222   adding manifests
   222   adding manifests
   223   adding file changes
   223   adding file changes
   224   added 2 changesets with 2 changes to 2 files (+1 heads)
   224   added 2 changesets with 2 changes to 2 files (+1 heads)
   262 
   262 
   263 It should not complain about "unsynced remote changes!" either but that's not
   263 It should not complain about "unsynced remote changes!" either but that's not
   264 handled yet.
   264 handled yet.
   265 
   265 
   266   $ hg push --traceback
   266   $ hg push --traceback
   267   pushing to $TESTTMP/remote
   267   pushing to $TESTTMP/remote (glob)
   268   searching for changes
   268   searching for changes
   269   adding changesets
   269   adding changesets
   270   adding manifests
   270   adding manifests
   271   adding file changes
   271   adding file changes
   272   added 1 changesets with 1 changes to 1 files (+1 heads)
   272   added 1 changesets with 1 changes to 1 files (+1 heads)