Mercurial > hg
changeset 12873:e1855dee28c1 stable
merge with i18n
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 27 Oct 2010 16:54:46 -0500 |
parents | eda77c3e246a (diff) 8ed36b23edd9 (current diff) |
children | bb7bf43b72fb b70b5f3e33e2 |
files | |
diffstat | 31 files changed, 84 insertions(+), 65 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Tue Oct 26 21:31:35 2010 -0200 +++ b/Makefile Wed Oct 27 16:54:46 2010 -0500 @@ -88,7 +88,8 @@ i18n/hg.pot: $(PYFILES) $(DOCFILES) $(PYTHON) i18n/hggettext mercurial/commands.py \ - hgext/*.py hgext/*/__init__.py $(DOCFILES) > i18n/hg.pot + hgext/*.py hgext/*/__init__.py mercurial/revset.py \ + $(DOCFILES) > i18n/hg.pot # All strings marked for translation in Mercurial contain # ASCII characters only. But some files contain string # literals like this '\037\213'. xgettext thinks it has to
--- a/README Tue Oct 26 21:31:35 2010 -0200 +++ b/README Wed Oct 27 16:54:46 2010 -0500 @@ -1,3 +1,9 @@ +Mercurial +========= + +Mercurial is a fast, easy to use, distributed revision control tool +for software developers. + Basic install: $ make # see install targets @@ -7,4 +13,3 @@ See http://mercurial.selenic.com/ for detailed installation instructions, platform-specific notes, and Mercurial user information. -
--- a/contrib/setup3k.py Tue Oct 26 21:31:35 2010 -0200 +++ b/contrib/setup3k.py Wed Oct 27 16:54:46 2010 -0500 @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # This is an experimental py3k-enabled mercurial setup script. #
--- a/contrib/shrink-revlog.py Tue Oct 26 21:31:35 2010 -0200 +++ b/contrib/shrink-revlog.py Wed Oct 27 16:54:46 2010 -0500 @@ -1,5 +1,3 @@ -#!/usr/bin/env python - """\ reorder a revlog (the manifest by default) to save space
--- a/doc/hgmanpage.py Tue Oct 26 21:31:35 2010 -0200 +++ b/doc/hgmanpage.py Wed Oct 27 16:54:46 2010 -0500 @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- # $Id: manpage.py 6110 2009-08-31 14:40:33Z grubert $ # Author: Engelbert Gruber <grubert@users.sourceforge.net>
--- a/hgext/bookmarks.py Tue Oct 26 21:31:35 2010 -0200 +++ b/hgext/bookmarks.py Wed Oct 27 16:54:46 2010 -0500 @@ -469,7 +469,7 @@ return result def diffbookmarks(ui, repo, remote): - ui.status(_("searching for changes\n")) + ui.status(_("searching for changed bookmarks\n")) lmarks = repo.listkeys('bookmarks') rmarks = remote.listkeys('bookmarks') @@ -479,7 +479,7 @@ ui.write(" %-25s %s\n" % (k, rmarks[k][:12])) if len(diff) <= 0: - ui.status(_("no changes found\n")) + ui.status(_("no changed bookmarks found\n")) return 1 return 0
--- a/hgext/mq.py Tue Oct 26 21:31:35 2010 -0200 +++ b/hgext/mq.py Wed Oct 27 16:54:46 2010 -0500 @@ -654,9 +654,11 @@ message = ph.message if not message: + # The commit message should not be translated message = "imported patch %s\n" % patchname else: if list: + # The commit message should not be translated message.append("\nimported patch %s" % patchname) message = '\n'.join(message) @@ -690,7 +692,7 @@ n = repo.commit(message, ph.user, ph.date, match=match, force=True) if n is None: - raise util.Abort(_("repo commit failed")) + raise util.Abort(_("repository commit failed")) if update_status: self.applied.append(statusentry(n, patchname)) @@ -1542,7 +1544,7 @@ self.ui.warn(_("saved queue repository parents: %s %s\n") % (short(qpp[0]), short(qpp[1]))) if qupdate: - self.ui.status(_("queue directory updating\n")) + self.ui.status(_("updating queue directory\n")) r = self.qrepo() if not r: self.ui.warn(_("Unable to load queue repository\n"))
--- a/hgext/rebase.py Tue Oct 26 21:31:35 2010 -0200 +++ b/hgext/rebase.py Wed Oct 27 16:54:46 2010 -0500 @@ -451,7 +451,7 @@ # no backup of rebased cset versions needed repair.strip(repo.ui, repo, repo[strippoint].node()) clearstatus(repo) - repo.ui.status(_('rebase aborted\n')) + repo.ui.warn(_('rebase aborted\n')) return 0 def buildstate(repo, dest, src, base, detach):
--- a/i18n/polib.py Tue Oct 26 21:31:35 2010 -0200 +++ b/i18n/polib.py Wed Oct 27 16:54:46 2010 -0500 @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- # no-check-code #
--- a/mercurial/commands.py Tue Oct 26 21:31:35 2010 -0200 +++ b/mercurial/commands.py Wed Oct 27 16:54:46 2010 -0500 @@ -2497,7 +2497,8 @@ return if df and not df(ctx.date()[0]): return - if opts['user'] and not [k for k in opts['user'] if k in ctx.user()]: + if opts['user'] and not [k for k in opts['user'] + if k.lower() in ctx.user().lower()]: return if opts.get('keyword'): for k in [kw.lower() for kw in opts['keyword']]: @@ -2784,7 +2785,11 @@ modheads = repo.pull(other, heads=revs, force=opts.get('force')) if checkout: checkout = str(repo.changelog.rev(other.lookup(checkout))) - return postincoming(ui, repo, modheads, opts.get('update'), checkout) + repo._subtoppath = source + try: + return postincoming(ui, repo, modheads, opts.get('update'), checkout) + finally: + del repo._subtoppath def push(ui, repo, dest=None, **opts): """push changes to the specified destination @@ -2823,13 +2828,16 @@ if revs: revs = [repo.lookup(rev) for rev in revs] - # push subrepos depth-first for coherent ordering - c = repo[''] - subs = c.substate # only repos that are committed - for s in sorted(subs): - if not c.sub(s).push(opts.get('force')): - return False - + repo._subtoppath = dest + try: + # push subrepos depth-first for coherent ordering + c = repo[''] + subs = c.substate # only repos that are committed + for s in sorted(subs): + if not c.sub(s).push(opts.get('force')): + return False + finally: + del repo._subtoppath r = repo.push(other, opts.get('force'), revs=revs, newbranch=opts.get('new_branch')) return r == 0
--- a/mercurial/encoding.py Tue Oct 26 21:31:35 2010 -0200 +++ b/mercurial/encoding.py Wed Oct 27 16:54:46 2010 -0500 @@ -87,11 +87,17 @@ except LookupError, k: raise error.Abort("%s, please check your locale settings" % k) +# How to treat ambiguous-width characters. Set to 'wide' to treat as wide. +ambiguous = os.environ.get("HGENCODINGAMBIGUOUS", "narrow") + def colwidth(s): "Find the column width of a UTF-8 string for display" d = s.decode(encoding, 'replace') if hasattr(unicodedata, 'east_asian_width'): + wide = "WF" + if ambiguous == "wide": + wide = "WFA" w = unicodedata.east_asian_width - return sum([w(c) in 'WFA' and 2 or 1 for c in d]) + return sum([w(c) in wide and 2 or 1 for c in d]) return len(d)
--- a/mercurial/help/environment.txt Tue Oct 26 21:31:35 2010 -0200 +++ b/mercurial/help/environment.txt Wed Oct 27 16:54:46 2010 -0500 @@ -24,6 +24,13 @@ "ignore", which drops them. This setting can be overridden with the --encodingmode command-line option. +HGENCODINGAMBIGUOUS + This sets Mercurial's behavior for handling characters with + "ambiguous" widths like accented Latin characters with East Asian + fonts. By default, Mercurial assumes ambiguous characters are + narrow, set this variable to "wide" if such characters cause + formatting problems. + HGMERGE An executable to use for resolving merge conflicts. The program will be executed with three arguments: local file, remote file,
--- a/mercurial/help/merge-tools.txt Tue Oct 26 21:31:35 2010 -0200 +++ b/mercurial/help/merge-tools.txt Wed Oct 27 16:54:46 2010 -0500 @@ -31,7 +31,7 @@ symlink, if it can handle binary files if the file is binary, and if a GUI is available if the tool requires a GUI. -There are a some internal merge tools which can be used. The internal +There are some internal merge tools which can be used. The internal merge tools are: ``internal:merge``
--- a/mercurial/help/subrepos.txt Tue Oct 26 21:31:35 2010 -0200 +++ b/mercurial/help/subrepos.txt Wed Oct 27 16:54:46 2010 -0500 @@ -62,9 +62,8 @@ Deleting a Subrepository ------------------------ -To remove a subrepo from the parent repository, delete its reference -from ``.hgsub``. Then, the subrepo tree will show up as a set of -unknown files in :hg:`status`, and you can delete the files. +To remove a subrepository from the parent repository, delete its +reference from ``.hgsub``, then remove its files. Interaction with Mercurial Commands -----------------------------------
--- a/mercurial/minirst.py Tue Oct 26 21:31:35 2010 -0200 +++ b/mercurial/minirst.py Wed Oct 27 16:54:46 2010 -0500 @@ -248,7 +248,7 @@ # +------------------------------+ if (block['type'] == 'paragraph' and len(block['lines']) == 2 and - len(block['lines'][0]) == len(block['lines'][1]) and + encoding.colwidth(block['lines'][0]) == len(block['lines'][1]) and _sectionre.match(block['lines'][1])): block['underline'] = block['lines'][1][0] block['type'] = 'section' @@ -358,7 +358,7 @@ indent += ' ' return indent + ('\n' + indent).join(block['lines']) if block['type'] == 'section': - underline = len(block['lines'][0]) * block['underline'] + underline = encoding.colwidth(block['lines'][0]) * block['underline'] return "%s%s\n%s%s" % (indent, block['lines'][0],indent, underline) if block['type'] == 'definition': term = indent + block['lines'][0]
--- a/mercurial/revset.py Tue Oct 26 21:31:35 2010 -0200 +++ b/mercurial/revset.py Wed Oct 27 16:54:46 2010 -0500 @@ -8,7 +8,7 @@ import re import parser, util, error, discovery import match as matchmod -from i18n import _ +from i18n import _, gettext elements = { "(": (20, ("group", 1, ")"), ("func", 1, ")")), @@ -175,7 +175,7 @@ def node(repo, subset, x): """``id(string)`` - Revision non-ambiguously specified by the given hex string prefix + Revision non-ambiguously specified by the given hex string prefix. """ # i18n: "id" is a keyword l = getargs(x, 1, 1, _("id requires one argument")) @@ -785,10 +785,11 @@ text = symbols[name].__doc__ if not text: continue + text = gettext(text.rstrip()) lines = text.splitlines() lines[1:] = [(' ' + l.strip()) for l in lines[1:]] predicates.append('\n'.join(lines)) - predicates = '\n'.join(predicates) + predicates = '\n\n'.join(predicates) doc = doc.replace('.. predicatesmarker', predicates) return doc
--- a/mercurial/subrepo.py Tue Oct 26 21:31:35 2010 -0200 +++ b/mercurial/subrepo.py Wed Oct 27 16:54:46 2010 -0500 @@ -187,6 +187,8 @@ else: # plain file system path return posixpath.normpath(os.path.join(parent, repo._subsource)) else: # recursion reached top repo + if hasattr(repo, '_subtoppath'): + return repo._subtoppath if push and repo.ui.config('paths', 'default-push'): return repo.ui.config('paths', 'default-push') if repo.ui.config('paths', 'default'):
--- a/mercurial/url.py Tue Oct 26 21:31:35 2010 -0200 +++ b/mercurial/url.py Wed Oct 27 16:54:46 2010 -0500 @@ -131,9 +131,9 @@ raise util.Abort(_('http authorization required')) self.ui.write(_("http authorization required\n")) - self.ui.status(_("realm: %s\n") % realm) + self.ui.write(_("realm: %s\n") % realm) if user: - self.ui.status(_("user: %s\n") % user) + self.ui.write(_("user: %s\n") % user) else: user = self.ui.prompt(_("user:"), default=None)
--- a/setup.py Tue Oct 26 21:31:35 2010 -0200 +++ b/setup.py Wed Oct 27 16:54:46 2010 -0500 @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # This is the mercurial setup script. #
--- a/tests/test-bdiff.py Tue Oct 26 21:31:35 2010 -0200 +++ b/tests/test-bdiff.py Wed Oct 27 16:54:46 2010 -0500 @@ -1,5 +1,3 @@ -#!/usr/bin/env python - import struct from mercurial import bdiff, mpatch
--- a/tests/test-demandimport.py Tue Oct 26 21:31:35 2010 -0200 +++ b/tests/test-demandimport.py Wed Oct 27 16:54:46 2010 -0500 @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from mercurial import demandimport demandimport.enable()
--- a/tests/test-encoding.t Tue Oct 26 21:31:35 2010 -0200 +++ b/tests/test-encoding.t Wed Oct 27 16:54:46 2010 -0500 @@ -166,13 +166,13 @@ $ HGENCODING=latin-1 hg tags tip 5:093c6077d1c8 - é 3:ca661e7520de + é 3:ca661e7520de hg tags (utf-8) $ HGENCODING=utf-8 hg tags tip 5:093c6077d1c8 - é 3:ca661e7520de + é 3:ca661e7520de hg branches (ascii) @@ -183,13 +183,13 @@ hg branches (latin-1) $ HGENCODING=latin-1 hg branches - é 5:093c6077d1c8 + é 5:093c6077d1c8 default 4:94db611b4196 (inactive) hg branches (utf-8) $ HGENCODING=utf-8 hg branches - é 5:093c6077d1c8 + é 5:093c6077d1c8 default 4:94db611b4196 (inactive) $ echo '[ui]' >> .hg/hgrc $ echo 'fallbackencoding = koi8-r' >> .hg/hgrc
--- a/tests/test-hg-parseurl.py Tue Oct 26 21:31:35 2010 -0200 +++ b/tests/test-hg-parseurl.py Wed Oct 27 16:54:46 2010 -0500 @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from mercurial.hg import parseurl def testparse(url, branch=[]):
--- a/tests/test-hybridencode.py Tue Oct 26 21:31:35 2010 -0200 +++ b/tests/test-hybridencode.py Wed Oct 27 16:54:46 2010 -0500 @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from mercurial import store auxencode = lambda f: store._auxencode(f, True)
--- a/tests/test-minirst.py Tue Oct 26 21:31:35 2010 -0200 +++ b/tests/test-minirst.py Wed Oct 27 16:54:46 2010 -0500 @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from pprint import pprint from mercurial import minirst
--- a/tests/test-subrepo.t Tue Oct 26 21:31:35 2010 -0200 +++ b/tests/test-subrepo.t Wed Oct 27 16:54:46 2010 -0500 @@ -636,12 +636,23 @@ adding manifests adding file changes added 1 changesets with 2 changes to 2 files - abort: default path for subrepository sub/repo not found - [255] + pulling subrepo sub/repo from issue1852a/sub/repo + requesting all changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 1 files + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved Try to push from the other side - $ hg -R issue1852a push issue1852c - pushing to issue1852c - abort: default path for subrepository sub/repo not found - [255] + $ hg -R issue1852a push `pwd`/issue1852c + pushing to $TESTTMP/sub/issue1852c + pushing subrepo sub/repo to $TESTTMP/sub/issue1852c/sub/repo + searching for changes + no changes found + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files
--- a/tests/test-ui-color.py Tue Oct 26 21:31:35 2010 -0200 +++ b/tests/test-ui-color.py Wed Oct 27 16:54:46 2010 -0500 @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from hgext import color # ensure errors aren't buffered
--- a/tests/test-ui-config.py Tue Oct 26 21:31:35 2010 -0200 +++ b/tests/test-ui-config.py Wed Oct 27 16:54:46 2010 -0500 @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from mercurial import ui, dispatch, error testui = ui.ui()
--- a/tests/test-ui-verbosity.py Tue Oct 26 21:31:35 2010 -0200 +++ b/tests/test-ui-verbosity.py Wed Oct 27 16:54:46 2010 -0500 @@ -1,5 +1,3 @@ -#!/usr/bin/env python - import os from mercurial import ui
--- a/tests/test-url.py Tue Oct 26 21:31:35 2010 -0200 +++ b/tests/test-url.py Wed Oct 27 16:54:46 2010 -0500 @@ -1,4 +1,3 @@ -#!/usr/bin/env python import sys def check(a, b):
--- a/tests/test-win32text.t Tue Oct 26 21:31:35 2010 -0200 +++ b/tests/test-win32text.t Wed Oct 27 16:54:46 2010 -0500 @@ -393,16 +393,16 @@ Trigger deprecation warning: - $ hg id + $ hg id -t win32text is deprecated: http://mercurial.selenic.com/wiki/Win32TextExtension - b910084e3c98+ tip + tip Disable warning: $ echo '[win32text]' >> .hg/hgrc $ echo 'warn = no' >> .hg/hgrc - $ hg id - b910084e3c98+ tip + $ hg id -t + tip $ rm f3 f4.bat bin $ hg co -C 2>&1 | python -c 'import sys, os; sys.stdout.write(sys.stdin.read().replace(os.getcwd(), "...."))'