##// END OF EJS Templates
exchange: backout changeset c26335fa4225...
marmoute -
r45782:6063c185 stable
parent child Browse files
Show More
@@ -905,32 +905,27 b' def _pushcheckoutgoing(pushop):'
905 # if repo.obsstore == False --> no obsolete
905 # if repo.obsstore == False --> no obsolete
906 # then, save the iteration
906 # then, save the iteration
907 if unfi.obsstore:
907 if unfi.obsstore:
908 obsoletes = []
908 # this message are here for 80 char limit reason
909 unstables = []
909 mso = _(b"push includes obsolete changeset: %s!")
910 for node in outgoing.missing:
910 mspd = _(b"push includes phase-divergent changeset: %s!")
911 mscd = _(b"push includes content-divergent changeset: %s!")
912 mst = {
913 b"orphan": _(b"push includes orphan changeset: %s!"),
914 b"phase-divergent": mspd,
915 b"content-divergent": mscd,
916 }
917 # If we are to push if there is at least one
918 # obsolete or unstable changeset in missing, at
919 # least one of the missinghead will be obsolete or
920 # unstable. So checking heads only is ok
921 for node in outgoing.ancestorsof:
911 ctx = unfi[node]
922 ctx = unfi[node]
912 if ctx.obsolete():
923 if ctx.obsolete():
913 obsoletes.append(ctx)
924 raise error.Abort(mso % ctx)
914 elif ctx.isunstable():
925 elif ctx.isunstable():
915 unstables.append(ctx)
926 # TODO print more than one instability in the abort
916 if obsoletes or unstables:
927 # message
917 msg = b""
928 raise error.Abort(mst[ctx.instabilities()[0]] % ctx)
918 if obsoletes:
919 msg += _(b"push includes obsolete changesets:\n")
920 msg += b"\n".join(b' %s' % ctx for ctx in obsoletes)
921 if unstables:
922 if msg:
923 msg += b"\n"
924 msg += _(b"push includes unstable changesets:\n")
925 msg += b"\n".join(
926 b' %s (%s)'
927 % (
928 ctx,
929 b", ".join(_(ins) for ins in ctx.instabilities()),
930 )
931 for ctx in unstables
932 )
933 raise error.Abort(msg)
934
929
935 discovery.checkheads(pushop)
930 discovery.checkheads(pushop)
936 return True
931 return True
@@ -118,9 +118,7 b' check that mercurial refuse to push'
118 $ hg push ../other
118 $ hg push ../other
119 pushing to ../other
119 pushing to ../other
120 searching for changes
120 searching for changes
121 abort: push includes unstable changesets:
121 abort: push includes content-divergent changeset: 392fd25390da!
122 82623d38b9ba (content-divergent)
123 392fd25390da (content-divergent)
124 [255]
122 [255]
125
123
126 $ cd ..
124 $ cd ..
@@ -251,8 +251,7 b" And that we can't push bumped changeset"
251 $ hg push ../tmpa
251 $ hg push ../tmpa
252 pushing to ../tmpa
252 pushing to ../tmpa
253 searching for changes
253 searching for changes
254 abort: push includes unstable changesets:
254 abort: push includes phase-divergent changeset: 5601fb93a350!
255 5601fb93a350 (phase-divergent)
256 [255]
255 [255]
257
256
258 Fixing "bumped" situation
257 Fixing "bumped" situation
@@ -617,8 +616,7 b' refuse to push obsolete changeset'
617 $ hg push ../tmpc/ -r 'desc("original_d")'
616 $ hg push ../tmpc/ -r 'desc("original_d")'
618 pushing to ../tmpc/
617 pushing to ../tmpc/
619 searching for changes
618 searching for changes
620 abort: push includes obsolete changesets:
619 abort: push includes obsolete changeset: 94b33453f93b!
621 94b33453f93b
622 [255]
620 [255]
623
621
624 refuse to push unstable changeset
622 refuse to push unstable changeset
@@ -626,10 +624,7 b' refuse to push unstable changeset'
626 $ hg push ../tmpc/
624 $ hg push ../tmpc/
627 pushing to ../tmpc/
625 pushing to ../tmpc/
628 searching for changes
626 searching for changes
629 abort: push includes obsolete changesets:
627 abort: push includes orphan changeset: cda648ca50f5!
630 94b33453f93b
631 push includes unstable changesets:
632 cda648ca50f5 (orphan)
633 [255]
628 [255]
634
629
635 with --force it will work anyway
630 with --force it will work anyway
@@ -652,26 +647,6 b' if the orphan changeset is already on th'
652 no changes found
647 no changes found
653 [1]
648 [1]
654
649
655 pushing should work even if the outgoing changes contain an unrelated changeset
656 (neither obsolete nor unstable) (issue6372)
657
658 $ hg up 1 -q
659 $ hg branch new -q
660 $ mkcommit c
661
662 $ hg push ../tmpc/ --new-branch
663 pushing to ../tmpc/
664 searching for changes
665 adding changesets
666 adding manifests
667 adding file changes
668 added 1 changesets with 1 changes to 1 files (+1 heads)
669
670 make later tests work unmodified
671
672 $ hg --config extensions.strip= strip tip -q
673 $ hg up 5 -q
674
675 Test that extinct changeset are properly detected
650 Test that extinct changeset are properly detected
676
651
677 $ hg log -r 'extinct()'
652 $ hg log -r 'extinct()'
@@ -1221,14 +1196,6 b' test whyunstable template keyword'
1221 phase-divergent: immutable predecessor 245b
1196 phase-divergent: immutable predecessor 245b
1222 content-divergent: predecessor 245b
1197 content-divergent: predecessor 245b
1223
1198
1224 $ hg push ../tmpf -r 50c51b361e60
1225 pushing to ../tmpf
1226 searching for changes
1227 abort: push includes unstable changesets:
1228 50c51b361e60 (orphan, phase-divergent, content-divergent)
1229 [255]
1230
1231
1232 #if serve
1199 #if serve
1233
1200
1234 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
1201 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
General Comments 0
You need to be logged in to leave comments. Login now