##// END OF EJS Templates
merge with stable
Martin von Zweigbergk -
r30916:455677a7 merge default
parent child Browse files
Show More
@@ -0,0 +1,14 b''
1 from __future__ import absolute_import
2
3 from mercurial.i18n import _
4 from mercurial import (
5 changegroup,
6 error,
7 extensions
8 )
9
10 def abort(orig, *args, **kwargs):
11 raise error.Abort(_('this is an exercise'))
12
13 def uisetup(ui):
14 extensions.wrapfunction(changegroup, 'getbundler', abort)
@@ -141,7 +141,7 b' i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n'
141 # xgettext "parse" and ignore them.
141 # xgettext "parse" and ignore them.
142 echo $(PYFILES) | xargs \
142 echo $(PYFILES) | xargs \
143 xgettext --package-name "Mercurial" \
143 xgettext --package-name "Mercurial" \
144 --msgid-bugs-address "<mercurial-devel@selenic.com>" \
144 --msgid-bugs-address "<mercurial-devel@mercurial-scm.org>" \
145 --copyright-holder "Matt Mackall <mpm@selenic.com> and others" \
145 --copyright-holder "Matt Mackall <mpm@selenic.com> and others" \
146 --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
146 --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
147 -d hg -p i18n -o hg.pot.tmp
147 -d hg -p i18n -o hg.pot.tmp
@@ -452,6 +452,10 b' allfilespats = ['
452 [
452 [
453 (r'(http|https)://[a-zA-Z0-9./]*selenic.com/',
453 (r'(http|https)://[a-zA-Z0-9./]*selenic.com/',
454 'use mercurial-scm.org domain URL'),
454 'use mercurial-scm.org domain URL'),
455 (r'mercurial@selenic\.com',
456 'use mercurial-scm.org domain for mercurial ML address'),
457 (r'mercurial-devel@selenic\.com',
458 'use mercurial-scm.org domain for mercurial-devel ML address'),
455 ],
459 ],
456 # warnings
460 # warnings
457 [],
461 [],
@@ -2,4 +2,4 b' mercurial (__VERSION__) __CODENAME__; ur'
2
2
3 * Automated build performed by upstream.
3 * Automated build performed by upstream.
4
4
5 -- Mercurial Devel <mercurial-devel@selenic.com> __DATE__
5 -- Mercurial Devel <mercurial-devel@mercurial-scm.org> __DATE__
@@ -1,7 +1,7 b''
1 Source: mercurial
1 Source: mercurial
2 Section: vcs
2 Section: vcs
3 Priority: optional
3 Priority: optional
4 Maintainer: Mercurial Developers <mercurial-devel@selenic.com>
4 Maintainer: Mercurial Developers <mercurial-devel@mercurial-scm.org>
5 Build-Depends:
5 Build-Depends:
6 debhelper (>= 9),
6 debhelper (>= 9),
7 dh-python,
7 dh-python,
@@ -3,7 +3,7 b' Upstream-Name: mercurial'
3 Source: https://www.mercurial-scm.org/
3 Source: https://www.mercurial-scm.org/
4
4
5 Files: *
5 Files: *
6 Copyright: 2005-2015, Matt Mackall <mpm@selenic.com> and others.
6 Copyright: 2005-2017, Matt Mackall <mpm@selenic.com> and others.
7 License: GPL-2+
7 License: GPL-2+
8 This program is free software; you can redistribute it
8 This program is free software; you can redistribute it
9 and/or modify it under the terms of the GNU General Public
9 and/or modify it under the terms of the GNU General Public
@@ -140,7 +140,7 b' editor = whatever'
140 </p>
140 </p>
141
141
142 <p>
142 <p>
143 Mercurial is Copyright 2005-2016 Matt Mackall and others. See
143 Mercurial is Copyright 2005-2017 Matt Mackall and others. See
144 the <tt>Contributors.txt</tt> file for a list of contributors.
144 the <tt>Contributors.txt</tt> file for a list of contributors.
145 </p>
145 </p>
146
146
@@ -21,7 +21,7 b''
21 #endif
21 #endif
22
22
23 [Setup]
23 [Setup]
24 AppCopyright=Copyright 2005-2016 Matt Mackall and others
24 AppCopyright=Copyright 2005-2017 Matt Mackall and others
25 AppName=Mercurial
25 AppName=Mercurial
26 AppVersion={#VERSION}
26 AppVersion={#VERSION}
27 #if ARCH == "x64"
27 #if ARCH == "x64"
@@ -41,11 +41,11 b' AppPublisherURL=https://mercurial-scm.or'
41 AppSupportURL=https://mercurial-scm.org/
41 AppSupportURL=https://mercurial-scm.org/
42 AppUpdatesURL=https://mercurial-scm.org/
42 AppUpdatesURL=https://mercurial-scm.org/
43 AppID={{4B95A5F1-EF59-4B08-BED8-C891C46121B3}
43 AppID={{4B95A5F1-EF59-4B08-BED8-C891C46121B3}
44 AppContact=mercurial@selenic.com
44 AppContact=mercurial@mercurial-scm.org
45 DefaultDirName={pf}\Mercurial
45 DefaultDirName={pf}\Mercurial
46 SourceDir=..\..
46 SourceDir=..\..
47 VersionInfoDescription=Mercurial distributed SCM (version {#VERSION})
47 VersionInfoDescription=Mercurial distributed SCM (version {#VERSION})
48 VersionInfoCopyright=Copyright 2005-2016 Matt Mackall and others
48 VersionInfoCopyright=Copyright 2005-2017 Matt Mackall and others
49 VersionInfoCompany=Matt Mackall and others
49 VersionInfoCompany=Matt Mackall and others
50 InternalCompressLevel=max
50 InternalCompressLevel=max
51 SolidCompression=true
51 SolidCompression=true
@@ -43,7 +43,7 b''
43 </Property>
43 </Property>
44
44
45 <!--Property Id='ARPCOMMENTS'>any comments</Property-->
45 <!--Property Id='ARPCOMMENTS'>any comments</Property-->
46 <Property Id='ARPCONTACT'>mercurial@selenic.com</Property>
46 <Property Id='ARPCONTACT'>mercurial@mercurial-scm.org</Property>
47 <Property Id='ARPHELPLINK'>https://mercurial-scm.org/wiki/</Property>
47 <Property Id='ARPHELPLINK'>https://mercurial-scm.org/wiki/</Property>
48 <Property Id='ARPURLINFOABOUT'>https://mercurial-scm.org/about/</Property>
48 <Property Id='ARPURLINFOABOUT'>https://mercurial-scm.org/about/</Property>
49 <Property Id='ARPURLUPDATEINFO'>https://mercurial-scm.org/downloads/</Property>
49 <Property Id='ARPURLUPDATEINFO'>https://mercurial-scm.org/downloads/</Property>
@@ -16,7 +16,7 b''
16 msgid ""
16 msgid ""
17 msgstr ""
17 msgstr ""
18 "Project-Id-Version: Mercurial\n"
18 "Project-Id-Version: Mercurial\n"
19 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
19 "Report-Msgid-Bugs-To: <mercurial-devel@mercurial-scm.org>\n"
20 "POT-Creation-Date: 2011-11-09 18:27+0100\n"
20 "POT-Creation-Date: 2011-11-09 18:27+0100\n"
21 "PO-Revision-Date: 2011-11-09 19:00+0100\n"
21 "PO-Revision-Date: 2011-11-09 19:00+0100\n"
22 "Last-Translator: <mg@lazybytes.net>\n"
22 "Last-Translator: <mg@lazybytes.net>\n"
@@ -19,7 +19,7 b''
19 msgid ""
19 msgid ""
20 msgstr ""
20 msgstr ""
21 "Project-Id-Version: Mercurial\n"
21 "Project-Id-Version: Mercurial\n"
22 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
22 "Report-Msgid-Bugs-To: <mercurial-devel@mercurial-scm.org>\n"
23 "POT-Creation-Date: 2014-01-29 16:47+0100\n"
23 "POT-Creation-Date: 2014-01-29 16:47+0100\n"
24 "PO-Revision-Date: 2014-05-07 09:14+0200\n"
24 "PO-Revision-Date: 2014-05-07 09:14+0200\n"
25 "Last-Translator: Simon Heimberg <simohe@besonet.ch>\n"
25 "Last-Translator: Simon Heimberg <simohe@besonet.ch>\n"
@@ -6,7 +6,7 b''
6 msgid ""
6 msgid ""
7 msgstr ""
7 msgstr ""
8 "Project-Id-Version: Mercurial\n"
8 "Project-Id-Version: Mercurial\n"
9 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
9 "Report-Msgid-Bugs-To: <mercurial-devel@mercurial-scm.org>\n"
10 "POT-Creation-Date: 2009-10-25 12:38+0100\n"
10 "POT-Creation-Date: 2009-10-25 12:38+0100\n"
11 "PO-Revision-Date: 2009-12-02 03:23+0200\n"
11 "PO-Revision-Date: 2009-12-02 03:23+0200\n"
12 "Last-Translator: <keramida@ceid.upatras.gr>\n"
12 "Last-Translator: <keramida@ceid.upatras.gr>\n"
@@ -85,7 +85,7 b''
85 msgid ""
85 msgid ""
86 msgstr ""
86 msgstr ""
87 "Project-Id-Version: Mercurial\n"
87 "Project-Id-Version: Mercurial\n"
88 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
88 "Report-Msgid-Bugs-To: <mercurial-devel@mercurial-scm.org>\n"
89 "POT-Creation-Date: 2009-10-25 12:38+0100\n"
89 "POT-Creation-Date: 2009-10-25 12:38+0100\n"
90 "PO-Revision-Date: 2009-10-25 12:43+0100\n"
90 "PO-Revision-Date: 2009-10-25 12:43+0100\n"
91 "Last-Translator: Cedric Duval <cedricduval@free.fr>\n"
91 "Last-Translator: Cedric Duval <cedricduval@free.fr>\n"
@@ -4,7 +4,7 b''
4 msgid ""
4 msgid ""
5 msgstr ""
5 msgstr ""
6 "Project-Id-Version: Mercurial\n"
6 "Project-Id-Version: Mercurial\n"
7 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
7 "Report-Msgid-Bugs-To: <mercurial-devel@mercurial-scm.org>\n"
8 "POT-Creation-Date: 2011-03-22 22:04+0100\n"
8 "POT-Creation-Date: 2011-03-22 22:04+0100\n"
9 "PO-Revision-Date: 2013-04-05 14:47+0100\n"
9 "PO-Revision-Date: 2013-04-05 14:47+0100\n"
10 "Last-Translator: Stefano Tortarolo <stefano.tortarolo@gmail.com>\n"
10 "Last-Translator: Stefano Tortarolo <stefano.tortarolo@gmail.com>\n"
@@ -164,7 +164,7 b''
164 msgid ""
164 msgid ""
165 msgstr ""
165 msgstr ""
166 "Project-Id-Version: Mercurial\n"
166 "Project-Id-Version: Mercurial\n"
167 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
167 "Report-Msgid-Bugs-To: <mercurial-devel@mercurial-scm.org>\n"
168 "POT-Creation-Date: 2016-12-31 13:29+0900\n"
168 "POT-Creation-Date: 2016-12-31 13:29+0900\n"
169 "PO-Revision-Date: 2016-12-31 17:09+0900\n"
169 "PO-Revision-Date: 2016-12-31 17:09+0900\n"
170 "Last-Translator: Japanese translation team <mercurial-ja@googlegroups.com>\n"
170 "Last-Translator: Japanese translation team <mercurial-ja@googlegroups.com>\n"
@@ -31,7 +31,7 b''
31 msgid ""
31 msgid ""
32 msgstr ""
32 msgstr ""
33 "Project-Id-Version: Mercurial\n"
33 "Project-Id-Version: Mercurial\n"
34 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
34 "Report-Msgid-Bugs-To: <mercurial-devel@mercurial-scm.org>\n"
35 "POT-Creation-Date: 2017-01-31 16:48-0200\n"
35 "POT-Creation-Date: 2017-01-31 16:48-0200\n"
36 "PO-Revision-Date: 2017-02-01 08:40-0200\n"
36 "PO-Revision-Date: 2017-02-01 08:40-0200\n"
37 "Last-Translator: Wagner Bruna <wbruna@softwareexpress.com.br>\n"
37 "Last-Translator: Wagner Bruna <wbruna@softwareexpress.com.br>\n"
@@ -105,7 +105,7 b''
105 msgid ""
105 msgid ""
106 msgstr ""
106 msgstr ""
107 "Project-Id-Version: Mercurial\n"
107 "Project-Id-Version: Mercurial\n"
108 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
108 "Report-Msgid-Bugs-To: <mercurial-devel@mercurial-scm.org>\n"
109 "POT-Creation-Date: 2011-06-08 15:03+0200\n"
109 "POT-Creation-Date: 2011-06-08 15:03+0200\n"
110 "PO-Revision-Date: 2011-06-08 17:00+0200\n"
110 "PO-Revision-Date: 2011-06-08 17:00+0200\n"
111 "Last-Translator: Daniel Dumitriu <daniel.dumitriu@gmail.com>\n"
111 "Last-Translator: Daniel Dumitriu <daniel.dumitriu@gmail.com>\n"
@@ -179,7 +179,7 b''
179 msgid ""
179 msgid ""
180 msgstr ""
180 msgstr ""
181 "Project-Id-Version: Mercurial\n"
181 "Project-Id-Version: Mercurial\n"
182 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
182 "Report-Msgid-Bugs-To: <mercurial-devel@mercurial-scm.org>\n"
183 "POT-Creation-Date: 2014-10-13 14:18+0400\n"
183 "POT-Creation-Date: 2014-10-13 14:18+0400\n"
184 "PO-Revision-Date: 2011-05-12 23:48+0400\n"
184 "PO-Revision-Date: 2011-05-12 23:48+0400\n"
185 "Last-Translator: Alexander Sauta <demosito@gmail.com>\n"
185 "Last-Translator: Alexander Sauta <demosito@gmail.com>\n"
@@ -15,7 +15,7 b''
15 msgid ""
15 msgid ""
16 msgstr ""
16 msgstr ""
17 "Project-Id-Version: Mercurial\n"
17 "Project-Id-Version: Mercurial\n"
18 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
18 "Report-Msgid-Bugs-To: <mercurial-devel@mercurial-scm.org>\n"
19 "POT-Creation-Date: 2012-07-28 14:35+0200\n"
19 "POT-Creation-Date: 2012-07-28 14:35+0200\n"
20 "PO-Revision-Date: 2012-07-28 22:58+0200\n"
20 "PO-Revision-Date: 2012-07-28 22:58+0200\n"
21 "Last-Translator: Jens BΓ€ckman <jens.backman@gmail.com>\n"
21 "Last-Translator: Jens BΓ€ckman <jens.backman@gmail.com>\n"
@@ -46,7 +46,7 b''
46 msgid ""
46 msgid ""
47 msgstr ""
47 msgstr ""
48 "Project-Id-Version: Mercurial 1.3\n"
48 "Project-Id-Version: Mercurial 1.3\n"
49 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
49 "Report-Msgid-Bugs-To: <mercurial-devel@mercurial-scm.org>\n"
50 "POT-Creation-Date: 2009-10-19 11:47+0800\n"
50 "POT-Creation-Date: 2009-10-19 11:47+0800\n"
51 "PO-Revision-Date: 2009-03-31 20:38+0200\n"
51 "PO-Revision-Date: 2009-03-31 20:38+0200\n"
52 "Last-Translator: Dongsheng Song <dongsheng.song@gmail.com>\n"
52 "Last-Translator: Dongsheng Song <dongsheng.song@gmail.com>\n"
@@ -6,7 +6,7 b''
6 msgid ""
6 msgid ""
7 msgstr ""
7 msgstr ""
8 "Project-Id-Version: Mercurial\n"
8 "Project-Id-Version: Mercurial\n"
9 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
9 "Report-Msgid-Bugs-To: <mercurial-devel@mercurial-scm.org>\n"
10 "POT-Creation-Date: 2010-10-31 22:27+0100\n"
10 "POT-Creation-Date: 2010-10-31 22:27+0100\n"
11 "PO-Revision-Date: 2014-05-07 09:20+0200\n"
11 "PO-Revision-Date: 2014-05-07 09:20+0200\n"
12 "Last-Translator: Chia-Huan Wu <willie.tw@gmail.com>,leolarrel<leolarrel@gmail.com>\n"
12 "Last-Translator: Chia-Huan Wu <willie.tw@gmail.com>,leolarrel<leolarrel@gmail.com>\n"
@@ -6583,7 +6583,7 b' def version_(ui, **opts):'
6583 util.version())
6583 util.version())
6584 license = _(
6584 license = _(
6585 "(see https://mercurial-scm.org for more information)\n"
6585 "(see https://mercurial-scm.org for more information)\n"
6586 "\nCopyright (C) 2005-2016 Matt Mackall and others\n"
6586 "\nCopyright (C) 2005-2017 Matt Mackall and others\n"
6587 "This is free software; see the source for copying conditions. "
6587 "This is free software; see the source for copying conditions. "
6588 "There is NO\nwarranty; "
6588 "There is NO\nwarranty; "
6589 "not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
6589 "not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
@@ -904,7 +904,9 b' def _pushbundle2(pushop):'
904 raise error.Abort(_('missing support for %s') % exc)
904 raise error.Abort(_('missing support for %s') % exc)
905 except bundle2.AbortFromPart as exc:
905 except bundle2.AbortFromPart as exc:
906 pushop.ui.status(_('remote: %s\n') % exc)
906 pushop.ui.status(_('remote: %s\n') % exc)
907 raise error.Abort(_('push failed on remote'), hint=exc.hint)
907 if exc.hint is not None:
908 pushop.ui.status(_('remote: %s\n') % ('(%s)' % exc.hint))
909 raise error.Abort(_('push failed on remote'))
908 except error.PushkeyFailed as exc:
910 except error.PushkeyFailed as exc:
909 partid = int(exc.partid)
911 partid = int(exc.partid)
910 if partid not in pushop.pkfailcb:
912 if partid not in pushop.pkfailcb:
@@ -1361,6 +1363,9 b' def _pullbundle2(pullop):'
1361 bundle = pullop.remote.getbundle('pull', **kwargs)
1363 bundle = pullop.remote.getbundle('pull', **kwargs)
1362 try:
1364 try:
1363 op = bundle2.processbundle(pullop.repo, bundle, pullop.gettransaction)
1365 op = bundle2.processbundle(pullop.repo, bundle, pullop.gettransaction)
1366 except bundle2.AbortFromPart as exc:
1367 pullop.repo.ui.status(_('remote: abort: %s\n') % exc)
1368 raise error.Abort(_('pull failed on remote'), hint=exc.hint)
1364 except error.BundleValueError as exc:
1369 except error.BundleValueError as exc:
1365 raise error.Abort(_('missing support for %s') % exc)
1370 raise error.Abort(_('missing support for %s') % exc)
1366
1371
@@ -112,7 +112,7 b' Mailing list: https://www.mercurial-scm.'
112
112
113 Copying
113 Copying
114 """""""
114 """""""
115 Copyright (C) 2005-2016 Matt Mackall.
115 Copyright (C) 2005-2017 Matt Mackall.
116 Free use of this software is granted under the terms of the GNU General
116 Free use of this software is granted under the terms of the GNU General
117 Public License version 2 or any later version.
117 Public License version 2 or any later version.
118
118
@@ -26,7 +26,7 b' See Also'
26 Copying
26 Copying
27 =======
27 =======
28 This manual page is copyright 2006 Vadim Gelfer.
28 This manual page is copyright 2006 Vadim Gelfer.
29 Mercurial is copyright 2005-2016 Matt Mackall.
29 Mercurial is copyright 2005-2017 Matt Mackall.
30 Free use of this software is granted under the terms of the GNU General
30 Free use of this software is granted under the terms of the GNU General
31 Public License version 2 or any later version.
31 Public License version 2 or any later version.
32
32
@@ -34,7 +34,7 b' See Also'
34 Copying
34 Copying
35 =======
35 =======
36 This manual page is copyright 2005 Bryan O'Sullivan.
36 This manual page is copyright 2005 Bryan O'Sullivan.
37 Mercurial is copyright 2005-2016 Matt Mackall.
37 Mercurial is copyright 2005-2017 Matt Mackall.
38 Free use of this software is granted under the terms of the GNU General
38 Free use of this software is granted under the terms of the GNU General
39 Public License version 2 or any later version.
39 Public License version 2 or any later version.
40
40
@@ -33,9 +33,10 b' from . import ('
33 urlerr = util.urlerr
33 urlerr = util.urlerr
34 urlreq = util.urlreq
34 urlreq = util.urlreq
35
35
36 bundle2required = _(
36 bundle2requiredmain = _('incompatible Mercurial client; bundle2 required')
37 'incompatible Mercurial client; bundle2 required\n'
37 bundle2requiredhint = _('see https://www.mercurial-scm.org/wiki/'
38 '(see https://www.mercurial-scm.org/wiki/IncompatibleClient)\n')
38 'IncompatibleClient')
39 bundle2required = '%s\n(%s)\n' % (bundle2requiredmain, bundle2requiredhint)
39
40
40 class abstractserverproto(object):
41 class abstractserverproto(object):
41 """abstract class that summarizes the protocol API
42 """abstract class that summarizes the protocol API
@@ -833,9 +834,29 b' def getbundle(repo, proto, others):'
833
834
834 if not bundle1allowed(repo, 'pull'):
835 if not bundle1allowed(repo, 'pull'):
835 if not exchange.bundle2requested(opts.get('bundlecaps')):
836 if not exchange.bundle2requested(opts.get('bundlecaps')):
836 return ooberror(bundle2required)
837 if proto.name == 'http':
838 return ooberror(bundle2required)
839 raise error.Abort(bundle2requiredmain,
840 hint=bundle2requiredhint)
837
841
838 chunks = exchange.getbundlechunks(repo, 'serve', **opts)
842 #chunks = exchange.getbundlechunks(repo, 'serve', **opts)
843 try:
844 chunks = exchange.getbundlechunks(repo, 'serve', **opts)
845 except error.Abort as exc:
846 # cleanly forward Abort error to the client
847 if not exchange.bundle2requested(opts.get('bundlecaps')):
848 if proto.name == 'http':
849 return ooberror(str(exc) + '\n')
850 raise # cannot do better for bundle1 + ssh
851 # bundle2 request expect a bundle2 reply
852 bundler = bundle2.bundle20(repo.ui)
853 manargs = [('message', str(exc))]
854 advargs = []
855 if exc.hint is not None:
856 advargs.append(('hint', exc.hint))
857 bundler.addpart(bundle2.bundlepart('error:abort',
858 manargs, advargs))
859 return streamres(gen=bundler.getchunks(), v1compressible=True)
839 return streamres(gen=chunks, v1compressible=True)
860 return streamres(gen=chunks, v1compressible=True)
840
861
841 @wireprotocommand('heads')
862 @wireprotocommand('heads')
@@ -948,7 +969,14 b' def unbundle(repo, proto, heads):'
948 gen = exchange.readbundle(repo.ui, fp, None)
969 gen = exchange.readbundle(repo.ui, fp, None)
949 if (isinstance(gen, changegroupmod.cg1unpacker)
970 if (isinstance(gen, changegroupmod.cg1unpacker)
950 and not bundle1allowed(repo, 'push')):
971 and not bundle1allowed(repo, 'push')):
951 return ooberror(bundle2required)
972 if proto.name == 'http':
973 # need to special case http because stderr do not get to
974 # the http client on failed push so we need to abuse some
975 # other error type to make sure the message get to the
976 # user.
977 return ooberror(bundle2required)
978 raise error.Abort(bundle2requiredmain,
979 hint=bundle2requiredhint)
952
980
953 r = exchange.unbundle(repo, gen, their_heads, 'serve',
981 r = exchange.unbundle(repo, gen, their_heads, 'serve',
954 proto._client())
982 proto._client())
@@ -973,6 +1001,8 b' def unbundle(repo, proto, heads):'
973 # This need to be moved to something proper.
1001 # This need to be moved to something proper.
974 # Feel free to do it.
1002 # Feel free to do it.
975 util.stderr.write("abort: %s\n" % exc)
1003 util.stderr.write("abort: %s\n" % exc)
1004 if exc.hint is not None:
1005 util.stderr.write("(%s)\n" % exc.hint)
976 return pushres(0)
1006 return pushres(0)
977 except error.PushRaced:
1007 except error.PushRaced:
978 return pusherr(str(exc))
1008 return pusherr(str(exc))
@@ -664,7 +664,7 b' extra = {}'
664 if py2exeloaded:
664 if py2exeloaded:
665 extra['console'] = [
665 extra['console'] = [
666 {'script':'hg',
666 {'script':'hg',
667 'copyright':'Copyright (C) 2005-2016 Matt Mackall and others',
667 'copyright':'Copyright (C) 2005-2017 Matt Mackall and others',
668 'product_version':version}]
668 'product_version':version}]
669 # sub command of 'build' because 'py2exe' does not handle sub_commands
669 # sub command of 'build' because 'py2exe' does not handle sub_commands
670 build.sub_commands.insert(0, ('build_hgextindex', None))
670 build.sub_commands.insert(0, ('build_hgextindex', None))
@@ -712,7 +712,7 b" if sys.platform == 'darwin' and os.path."
712 setup(name='mercurial',
712 setup(name='mercurial',
713 version=setupversion,
713 version=setupversion,
714 author='Matt Mackall and many others',
714 author='Matt Mackall and many others',
715 author_email='mercurial@selenic.com',
715 author_email='mercurial@mercurial-scm.org',
716 url='https://mercurial-scm.org/',
716 url='https://mercurial-scm.org/',
717 download_url='https://mercurial-scm.org/release/',
717 download_url='https://mercurial-scm.org/release/',
718 description=('Fast scalable distributed SCM (revision control, version '
718 description=('Fast scalable distributed SCM (revision control, version '
@@ -518,16 +518,16 b' Doing the actual push: Abort error'
518 pushing to ssh://user@dummy/other
518 pushing to ssh://user@dummy/other
519 searching for changes
519 searching for changes
520 remote: Abandon ship!
520 remote: Abandon ship!
521 remote: (don't panic)
521 abort: push failed on remote
522 abort: push failed on remote
522 (don't panic)
523 [255]
523 [255]
524
524
525 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
525 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
526 pushing to http://localhost:$HGPORT2/
526 pushing to http://localhost:$HGPORT2/
527 searching for changes
527 searching for changes
528 remote: Abandon ship!
528 remote: Abandon ship!
529 remote: (don't panic)
529 abort: push failed on remote
530 abort: push failed on remote
530 (don't panic)
531 [255]
531 [255]
532
532
533
533
@@ -1024,11 +1024,12 b' bundle1 pull can be disabled for general'
1024
1024
1025 Verify the global server.bundle1 option works
1025 Verify the global server.bundle1 option works
1026
1026
1027 $ cat > .hg/hgrc << EOF
1027 $ cd ..
1028 $ cat > bundle2onlyserver/.hg/hgrc << EOF
1028 > [server]
1029 > [server]
1029 > bundle1 = false
1030 > bundle1 = false
1030 > EOF
1031 > EOF
1031 $ hg serve -p $HGPORT -d --pid-file=hg.pid
1032 $ hg -R bundle2onlyserver serve -p $HGPORT -d --pid-file=hg.pid
1032 $ cat hg.pid >> $DAEMON_PIDS
1033 $ cat hg.pid >> $DAEMON_PIDS
1033 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT not-bundle2
1034 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT not-bundle2
1034 requesting all changes
1035 requesting all changes
@@ -1038,11 +1039,21 b' Verify the global server.bundle1 option '
1038 [255]
1039 [255]
1039 $ killdaemons.py
1040 $ killdaemons.py
1040
1041
1041 $ cat > .hg/hgrc << EOF
1042 $ hg --config devel.legacy.exchange=bundle1 clone ssh://user@dummy/bundle2onlyserver not-bundle2-ssh
1043 requesting all changes
1044 adding changesets
1045 remote: abort: incompatible Mercurial client; bundle2 required
1046 remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1047 transaction abort!
1048 rollback completed
1049 abort: stream ended unexpectedly (got 0 bytes, expected 4)
1050 [255]
1051
1052 $ cat > bundle2onlyserver/.hg/hgrc << EOF
1042 > [server]
1053 > [server]
1043 > bundle1gd = false
1054 > bundle1gd = false
1044 > EOF
1055 > EOF
1045 $ hg serve -p $HGPORT -d --pid-file=hg.pid
1056 $ hg -R bundle2onlyserver serve -p $HGPORT -d --pid-file=hg.pid
1046 $ cat hg.pid >> $DAEMON_PIDS
1057 $ cat hg.pid >> $DAEMON_PIDS
1047
1058
1048 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
1059 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
@@ -1054,7 +1065,7 b' Verify the global server.bundle1 option '
1054
1065
1055 $ killdaemons.py
1066 $ killdaemons.py
1056
1067
1057 $ cd ../notgdserver
1068 $ cd notgdserver
1058 $ cat > .hg/hgrc << EOF
1069 $ cat > .hg/hgrc << EOF
1059 > [server]
1070 > [server]
1060 > bundle1gd = false
1071 > bundle1gd = false
@@ -1107,6 +1118,15 b' Verify bundle1 pushes can be disabled'
1107 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1118 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1108 [255]
1119 [255]
1109
1120
1121 (also check with ssh)
1122
1123 $ hg --config devel.legacy.exchange=bundle1 push ssh://user@dummy/bundle2onlyserver
1124 pushing to ssh://user@dummy/bundle2onlyserver
1125 searching for changes
1126 remote: abort: incompatible Mercurial client; bundle2 required
1127 remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1128 [1]
1129
1110 $ hg push
1130 $ hg push
1111 pushing to http://localhost:$HGPORT/
1131 pushing to http://localhost:$HGPORT/
1112 searching for changes
1132 searching for changes
@@ -1,6 +1,6 b''
1 #require baz symlink
1 #require baz symlink
2
2
3 $ baz my-id "mercurial <mercurial@selenic.com>"
3 $ baz my-id "mercurial <mercurial@mercurial-scm.org>"
4
4
5 $ echo "[extensions]" >> $HGRCPATH
5 $ echo "[extensions]" >> $HGRCPATH
6 $ echo "convert=" >> $HGRCPATH
6 $ echo "convert=" >> $HGRCPATH
@@ -1,6 +1,6 b''
1 #require tla symlink
1 #require tla symlink
2
2
3 $ tla my-id "mercurial <mercurial@selenic.com>"
3 $ tla my-id "mercurial <mercurial@mercurial-scm.org>"
4 $ echo "[extensions]" >> $HGRCPATH
4 $ echo "[extensions]" >> $HGRCPATH
5 $ echo "convert=" >> $HGRCPATH
5 $ echo "convert=" >> $HGRCPATH
6
6
@@ -445,7 +445,7 b' Test help option with version option'
445 Mercurial Distributed SCM (version *) (glob)
445 Mercurial Distributed SCM (version *) (glob)
446 (see https://mercurial-scm.org for more information)
446 (see https://mercurial-scm.org for more information)
447
447
448 Copyright (C) 2005-2016 Matt Mackall and others
448 Copyright (C) 2005-* Matt Mackall and others (glob)
449 This is free software; see the source for copying conditions. There is NO
449 This is free software; see the source for copying conditions. There is NO
450 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
450 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
451
451
@@ -71,7 +71,7 b' issue1829: wrong indentation'
71 Mercurial Distributed SCM (version *) (glob)
71 Mercurial Distributed SCM (version *) (glob)
72 (see https://mercurial-scm.org for more information)
72 (see https://mercurial-scm.org for more information)
73
73
74 Copyright (C) 2005-2016 Matt Mackall and others
74 Copyright (C) 2005-* Matt Mackall and others (glob)
75 This is free software; see the source for copying conditions. There is NO
75 This is free software; see the source for copying conditions. There is NO
76 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
76 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
77 $ unset FAKEPATH
77 $ unset FAKEPATH
@@ -333,3 +333,15 b' clone of serve with repo in root and uns'
333 check error log
333 check error log
334
334
335 $ cat error.log
335 $ cat error.log
336
337 Check error reporting while pulling/cloning
338
339 $ $RUNTESTDIR/killdaemons.py
340 $ hg -R test serve -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py
341 $ cat hg3.pid >> $DAEMON_PIDS
342 $ hg clone http://localhost:$HGPORT/ abort-clone
343 requesting all changes
344 abort: remote error:
345 this is an exercise
346 [255]
347 $ cat error.log
@@ -321,3 +321,15 b' clone of serve with repo in root and uns'
321 check error log
321 check error log
322
322
323 $ cat error.log
323 $ cat error.log
324
325 check abort error reporting while pulling/cloning
326
327 $ $RUNTESTDIR/killdaemons.py
328 $ hg -R test serve -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py
329 $ cat hg3.pid >> $DAEMON_PIDS
330 $ hg clone http://localhost:$HGPORT/ abort-clone
331 requesting all changes
332 remote: abort: this is an exercise
333 abort: pull failed on remote
334 [255]
335 $ cat error.log
@@ -543,3 +543,20 b' remote hook failure is attributed to rem'
543 remote: abort: pretxnchangegroup.fail hook failed
543 remote: abort: pretxnchangegroup.fail hook failed
544 [1]
544 [1]
545
545
546 abort during pull is properly reported as such
547
548 $ echo morefoo >> ../remote/foo
549 $ hg -R ../remote commit --message "more foo to be pulled"
550 $ cat >> ../remote/.hg/hgrc << EOF
551 > [extensions]
552 > crash = ${TESTDIR}/crashgetbundler.py
553 > EOF
554 $ hg --config ui.ssh="python $TESTDIR/dummyssh" pull
555 pulling from ssh://user@dummy/remote
556 searching for changes
557 adding changesets
558 remote: abort: this is an exercise
559 transaction abort!
560 rollback completed
561 abort: stream ended unexpectedly (got 0 bytes, expected 4)
562 [255]
@@ -548,3 +548,17 b' remote hook failure is attributed to rem'
548 abort: push failed on remote
548 abort: push failed on remote
549 [255]
549 [255]
550
550
551 abort during pull is properly reported as such
552
553 $ echo morefoo >> ../remote/foo
554 $ hg -R ../remote commit --message "more foo to be pulled"
555 $ cat >> ../remote/.hg/hgrc << EOF
556 > [extensions]
557 > crash = ${TESTDIR}/crashgetbundler.py
558 > EOF
559 $ hg --config ui.ssh="python $TESTDIR/dummyssh" pull
560 pulling from ssh://user@dummy/remote
561 searching for changes
562 remote: abort: this is an exercise
563 abort: pull failed on remote
564 [255]
General Comments 0
You need to be logged in to leave comments. Login now