##// END OF EJS Templates
errors: raise RemoteError in some places in exchange.py...
Martin von Zweigbergk -
r47739:3f87d2af default
parent child Browse files
Show More
@@ -1147,19 +1147,19 b' def _pushbundle2(pushop):'
1147 },
1147 },
1148 ).result()
1148 ).result()
1149 except error.BundleValueError as exc:
1149 except error.BundleValueError as exc:
1150 raise error.Abort(_(b'missing support for %s') % exc)
1150 raise error.RemoteError(_(b'missing support for %s') % exc)
1151 try:
1151 try:
1152 trgetter = None
1152 trgetter = None
1153 if pushback:
1153 if pushback:
1154 trgetter = pushop.trmanager.transaction
1154 trgetter = pushop.trmanager.transaction
1155 op = bundle2.processbundle(pushop.repo, reply, trgetter)
1155 op = bundle2.processbundle(pushop.repo, reply, trgetter)
1156 except error.BundleValueError as exc:
1156 except error.BundleValueError as exc:
1157 raise error.Abort(_(b'missing support for %s') % exc)
1157 raise error.RemoteError(_(b'missing support for %s') % exc)
1158 except bundle2.AbortFromPart as exc:
1158 except bundle2.AbortFromPart as exc:
1159 pushop.ui.error(_(b'remote: %s\n') % exc)
1159 pushop.ui.error(_(b'remote: %s\n') % exc)
1160 if exc.hint is not None:
1160 if exc.hint is not None:
1161 pushop.ui.error(_(b'remote: %s\n') % (b'(%s)' % exc.hint))
1161 pushop.ui.error(_(b'remote: %s\n') % (b'(%s)' % exc.hint))
1162 raise error.Abort(_(b'push failed on remote'))
1162 raise error.RemoteError(_(b'push failed on remote'))
1163 except error.PushkeyFailed as exc:
1163 except error.PushkeyFailed as exc:
1164 partid = int(exc.partid)
1164 partid = int(exc.partid)
1165 if partid not in pushop.pkfailcb:
1165 if partid not in pushop.pkfailcb:
@@ -1875,9 +1875,9 b' def _pullbundle2(pullop):'
1875 bundle2.processbundle(pullop.repo, bundle, op=op)
1875 bundle2.processbundle(pullop.repo, bundle, op=op)
1876 except bundle2.AbortFromPart as exc:
1876 except bundle2.AbortFromPart as exc:
1877 pullop.repo.ui.error(_(b'remote: abort: %s\n') % exc)
1877 pullop.repo.ui.error(_(b'remote: abort: %s\n') % exc)
1878 raise error.Abort(_(b'pull failed on remote'), hint=exc.hint)
1878 raise error.RemoteError(_(b'pull failed on remote'), hint=exc.hint)
1879 except error.BundleValueError as exc:
1879 except error.BundleValueError as exc:
1880 raise error.Abort(_(b'missing support for %s') % exc)
1880 raise error.RemoteError(_(b'missing support for %s') % exc)
1881
1881
1882 if pullop.fetch:
1882 if pullop.fetch:
1883 pullop.cgresult = bundle2.combinechangegroupresults(op)
1883 pullop.cgresult = bundle2.combinechangegroupresults(op)
@@ -1217,7 +1217,7 b' Using ssh'
1217 no changes found
1217 no changes found
1218 remote: prepushkey hook exited with status 1
1218 remote: prepushkey hook exited with status 1
1219 abort: push failed on remote
1219 abort: push failed on remote
1220 [255]
1220 [100]
1221
1221
1222 #endif
1222 #endif
1223
1223
@@ -1257,7 +1257,7 b' Using http'
1257 no changes found
1257 no changes found
1258 remote: prepushkey hook exited with status 1
1258 remote: prepushkey hook exited with status 1
1259 abort: push failed on remote
1259 abort: push failed on remote
1260 [255]
1260 [100]
1261
1261
1262 #endif
1262 #endif
1263
1263
@@ -1334,7 +1334,7 b' attempt to move the bookmark is rejected'
1334 no changes found
1334 no changes found
1335 remote: prepushkey.no-bm-move hook exited with status 1
1335 remote: prepushkey.no-bm-move hook exited with status 1
1336 abort: push failed on remote
1336 abort: push failed on remote
1337 [255]
1337 [100]
1338 #endif
1338 #endif
1339
1339
1340 -- test for pushing bookmarks pointing to secret changesets
1340 -- test for pushing bookmarks pointing to secret changesets
@@ -548,7 +548,7 b' Doing the actual push: Abort error'
548 remote: Abandon ship!
548 remote: Abandon ship!
549 remote: (don't panic)
549 remote: (don't panic)
550 abort: push failed on remote
550 abort: push failed on remote
551 [255]
551 [100]
552
552
553 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
553 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
554 pushing to http://localhost:$HGPORT2/
554 pushing to http://localhost:$HGPORT2/
@@ -556,7 +556,7 b' Doing the actual push: Abort error'
556 remote: Abandon ship!
556 remote: Abandon ship!
557 remote: (don't panic)
557 remote: (don't panic)
558 abort: push failed on remote
558 abort: push failed on remote
559 [255]
559 [100]
560
560
561
561
562 Doing the actual push: unknown mandatory parts
562 Doing the actual push: unknown mandatory parts
@@ -570,19 +570,19 b' Doing the actual push: unknown mandatory'
570 pushing to other
570 pushing to other
571 searching for changes
571 searching for changes
572 abort: missing support for test:unknown
572 abort: missing support for test:unknown
573 [255]
573 [100]
574
574
575 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
575 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
576 pushing to ssh://user@dummy/other
576 pushing to ssh://user@dummy/other
577 searching for changes
577 searching for changes
578 abort: missing support for test:unknown
578 abort: missing support for test:unknown
579 [255]
579 [100]
580
580
581 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
581 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
582 pushing to http://localhost:$HGPORT2/
582 pushing to http://localhost:$HGPORT2/
583 searching for changes
583 searching for changes
584 abort: missing support for test:unknown
584 abort: missing support for test:unknown
585 [255]
585 [100]
586
586
587 Doing the actual push: race
587 Doing the actual push: race
588
588
@@ -653,7 +653,7 b' Doing the actual push: hook abort'
653 remote: rollback completed
653 remote: rollback completed
654 remote: pretxnclose.failpush hook exited with status 1
654 remote: pretxnclose.failpush hook exited with status 1
655 abort: push failed on remote
655 abort: push failed on remote
656 [255]
656 [100]
657
657
658 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
658 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
659 pushing to http://localhost:$HGPORT2/
659 pushing to http://localhost:$HGPORT2/
@@ -668,7 +668,7 b' Doing the actual push: hook abort'
668 remote: rollback completed
668 remote: rollback completed
669 remote: pretxnclose.failpush hook exited with status 1
669 remote: pretxnclose.failpush hook exited with status 1
670 abort: push failed on remote
670 abort: push failed on remote
671 [255]
671 [100]
672
672
673 (check that no 'pending' files remain)
673 (check that no 'pending' files remain)
674
674
@@ -712,7 +712,7 b' Check error from hook during the unbundl'
712 remote: rollback completed
712 remote: rollback completed
713 remote: pretxnchangegroup hook exited with status 1
713 remote: pretxnchangegroup hook exited with status 1
714 abort: push failed on remote
714 abort: push failed on remote
715 [255]
715 [100]
716 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
716 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
717 pushing to http://localhost:$HGPORT2/
717 pushing to http://localhost:$HGPORT2/
718 searching for changes
718 searching for changes
@@ -725,7 +725,7 b' Check error from hook during the unbundl'
725 remote: rollback completed
725 remote: rollback completed
726 remote: pretxnchangegroup hook exited with status 1
726 remote: pretxnchangegroup hook exited with status 1
727 abort: push failed on remote
727 abort: push failed on remote
728 [255]
728 [100]
729
729
730 Check output capture control.
730 Check output capture control.
731
731
@@ -760,7 +760,7 b' Check output capture control.'
760 remote: rollback completed
760 remote: rollback completed
761 remote: pretxnchangegroup hook exited with status 1
761 remote: pretxnchangegroup hook exited with status 1
762 abort: push failed on remote
762 abort: push failed on remote
763 [255]
763 [100]
764 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
764 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
765 pushing to http://localhost:$HGPORT2/
765 pushing to http://localhost:$HGPORT2/
766 searching for changes
766 searching for changes
@@ -773,7 +773,7 b' Check output capture control.'
773 remote: rollback completed
773 remote: rollback completed
774 remote: pretxnchangegroup hook exited with status 1
774 remote: pretxnchangegroup hook exited with status 1
775 abort: push failed on remote
775 abort: push failed on remote
776 [255]
776 [100]
777
777
778 Check abort from mandatory pushkey
778 Check abort from mandatory pushkey
779
779
@@ -950,7 +950,7 b' Test lazily acquiring the lock during un'
950 searching for changes
950 searching for changes
951 remote: Lock should not be taken
951 remote: Lock should not be taken
952 abort: push failed on remote
952 abort: push failed on remote
953 [255]
953 [100]
954
954
955 $ cat >> ../lazylock/.hg/hgrc <<EOF
955 $ cat >> ../lazylock/.hg/hgrc <<EOF
956 > [experimental]
956 > [experimental]
@@ -542,7 +542,7 b' Unknown digest'
542 searching for changes
542 searching for changes
543 remote: remote-changegroup
543 remote: remote-changegroup
544 abort: missing support for remote-changegroup - digest:foo
544 abort: missing support for remote-changegroup - digest:foo
545 [255]
545 [100]
546
546
547 Missing digest
547 Missing digest
548
548
@@ -408,7 +408,7 b' Clone not allowed when full bundles disa'
408 remote: abort: server has pull-based clones disabled
408 remote: abort: server has pull-based clones disabled
409 abort: pull failed on remote
409 abort: pull failed on remote
410 (remove --pull if specified or upgrade Mercurial)
410 (remove --pull if specified or upgrade Mercurial)
411 [255]
411 [100]
412
412
413 Local stream clone with secrets involved
413 Local stream clone with secrets involved
414 (This is just a test over behavior: if you have access to the repo's files,
414 (This is just a test over behavior: if you have access to the repo's files,
@@ -629,7 +629,7 b' Clone non-publishing with obsolescence'
629 streaming all changes
629 streaming all changes
630 remote: abort: server has obsolescence markers, but client cannot receive them via stream clone
630 remote: abort: server has obsolescence markers, but client cannot receive them via stream clone
631 abort: pull failed on remote
631 abort: pull failed on remote
632 [255]
632 [100]
633
633
634 $ killdaemons.py
634 $ killdaemons.py
635
635
@@ -505,7 +505,7 b' check abort error reporting while pullin'
505 requesting all changes
505 requesting all changes
506 remote: abort: this is an exercise
506 remote: abort: this is an exercise
507 abort: pull failed on remote
507 abort: pull failed on remote
508 [255]
508 [100]
509 $ cat error.log
509 $ cat error.log
510
510
511 disable pull-based clones
511 disable pull-based clones
@@ -517,7 +517,7 b' disable pull-based clones'
517 remote: abort: server has pull-based clones disabled
517 remote: abort: server has pull-based clones disabled
518 abort: pull failed on remote
518 abort: pull failed on remote
519 (remove --pull if specified or upgrade Mercurial)
519 (remove --pull if specified or upgrade Mercurial)
520 [255]
520 [100]
521
521
522 #if no-reposimplestore
522 #if no-reposimplestore
523 ... but keep stream clones working
523 ... but keep stream clones working
@@ -293,7 +293,7 b' TODO: fail more gracefully.'
293 requesting all changes
293 requesting all changes
294 remote: abort: no common changegroup version
294 remote: abort: no common changegroup version
295 abort: pull failed on remote
295 abort: pull failed on remote
296 [255]
296 [100]
297 $ grep 'lfs' $TESTTMP/client4_pull/.hg/requires $SERVER_REQUIRES
297 $ grep 'lfs' $TESTTMP/client4_pull/.hg/requires $SERVER_REQUIRES
298 $TESTTMP/server/.hg/requires:lfs
298 $TESTTMP/server/.hg/requires:lfs
299
299
@@ -39,7 +39,7 b' Trying to stream clone when the server d'
39 streaming all changes
39 streaming all changes
40 remote: abort: server does not support narrow stream clones
40 remote: abort: server does not support narrow stream clones
41 abort: pull failed on remote
41 abort: pull failed on remote
42 [255]
42 [100]
43
43
44 Enable stream clone on the server
44 Enable stream clone on the server
45
45
@@ -151,4 +151,4 b' Can pull into repo with a single commit'
151 transaction abort!
151 transaction abort!
152 rollback completed
152 rollback completed
153 abort: pull failed on remote
153 abort: pull failed on remote
154 [255]
154 [100]
@@ -110,9 +110,9 b' cannot clone with zero or negative depth'
110 requesting all changes
110 requesting all changes
111 remote: abort: depth must be positive, got 0
111 remote: abort: depth must be positive, got 0
112 abort: pull failed on remote
112 abort: pull failed on remote
113 [255]
113 [100]
114 $ hg clone --narrow ssh://user@dummy/master bad --include "d2" --depth -1
114 $ hg clone --narrow ssh://user@dummy/master bad --include "d2" --depth -1
115 requesting all changes
115 requesting all changes
116 remote: abort: depth must be positive, got -1
116 remote: abort: depth must be positive, got -1
117 abort: pull failed on remote
117 abort: pull failed on remote
118 [255]
118 [100]
@@ -95,7 +95,7 b''
95 # flakiness here
95 # flakiness here
96 $ hg clone --noupdate ssh://user@dummy/shallow full 2>/dev/null
96 $ hg clone --noupdate ssh://user@dummy/shallow full 2>/dev/null
97 streaming all changes
97 streaming all changes
98 [255]
98 [100]
99
99
100 # getbundle full clone
100 # getbundle full clone
101
101
@@ -89,7 +89,7 b' check its contents separately.'
89 $ TEMP_STDERR=full-clone-from-shallow.stderr.tmp
89 $ TEMP_STDERR=full-clone-from-shallow.stderr.tmp
90 $ hg clone --noupdate ssh://user@dummy/shallow full 2>$TEMP_STDERR
90 $ hg clone --noupdate ssh://user@dummy/shallow full 2>$TEMP_STDERR
91 streaming all changes
91 streaming all changes
92 [255]
92 [100]
93 $ cat $TEMP_STDERR
93 $ cat $TEMP_STDERR
94 remote: abort: Cannot clone from a shallow repo to a full repo.
94 remote: abort: Cannot clone from a shallow repo to a full repo.
95 abort: pull failed on remote
95 abort: pull failed on remote
@@ -487,7 +487,7 b' Test hg-ssh in read-only mode:'
487 remote: Permission denied
487 remote: Permission denied
488 remote: pretxnopen.hg-ssh hook failed
488 remote: pretxnopen.hg-ssh hook failed
489 abort: push failed on remote
489 abort: push failed on remote
490 [255]
490 [100]
491
491
492 $ cd $TESTTMP
492 $ cd $TESTTMP
493
493
@@ -681,7 +681,7 b' remote hook failure is attributed to rem'
681 remote: rollback completed
681 remote: rollback completed
682 remote: pretxnchangegroup.fail hook failed
682 remote: pretxnchangegroup.fail hook failed
683 abort: push failed on remote
683 abort: push failed on remote
684 [255]
684 [100]
685
685
686 abort during pull is properly reported as such
686 abort during pull is properly reported as such
687
687
@@ -696,7 +696,7 b' abort during pull is properly reported a'
696 searching for changes
696 searching for changes
697 remote: abort: this is an exercise
697 remote: abort: this is an exercise
698 abort: pull failed on remote
698 abort: pull failed on remote
699 [255]
699 [100]
700
700
701 abort with no error hint when there is a ssh problem when pulling
701 abort with no error hint when there is a ssh problem when pulling
702
702
General Comments 0
You need to be logged in to leave comments. Login now