tests/test-push-warn.t
changeset 14525 826a13720fbc
parent 14164 cb98fed52495
child 14526 4276e3202585
equal deleted inserted replaced
14524:97d2259af787 14525:826a13720fbc
    23   $ hg commit -m "3"
    23   $ hg commit -m "3"
    24 
    24 
    25   $ hg push ../a
    25   $ hg push ../a
    26   pushing to ../a
    26   pushing to ../a
    27   searching for changes
    27   searching for changes
    28   abort: push creates new remote heads on branch 'default'!
    28   abort: push creates new remote head 1e108cc5548c!
    29   (you should pull and merge or use push -f to force)
    29   (you should pull and merge or use push -f to force)
    30   [255]
    30   [255]
    31 
    31 
    32   $ hg push --debug ../a
    32   $ hg push --debug ../a
    33   pushing to ../a
    33   pushing to ../a
    37   searching: 2 queries
    37   searching: 2 queries
    38   query 2; still undecided: 2, sample size is: 2
    38   query 2; still undecided: 2, sample size is: 2
    39   2 total queries
    39   2 total queries
    40   new remote heads on branch 'default'
    40   new remote heads on branch 'default'
    41   new remote head 1e108cc5548c
    41   new remote head 1e108cc5548c
    42   abort: push creates new remote heads on branch 'default'!
    42   abort: push creates new remote head 1e108cc5548c!
    43   (you should pull and merge or use push -f to force)
    43   (you should pull and merge or use push -f to force)
    44   [255]
    44   [255]
    45 
    45 
    46   $ hg pull ../a
    46   $ hg pull ../a
    47   pulling from ../a
    47   pulling from ../a
    53   (run 'hg heads' to see heads, 'hg merge' to merge)
    53   (run 'hg heads' to see heads, 'hg merge' to merge)
    54 
    54 
    55   $ hg push ../a
    55   $ hg push ../a
    56   pushing to ../a
    56   pushing to ../a
    57   searching for changes
    57   searching for changes
    58   abort: push creates new remote heads on branch 'default'!
    58   abort: push creates new remote head 1e108cc5548c!
    59   (did you forget to merge? use push -f to force)
    59   (did you forget to merge? use push -f to force)
    60   [255]
    60   [255]
    61 
    61 
    62   $ hg merge
    62   $ hg merge
    63   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
    63   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   106   $ hg ci -m c-d
   106   $ hg ci -m c-d
   107 
   107 
   108   $ hg push ../c
   108   $ hg push ../c
   109   pushing to ../c
   109   pushing to ../c
   110   searching for changes
   110   searching for changes
   111   abort: push creates new remote heads on branch 'default'!
   111   abort: push creates new remote head 6346d66eb9f5!
   112   (did you forget to merge? use push -f to force)
   112   (did you forget to merge? use push -f to force)
   113   [255]
   113   [255]
   114 
   114 
   115   $ hg push -r 2 ../c
   115   $ hg push -r 2 ../c
   116   pushing to ../c
   116   pushing to ../c
   118   no changes found
   118   no changes found
   119 
   119 
   120   $ hg push -r 3 ../c
   120   $ hg push -r 3 ../c
   121   pushing to ../c
   121   pushing to ../c
   122   searching for changes
   122   searching for changes
   123   abort: push creates new remote heads on branch 'default'!
   123   abort: push creates new remote head a5dda829a167!
   124   (did you forget to merge? use push -f to force)
   124   (did you forget to merge? use push -f to force)
   125   [255]
   125   [255]
   126 
   126 
   127   $ hg push -r 3 -r 4 ../c
   127   $ hg push -r 3 -r 4 ../c
   128   pushing to ../c
   128   pushing to ../c
   129   searching for changes
   129   searching for changes
   130   abort: push creates new remote heads on branch 'default'!
   130   abort: push creates new remote head a5dda829a167!
   131   (did you forget to merge? use push -f to force)
   131   (did you forget to merge? use push -f to force)
   132   [255]
   132   [255]
   133 
   133 
   134   $ hg push -f -r 3 -r 4 ../c
   134   $ hg push -f -r 3 -r 4 ../c
   135   pushing to ../c
   135   pushing to ../c
   254   $ hg -q ci -m 7
   254   $ hg -q ci -m 7
   255 
   255 
   256   $ hg push -r 4 -r 7 ../f
   256   $ hg push -r 4 -r 7 ../f
   257   pushing to ../f
   257   pushing to ../f
   258   searching for changes
   258   searching for changes
   259   abort: push creates new remote heads on branch 'a'!
   259   abort: push creates new remote head 0b715ef6ff8f on branch 'a'!
   260   (did you forget to merge? use push -f to force)
   260   (did you forget to merge? use push -f to force)
   261   [255]
   261   [255]
   262 
   262 
   263 Push replacement head on existing branches:
   263 Push replacement head on existing branches:
   264 
   264 
   377   created new head
   377   created new head
   378 
   378 
   379   $ hg -R i push h
   379   $ hg -R i push h
   380   pushing to h
   380   pushing to h
   381   searching for changes
   381   searching for changes
   382   abort: push creates new remote heads on branch 'default'!
   382   abort: push creates new remote head 97bd0c84d346!
   383   (you should pull and merge or use push -f to force)
   383   (you should pull and merge or use push -f to force)
   384   [255]
   384   [255]
   385 
   385 
   386 
   386 
   387 Check prepush logic with merged branches:
   387 Check prepush logic with merged branches:
   447   $ hg -q ci -mma
   447   $ hg -q ci -mma
   448 
   448 
   449   $ hg push ../l -b b
   449   $ hg push ../l -b b
   450   pushing to ../l
   450   pushing to ../l
   451   searching for changes
   451   searching for changes
   452   abort: push creates new remote heads on branch 'a'!
   452   abort: push creates new remote head e7e31d71180f on branch 'a'!
   453   (did you forget to merge? use push -f to force)
   453   (did you forget to merge? use push -f to force)
   454   [255]
   454   [255]
   455 
   455 
   456   $ cd ..
   456   $ cd ..
   457 
   457 
   694   5: A b3
   694   5: A b3
   695 
   695 
   696   $ hg push inner
   696   $ hg push inner
   697   pushing to inner
   697   pushing to inner
   698   searching for changes
   698   searching for changes
   699   abort: push creates new remote heads on branch 'A'!
   699   abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'!
   700   (did you forget to merge? use push -f to force)
   700   (did you forget to merge? use push -f to force)
   701   [255]
   701   [255]
   702 
   702 
   703   $ hg push inner -r4 -r5
   703   $ hg push inner -r4 -r5
   704   pushing to inner
   704   pushing to inner
   705   searching for changes
   705   searching for changes
   706   abort: push creates new remote heads on branch 'A'!
   706   abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'!
   707   (did you forget to merge? use push -f to force)
   707   (did you forget to merge? use push -f to force)
   708   [255]
   708   [255]
   709 
   709 
   710   $ hg in inner
   710   $ hg in inner
   711   comparing with inner
   711   comparing with inner