tests/test-push-warn.t
changeset 29973 4ddb05751b12
parent 29659 7eb9ee3e6b14
child 30211 6b0741d6d234
equal deleted inserted replaced
29972:392edab93b8a 29973:4ddb05751b12
    30   $ hg push ../a
    30   $ hg push ../a
    31   pushing to ../a
    31   pushing to ../a
    32   searching for changes
    32   searching for changes
    33   remote has heads on branch 'default' that are not known locally: 1c9246a22a0a
    33   remote has heads on branch 'default' that are not known locally: 1c9246a22a0a
    34   abort: push creates new remote head 1e108cc5548c!
    34   abort: push creates new remote head 1e108cc5548c!
    35   (pull and merge or see "hg help push" for details about pushing new heads)
    35   (pull and merge or see 'hg help push' for details about pushing new heads)
    36   [255]
    36   [255]
    37 
    37 
    38   $ hg push --debug ../a
    38   $ hg push --debug ../a
    39   pushing to ../a
    39   pushing to ../a
    40   query 1; heads
    40   query 1; heads
    48   listing keys for "bookmarks"
    48   listing keys for "bookmarks"
    49   remote has heads on branch 'default' that are not known locally: 1c9246a22a0a
    49   remote has heads on branch 'default' that are not known locally: 1c9246a22a0a
    50   new remote heads on branch 'default':
    50   new remote heads on branch 'default':
    51    1e108cc5548c
    51    1e108cc5548c
    52   abort: push creates new remote head 1e108cc5548c!
    52   abort: push creates new remote head 1e108cc5548c!
    53   (pull and merge or see "hg help push" for details about pushing new heads)
    53   (pull and merge or see 'hg help push' for details about pushing new heads)
    54   [255]
    54   [255]
    55 
    55 
    56   $ hg pull ../a
    56   $ hg pull ../a
    57   pulling from ../a
    57   pulling from ../a
    58   searching for changes
    58   searching for changes
    64 
    64 
    65   $ hg push ../a
    65   $ hg push ../a
    66   pushing to ../a
    66   pushing to ../a
    67   searching for changes
    67   searching for changes
    68   abort: push creates new remote head 1e108cc5548c!
    68   abort: push creates new remote head 1e108cc5548c!
    69   (merge or see "hg help push" for details about pushing new heads)
    69   (merge or see 'hg help push' for details about pushing new heads)
    70   [255]
    70   [255]
    71 
    71 
    72   $ hg merge
    72   $ hg merge
    73   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
    73   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
    74   (branch merge, don't forget to commit)
    74   (branch merge, don't forget to commit)
   117 
   117 
   118   $ hg push ../c
   118   $ hg push ../c
   119   pushing to ../c
   119   pushing to ../c
   120   searching for changes
   120   searching for changes
   121   abort: push creates new remote head 6346d66eb9f5!
   121   abort: push creates new remote head 6346d66eb9f5!
   122   (merge or see "hg help push" for details about pushing new heads)
   122   (merge or see 'hg help push' for details about pushing new heads)
   123   [255]
   123   [255]
   124 
   124 
   125   $ hg push -r 2 ../c
   125   $ hg push -r 2 ../c
   126   pushing to ../c
   126   pushing to ../c
   127   searching for changes
   127   searching for changes
   130 
   130 
   131   $ hg push -r 3 ../c
   131   $ hg push -r 3 ../c
   132   pushing to ../c
   132   pushing to ../c
   133   searching for changes
   133   searching for changes
   134   abort: push creates new remote head a5dda829a167!
   134   abort: push creates new remote head a5dda829a167!
   135   (merge or see "hg help push" for details about pushing new heads)
   135   (merge or see 'hg help push' for details about pushing new heads)
   136   [255]
   136   [255]
   137 
   137 
   138   $ hg push -v -r 3 -r 4 ../c
   138   $ hg push -v -r 3 -r 4 ../c
   139   pushing to ../c
   139   pushing to ../c
   140   searching for changes
   140   searching for changes
   141   new remote heads on branch 'default':
   141   new remote heads on branch 'default':
   142    a5dda829a167
   142    a5dda829a167
   143    ee8fbc7a0295
   143    ee8fbc7a0295
   144   abort: push creates new remote head a5dda829a167!
   144   abort: push creates new remote head a5dda829a167!
   145   (merge or see "hg help push" for details about pushing new heads)
   145   (merge or see 'hg help push' for details about pushing new heads)
   146   [255]
   146   [255]
   147 
   147 
   148   $ hg push -v -f -r 3 -r 4 ../c
   148   $ hg push -v -f -r 3 -r 4 ../c
   149   pushing to ../c
   149   pushing to ../c
   150   searching for changes
   150   searching for changes
   274 
   274 
   275   $ hg push -r 4 -r 7 ../f
   275   $ hg push -r 4 -r 7 ../f
   276   pushing to ../f
   276   pushing to ../f
   277   searching for changes
   277   searching for changes
   278   abort: push creates new remote head 0b715ef6ff8f on branch 'a'!
   278   abort: push creates new remote head 0b715ef6ff8f on branch 'a'!
   279   (merge or see "hg help push" for details about pushing new heads)
   279   (merge or see 'hg help push' for details about pushing new heads)
   280   [255]
   280   [255]
   281 
   281 
   282 Push replacement head on existing branches:
   282 Push replacement head on existing branches:
   283 
   283 
   284   $ hg -q up 3
   284   $ hg -q up 3
   379   $ hg -q ci -m 16
   379   $ hg -q ci -m 16
   380   $ hg push --branch f --new-branch ../f
   380   $ hg push --branch f --new-branch ../f
   381   pushing to ../f
   381   pushing to ../f
   382   searching for changes
   382   searching for changes
   383   abort: push creates new branch 'f' with multiple heads
   383   abort: push creates new branch 'f' with multiple heads
   384   (merge or see "hg help push" for details about pushing new heads)
   384   (merge or see 'hg help push' for details about pushing new heads)
   385   [255]
   385   [255]
   386   $ hg push --branch f --new-branch --force ../f
   386   $ hg push --branch f --new-branch --force ../f
   387   pushing to ../f
   387   pushing to ../f
   388   searching for changes
   388   searching for changes
   389   adding changesets
   389   adding changesets
   423   $ hg -R i push h
   423   $ hg -R i push h
   424   pushing to h
   424   pushing to h
   425   searching for changes
   425   searching for changes
   426   remote has heads on branch 'default' that are not known locally: 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847
   426   remote has heads on branch 'default' that are not known locally: 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847
   427   abort: push creates new remote head 97bd0c84d346!
   427   abort: push creates new remote head 97bd0c84d346!
   428   (pull and merge or see "hg help push" for details about pushing new heads)
   428   (pull and merge or see 'hg help push' for details about pushing new heads)
   429   [255]
   429   [255]
   430   $ hg -R h up -q 0; echo x > h/b; hg -R h ci -qAmx
   430   $ hg -R h up -q 0; echo x > h/b; hg -R h ci -qAmx
   431   $ hg -R i push h
   431   $ hg -R i push h
   432   pushing to h
   432   pushing to h
   433   searching for changes
   433   searching for changes
   434   remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 and 1 others
   434   remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 and 1 others
   435   abort: push creates new remote head 97bd0c84d346!
   435   abort: push creates new remote head 97bd0c84d346!
   436   (pull and merge or see "hg help push" for details about pushing new heads)
   436   (pull and merge or see 'hg help push' for details about pushing new heads)
   437   [255]
   437   [255]
   438   $ hg -R i push h -v
   438   $ hg -R i push h -v
   439   pushing to h
   439   pushing to h
   440   searching for changes
   440   searching for changes
   441   remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847
   441   remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847
   442   new remote heads on branch 'default':
   442   new remote heads on branch 'default':
   443    97bd0c84d346
   443    97bd0c84d346
   444   abort: push creates new remote head 97bd0c84d346!
   444   abort: push creates new remote head 97bd0c84d346!
   445   (pull and merge or see "hg help push" for details about pushing new heads)
   445   (pull and merge or see 'hg help push' for details about pushing new heads)
   446   [255]
   446   [255]
   447 
   447 
   448 
   448 
   449 Check prepush logic with merged branches:
   449 Check prepush logic with merged branches:
   450 
   450 
   511 
   511 
   512   $ hg push ../l -b b
   512   $ hg push ../l -b b
   513   pushing to ../l
   513   pushing to ../l
   514   searching for changes
   514   searching for changes
   515   abort: push creates new remote head 451211cc22b0 on branch 'a'!
   515   abort: push creates new remote head 451211cc22b0 on branch 'a'!
   516   (merge or see "hg help push" for details about pushing new heads)
   516   (merge or see 'hg help push' for details about pushing new heads)
   517   [255]
   517   [255]
   518 
   518 
   519   $ cd ..
   519   $ cd ..
   520 
   520 
   521 
   521 
   761 
   761 
   762   $ hg push inner
   762   $ hg push inner
   763   pushing to inner
   763   pushing to inner
   764   searching for changes
   764   searching for changes
   765   abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'!
   765   abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'!
   766   (merge or see "hg help push" for details about pushing new heads)
   766   (merge or see 'hg help push' for details about pushing new heads)
   767   [255]
   767   [255]
   768 
   768 
   769   $ hg push inner -r4 -r5
   769   $ hg push inner -r4 -r5
   770   pushing to inner
   770   pushing to inner
   771   searching for changes
   771   searching for changes
   772   abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'!
   772   abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'!
   773   (merge or see "hg help push" for details about pushing new heads)
   773   (merge or see 'hg help push' for details about pushing new heads)
   774   [255]
   774   [255]
   775 
   775 
   776   $ hg in inner
   776   $ hg in inner
   777   comparing with inner
   777   comparing with inner
   778   searching for changes
   778   searching for changes
   784   $ hg push inner --config hooks.fail-push="echo running fail-push hook"
   784   $ hg push inner --config hooks.fail-push="echo running fail-push hook"
   785   pushing to inner
   785   pushing to inner
   786   searching for changes
   786   searching for changes
   787   running fail-push hook
   787   running fail-push hook
   788   abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'!
   788   abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'!
   789   (merge or see "hg help push" for details about pushing new heads)
   789   (merge or see 'hg help push' for details about pushing new heads)
   790   [255]
   790   [255]
   791 
   791 
   792   $ cd ..
   792   $ cd ..