##// END OF EJS Templates
exchange: raise error.Abort instead of ValueError...
Gregory Szorc -
r41853:3b0ba457 default
parent child Browse files
Show More
@@ -920,7 +920,7 b' def _pushb2ctx(pushop, bundler):'
920 if v in changegroup.supportedoutgoingversions(
920 if v in changegroup.supportedoutgoingversions(
921 pushop.repo)]
921 pushop.repo)]
922 if not cgversions:
922 if not cgversions:
923 raise ValueError(_('no common changegroup version'))
923 raise error.Abort(_('no common changegroup version'))
924 version = max(cgversions)
924 version = max(cgversions)
925 cgstream = changegroup.makestream(pushop.repo, pushop.outgoing, version,
925 cgstream = changegroup.makestream(pushop.repo, pushop.outgoing, version,
926 'push')
926 'push')
@@ -2184,7 +2184,7 b' def _getbundlechangegrouppart(bundler, r'
2184 cgversions = [v for v in cgversions
2184 cgversions = [v for v in cgversions
2185 if v in changegroup.supportedoutgoingversions(repo)]
2185 if v in changegroup.supportedoutgoingversions(repo)]
2186 if not cgversions:
2186 if not cgversions:
2187 raise ValueError(_('no common changegroup version'))
2187 raise error.Abort(_('no common changegroup version'))
2188 version = max(cgversions)
2188 version = max(cgversions)
2189
2189
2190 outgoing = _computeoutgoing(repo, heads, common)
2190 outgoing = _computeoutgoing(repo, heads, common)
@@ -2228,7 +2228,7 b' def _getbundlebookmarkpart(bundler, repo'
2228 if not kwargs.get(r'bookmarks', False):
2228 if not kwargs.get(r'bookmarks', False):
2229 return
2229 return
2230 if 'bookmarks' not in b2caps:
2230 if 'bookmarks' not in b2caps:
2231 raise ValueError(_('no common bookmarks exchange method'))
2231 raise error.Abort(_('no common bookmarks exchange method'))
2232 books = bookmod.listbinbookmarks(repo)
2232 books = bookmod.listbinbookmarks(repo)
2233 data = bookmod.binaryencode(books)
2233 data = bookmod.binaryencode(books)
2234 if data:
2234 if data:
@@ -2263,7 +2263,7 b' def _getbundlephasespart(bundler, repo, '
2263 """add phase heads part to the requested bundle"""
2263 """add phase heads part to the requested bundle"""
2264 if kwargs.get(r'phases', False):
2264 if kwargs.get(r'phases', False):
2265 if not 'heads' in b2caps.get('phases'):
2265 if not 'heads' in b2caps.get('phases'):
2266 raise ValueError(_('no common phases exchange method'))
2266 raise error.Abort(_('no common phases exchange method'))
2267 if heads is None:
2267 if heads is None:
2268 heads = repo.heads()
2268 heads = repo.heads()
2269
2269
@@ -56,11 +56,10 b' make command server magic visible'
56 > EOF
56 > EOF
57
57
58 Skip the experimental.changegroup3=True config. Failure to agree on this comes
58 Skip the experimental.changegroup3=True config. Failure to agree on this comes
59 first, and causes a "ValueError: no common changegroup version" or "abort:
59 first, and causes an "abort: no common changegroup version" if the extension is
60 HTTP Error 500: Internal Server Error", if the extension is only loaded on one
60 only loaded on one side. If that *is* enabled, the subsequent failure is "abort:
61 side. If that *is* enabled, the subsequent failure is "abort: missing processor
61 missing processor for flag '0x2000'!" if the extension is only loaded on one side
62 for flag '0x2000'!" if the extension is only loaded on one side (possibly also
62 (possibly also masked by the Internal Server Error message).
63 masked by the Internal Server Error message).
64 $ cat >> $HGRCPATH <<EOF
63 $ cat >> $HGRCPATH <<EOF
65 > [extensions]
64 > [extensions]
66 > debugprocessors = $TESTTMP/debugprocessors.py
65 > debugprocessors = $TESTTMP/debugprocessors.py
@@ -320,7 +319,8 b' TODO: fail more gracefully.'
320 $ hg -R $TESTTMP/client4_pull pull http://localhost:$HGPORT
319 $ hg -R $TESTTMP/client4_pull pull http://localhost:$HGPORT
321 pulling from http://localhost:$HGPORT/
320 pulling from http://localhost:$HGPORT/
322 requesting all changes
321 requesting all changes
323 abort: HTTP Error 500: Internal Server Error
322 remote: abort: no common changegroup version
323 abort: pull failed on remote
324 [255]
324 [255]
325 $ grep 'lfs' $TESTTMP/client4_pull/.hg/requires $SERVER_REQUIRES
325 $ grep 'lfs' $TESTTMP/client4_pull/.hg/requires $SERVER_REQUIRES
326 $TESTTMP/server/.hg/requires:lfs
326 $TESTTMP/server/.hg/requires:lfs
@@ -664,10 +664,4 b' Only the files required by diff are pref'
664
664
665 $ "$PYTHON" $TESTDIR/killdaemons.py $DAEMON_PIDS
665 $ "$PYTHON" $TESTDIR/killdaemons.py $DAEMON_PIDS
666
666
667 #if lfsremote-on
668 $ cat $TESTTMP/errors.log | grep '^[A-Z]'
669 Traceback (most recent call last):
670 ValueError: no common changegroup version
671 #else
672 $ cat $TESTTMP/errors.log
667 $ cat $TESTTMP/errors.log
673 #endif
General Comments 0
You need to be logged in to leave comments. Login now