##// END OF EJS Templates
i18n: translate abort messages...
liscju -
r29389:98e8313d default
parent child Browse files
Show More
@@ -291,7 +291,7 b' class bundlerepository(localrepo.localre'
291 291 ".cg%sun" % version)
292 292
293 293 if cgstream is None:
294 raise error.Abort('No changegroups found')
294 raise error.Abort(_('No changegroups found'))
295 295 cgstream.seek(0)
296 296
297 297 self.bundle = changegroup.getunbundler(version, cgstream, 'UN')
@@ -858,14 +858,14 b' def _pushbundle2(pushop):'
858 858 try:
859 859 reply = pushop.remote.unbundle(stream, ['force'], 'push')
860 860 except error.BundleValueError as exc:
861 raise error.Abort('missing support for %s' % exc)
861 raise error.Abort(_('missing support for %s') % exc)
862 862 try:
863 863 trgetter = None
864 864 if pushback:
865 865 trgetter = pushop.trmanager.transaction
866 866 op = bundle2.processbundle(pushop.repo, reply, trgetter)
867 867 except error.BundleValueError as exc:
868 raise error.Abort('missing support for %s' % exc)
868 raise error.Abort(_('missing support for %s') % exc)
869 869 except bundle2.AbortFromPart as exc:
870 870 pushop.ui.status(_('remote: %s\n') % exc)
871 871 raise error.Abort(_('push failed on remote'), hint=exc.hint)
@@ -1325,7 +1325,7 b' def _pullbundle2(pullop):'
1325 1325 try:
1326 1326 op = bundle2.processbundle(pullop.repo, bundle, pullop.gettransaction)
1327 1327 except error.BundleValueError as exc:
1328 raise error.Abort('missing support for %s' % exc)
1328 raise error.Abort(_('missing support for %s') % exc)
1329 1329
1330 1330 if pullop.fetch:
1331 1331 results = [cg['return'] for cg in op.records['changegroup']]
@@ -484,7 +484,8 b' def clone(ui, peeropts, source, dest=Non'
484 484 sharepath = os.path.join(
485 485 sharepool, hashlib.sha1(source).hexdigest())
486 486 else:
487 raise error.Abort('unknown share naming mode: %s' % sharenamemode)
487 raise error.Abort(_('unknown share naming mode: %s') %
488 sharenamemode)
488 489
489 490 if sharepath:
490 491 return clonewithshare(ui, peeropts, sharepath, source, srcpeer,
@@ -968,7 +968,7 b' class manifest(revlog.revlog):'
968 968 return self.readdelta(node)
969 969 if self._usemanifestv2:
970 970 raise error.Abort(
971 "readshallowdelta() not implemented for manifestv2")
971 _("readshallowdelta() not implemented for manifestv2"))
972 972 r = self.rev(node)
973 973 d = mdiff.patchtext(self.revdiff(self.deltaparent(r), r))
974 974 return manifestdict(d)
@@ -38,7 +38,7 b' def _expandsets(kindpats, ctx, listsubre'
38 38 for kind, pat, source in kindpats:
39 39 if kind == 'set':
40 40 if not ctx:
41 raise error.Abort("fileset expression with no context")
41 raise error.Abort(_("fileset expression with no context"))
42 42 s = ctx.getfileset(pat)
43 43 fset.update(s)
44 44
@@ -600,8 +600,8 b' class obsstore(object):'
600 600 Take care of filtering duplicate.
601 601 Return the number of new marker."""
602 602 if self._readonly:
603 raise error.Abort('creating obsolete markers is not enabled on '
604 'this repo')
603 raise error.Abort(_('creating obsolete markers is not enabled on '
604 'this repo'))
605 605 known = set(self._all)
606 606 new = []
607 607 for m in markers:
@@ -1234,7 +1234,7 b' def createmarkers(repo, relations, flag='
1234 1234 localmetadata.update(rel[2])
1235 1235
1236 1236 if not prec.mutable():
1237 raise error.Abort("cannot obsolete public changeset: %s"
1237 raise error.Abort(_("cannot obsolete public changeset: %s")
1238 1238 % prec,
1239 1239 hint='see "hg help phases" for details')
1240 1240 nprec = prec.node()
@@ -1243,7 +1243,8 b' def createmarkers(repo, relations, flag='
1243 1243 if not nsucs:
1244 1244 npare = tuple(p.node() for p in prec.parents())
1245 1245 if nprec in nsucs:
1246 raise error.Abort("changeset %s cannot obsolete itself" % prec)
1246 raise error.Abort(_("changeset %s cannot obsolete itself")
1247 % prec)
1247 1248
1248 1249 # Creating the marker causes the hidden cache to become invalid,
1249 1250 # which causes recomputation when we ask for prec.parents() above.
@@ -2663,7 +2663,8 b' def formatspec(expr, *args):'
2663 2663 ret += listexp(list(args[arg]), d)
2664 2664 arg += 1
2665 2665 else:
2666 raise error.Abort('unexpected revspec format character %s' % d)
2666 raise error.Abort(_('unexpected revspec format character %s')
2667 % d)
2667 2668 else:
2668 2669 ret += c
2669 2670 pos += 1
@@ -468,7 +468,8 b' class abstractvfs(object):'
468 468 # have a use case.
469 469 vfs = getattr(self, 'vfs', self)
470 470 if getattr(vfs, '_backgroundfilecloser', None):
471 raise error.Abort('can only have 1 active background file closer')
471 raise error.Abort(
472 _('can only have 1 active background file closer'))
472 473
473 474 with backgroundfilecloser(ui, expectedcount=expectedcount) as bfc:
474 475 try:
@@ -590,8 +591,9 b' class vfs(abstractvfs):'
590 591
591 592 if backgroundclose:
592 593 if not self._backgroundfilecloser:
593 raise error.Abort('backgroundclose can only be used when a '
594 raise error.Abort(_('backgroundclose can only be used when a '
594 595 'backgroundclosing context manager is active')
596 )
595 597
596 598 fp = delayclosedfile(fp, self._backgroundfilecloser)
597 599
@@ -662,7 +664,7 b' class readonlyvfs(abstractvfs, auditvfs)'
662 664
663 665 def __call__(self, path, mode='r', *args, **kw):
664 666 if mode not in ('r', 'rb'):
665 raise error.Abort('this vfs is read only')
667 raise error.Abort(_('this vfs is read only'))
666 668 return self.vfs(path, mode, *args, **kw)
667 669
668 670 def join(self, path, *insidef):
@@ -1383,8 +1385,8 b' class backgroundfilecloser(object):'
1383 1385 def close(self, fh):
1384 1386 """Schedule a file for closing."""
1385 1387 if not self._entered:
1386 raise error.Abort('can only call close() when context manager '
1387 'active')
1388 raise error.Abort(_('can only call close() when context manager '
1389 'active'))
1388 1390
1389 1391 # If a background thread encountered an exception, raise now so we fail
1390 1392 # fast. Otherwise we may potentially go on for minutes until the error
@@ -307,7 +307,7 b' class sshpeer(wireproto.wirepeer):'
307 307 r = self._call(cmd, **args)
308 308 if r:
309 309 # XXX needs to be made better
310 raise error.Abort('unexpected remote reply: %s' % r)
310 raise error.Abort(_('unexpected remote reply: %s') % r)
311 311 while True:
312 312 d = fp.read(4096)
313 313 if not d:
@@ -11,6 +11,7 b' from __future__ import absolute_import'
11 11 import os
12 12 import sys
13 13
14 from .i18n import _
14 15 from . import (
15 16 error,
16 17 hook,
@@ -40,7 +41,7 b' class sshserver(wireproto.abstractserver'
40 41 argline = self.fin.readline()[:-1]
41 42 arg, l = argline.split()
42 43 if arg not in keys:
43 raise error.Abort("unexpected parameter %r" % arg)
44 raise error.Abort(_("unexpected parameter %r") % arg)
44 45 if arg == '*':
45 46 star = {}
46 47 for k in xrange(int(l)):
@@ -76,15 +76,15 b' except AttributeError:'
76 76
77 77 def load_verify_locations(self, cafile=None, capath=None, cadata=None):
78 78 if capath:
79 raise error.Abort('capath not supported')
79 raise error.Abort(_('capath not supported'))
80 80 if cadata:
81 raise error.Abort('cadata not supported')
81 raise error.Abort(_('cadata not supported'))
82 82
83 83 self._cacerts = cafile
84 84
85 85 def set_ciphers(self, ciphers):
86 86 if not self._supportsciphers:
87 raise error.Abort('setting ciphers not supported')
87 raise error.Abort(_('setting ciphers not supported'))
88 88
89 89 self._ciphers = ciphers
90 90
@@ -229,7 +229,7 b' def wrapsocket(sock, keyfile, certfile, '
229 229 to use.
230 230 """
231 231 if not serverhostname:
232 raise error.Abort('serverhostname argument is required')
232 raise error.Abort(_('serverhostname argument is required'))
233 233
234 234 settings = _hostsettings(ui, serverhostname)
235 235
@@ -1414,7 +1414,7 b' class gitsubrepo(abstractsubrepo):'
1414 1414 if command in ('cat-file', 'symbolic-ref'):
1415 1415 return retdata, p.returncode
1416 1416 # for all others, abort
1417 raise error.Abort('git %s error %d in %s' %
1417 raise error.Abort(_('git %s error %d in %s') %
1418 1418 (command, p.returncode, self._relpath))
1419 1419
1420 1420 return retdata, p.returncode
General Comments 0
You need to be logged in to leave comments. Login now