Mercurial > hg
changeset 11027:d16315e811de stable
merge with i18n stable
author | Wagner Bruna <wbruna@yahoo.com> |
---|---|
date | Sat, 24 Apr 2010 01:34:55 -0300 |
parents | 33119d0252c1 (diff) 8227a631c6b4 (current diff) |
children | 0425f1fdf3a8 |
files | |
diffstat | 27 files changed, 108 insertions(+), 67 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/bzr.py Mon Apr 19 18:57:16 2010 +0200 +++ b/hgext/convert/bzr.py Sat Apr 24 01:34:55 2010 -0300 @@ -37,13 +37,14 @@ super(bzr_source, self).__init__(ui, path, rev=rev) if not os.path.exists(os.path.join(path, '.bzr')): - raise NoRepo('%s does not look like a Bazaar repo' % path) + raise NoRepo(_('%s does not look like a Bazaar repository') + % path) try: # access bzrlib stuff branch except NameError: - raise NoRepo('Bazaar modules could not be loaded') + raise NoRepo(_('Bazaar modules could not be loaded')) path = os.path.abspath(path) self._checkrepotype(path)
--- a/hgext/convert/cvs.py Mon Apr 19 18:57:16 2010 +0200 +++ b/hgext/convert/cvs.py Sat Apr 24 01:34:55 2010 -0300 @@ -19,7 +19,7 @@ cvs = os.path.join(path, "CVS") if not os.path.exists(cvs): - raise NoRepo("%s does not look like a CVS checkout" % path) + raise NoRepo(_("%s does not look like a CVS checkout") % path) checktool('cvs')
--- a/hgext/convert/cvsps.py Mon Apr 19 18:57:16 2010 +0200 +++ b/hgext/convert/cvsps.py Sat Apr 24 01:34:55 2010 -0300 @@ -129,7 +129,7 @@ if prefix == ".": prefix = "" except IOError: - raise logerror('Not a CVS sandbox') + raise logerror(_('not a CVS sandbox')) if prefix and not prefix.endswith(os.sep): prefix += os.sep @@ -402,6 +402,8 @@ branchpoints = set() for branch, revision in branchmap.iteritems(): revparts = tuple([int(i) for i in revision.split('.')]) + if len(revparts) < 2: # bad tags + continue if revparts[-2] == 0 and revparts[-1] % 2 == 0: # normal branch if revparts[:-2] == e.revision: @@ -435,8 +437,8 @@ log.sort(key=lambda x: x.date) if oldlog and oldlog[-1].date >= log[0].date: - raise logerror('Log cache overlaps with new log entries,' - ' re-run without cache.') + raise logerror(_('log cache overlaps with new log entries,' + ' re-run without cache.')) log = oldlog + log
--- a/hgext/convert/darcs.py Mon Apr 19 18:57:16 2010 +0200 +++ b/hgext/convert/darcs.py Sat Apr 24 01:34:55 2010 -0300 @@ -34,10 +34,10 @@ # check for _darcs, ElementTree, _darcs/inventory so that we can # easily skip test-convert-darcs if ElementTree is not around if not os.path.exists(os.path.join(path, '_darcs', 'inventories')): - raise NoRepo("%s does not look like a darcs repo" % path) + raise NoRepo(_("%s does not look like a darcs repository") % path) if not os.path.exists(os.path.join(path, '_darcs')): - raise NoRepo("%s does not look like a darcs repo" % path) + raise NoRepo(_("%s does not look like a darcs repository") % path) checktool('darcs') version = self.run0('--version').splitlines()[0].strip()
--- a/hgext/convert/git.py Mon Apr 19 18:57:16 2010 +0200 +++ b/hgext/convert/git.py Sat Apr 24 01:34:55 2010 -0300 @@ -7,6 +7,7 @@ import os from mercurial import util +from mercurial.i18n import _ from common import NoRepo, commit, converter_source, checktool @@ -35,7 +36,7 @@ if os.path.isdir(path + "/.git"): path += "/.git" if not os.path.exists(path + "/objects"): - raise NoRepo("%s does not look like a Git repo" % path) + raise NoRepo(_("%s does not look like a Git repository") % path) checktool('git', 'git')
--- a/hgext/convert/gnuarch.py Mon Apr 19 18:57:16 2010 +0200 +++ b/hgext/convert/gnuarch.py Sat Apr 24 01:34:55 2010 -0300 @@ -31,7 +31,8 @@ super(gnuarch_source, self).__init__(ui, path, rev=rev) if not os.path.exists(os.path.join(path, '{arch}')): - raise NoRepo(_("%s does not look like a GNU Arch repo") % path) + raise NoRepo(_("%s does not look like a GNU Arch repository") + % path) # Could use checktool, but we want to check for baz or tla. self.execmd = None
--- a/hgext/convert/hg.py Mon Apr 19 18:57:16 2010 +0200 +++ b/hgext/convert/hg.py Sat Apr 24 01:34:55 2010 -0300 @@ -36,7 +36,8 @@ try: self.repo = hg.repository(self.ui, path) if not self.repo.local(): - raise NoRepo(_('%s is not a local Mercurial repo') % path) + raise NoRepo(_('%s is not a local Mercurial repository') + % path) except error.RepoError, err: ui.traceback() raise NoRepo(err.args[0]) @@ -45,11 +46,13 @@ ui.status(_('initializing destination %s repository\n') % path) self.repo = hg.repository(self.ui, path, create=True) if not self.repo.local(): - raise NoRepo(_('%s is not a local Mercurial repo') % path) + raise NoRepo(_('%s is not a local Mercurial repository') + % path) self.created.append(path) except error.RepoError: ui.traceback() - raise NoRepo("could not create hg repo %s as sink" % path) + raise NoRepo(_("could not create hg repository %s as sink") + % path) self.lock = None self.wlock = None self.filemapmode = False @@ -224,7 +227,7 @@ raise error.RepoError() except error.RepoError: ui.traceback() - raise NoRepo("%s is not a local Mercurial repo" % path) + raise NoRepo(_("%s is not a local Mercurial repository") % path) self.lastrev = None self.lastctx = None self._changescache = None
--- a/hgext/convert/monotone.py Mon Apr 19 18:57:16 2010 +0200 +++ b/hgext/convert/monotone.py Sat Apr 24 01:34:55 2010 -0300 @@ -20,7 +20,8 @@ self.ui = ui self.path = path - norepo = NoRepo (_("%s does not look like a monotone repo") % path) + norepo = NoRepo(_("%s does not look like a monotone repository") + % path) if not os.path.exists(os.path.join(path, '_MTN')): # Could be a monotone repository (SQLite db file) try:
--- a/hgext/convert/p4.py Mon Apr 19 18:57:16 2010 +0200 +++ b/hgext/convert/p4.py Sat Apr 24 01:34:55 2010 -0300 @@ -28,7 +28,7 @@ super(p4_source, self).__init__(ui, path, rev=rev) if "/" in path and not path.startswith('//'): - raise NoRepo('%s does not look like a P4 repo' % path) + raise NoRepo(_('%s does not look like a P4 repository') % path) checktool('p4', abort=False)
--- a/hgext/convert/subversion.py Mon Apr 19 18:57:16 2010 +0200 +++ b/hgext/convert/subversion.py Sat Apr 24 01:34:55 2010 -0300 @@ -207,7 +207,8 @@ (os.path.exists(url) and os.path.exists(os.path.join(url, '.svn'))) or issvnurl(ui, url)): - raise NoRepo("%s does not look like a Subversion repo" % url) + raise NoRepo(_("%s does not look like a Subversion repository") + % url) try: SubversionException @@ -252,7 +253,8 @@ self.uuid = svn.ra.get_uuid(self.ra) except SubversionException: ui.traceback() - raise NoRepo("%s does not look like a Subversion repo" % self.url) + raise NoRepo(_("%s does not look like a Subversion repository") + % self.url) if rev: try: @@ -984,7 +986,7 @@ if os.path.isdir(os.path.dirname(path)): if not os.path.exists(os.path.join(path, 'db', 'fs-type')): - ui.status(_('initializing svn repo %r\n') % + ui.status(_('initializing svn repository %r\n') % os.path.basename(path)) commandline(ui, 'svnadmin').run0('create', path) created = path @@ -993,7 +995,8 @@ path = '/' + path path = 'file://' + path - ui.status(_('initializing svn wc %r\n') % os.path.basename(wcpath)) + ui.status(_('initializing svn working copy %r\n') + % os.path.basename(wcpath)) self.run0('checkout', path, wcpath) self.wc = wcpath
--- a/hgext/mq.py Mon Apr 19 18:57:16 2010 +0200 +++ b/hgext/mq.py Sat Apr 24 01:34:55 2010 -0300 @@ -1430,7 +1430,7 @@ if summary: ph = patchheader(self.join(patchname), self.plainmode) msg = ph.message and ph.message[0] or '' - if self.ui.interactive(): + if not self.ui.plain(): width = util.termwidth() - len(pfx) - len(patchname) - 2 if width > 0: msg = util.ellipsis(msg, width) @@ -2742,7 +2742,7 @@ ('D', 'currentdate', None, _('add "Date: <current date>" to patch')), ('d', 'date', '', _('add "Date: <given date>" to patch')) ] + commands.walkopts + commands.commitopts, - _('hg qnew [-e] [-m TEXT] [-l FILE] [-f] PATCH [FILE]...')), + _('hg qnew [-e] [-m TEXT] [-l FILE] PATCH [FILE]...')), "qnext": (next, [] + seriesopts, _('hg qnext [-s]')), "qprev": (prev, [] + seriesopts, _('hg qprev [-s]')), "^qpop":
--- a/mercurial/cmdutil.py Mon Apr 19 18:57:16 2010 +0200 +++ b/mercurial/cmdutil.py Sat Apr 24 01:34:55 2010 -0300 @@ -129,9 +129,10 @@ if r: dst.setconfig('bundle', 'mainreporoot', r) - # copy auth section settings - for key, val in src.configitems('auth'): - dst.setconfig('auth', key, val) + # copy auth and http_proxy section settings + for sect in ('auth', 'http_proxy'): + for key, val in src.configitems(sect): + dst.setconfig(sect, key, val) return dst
--- a/mercurial/commands.py Mon Apr 19 18:57:16 2010 +0200 +++ b/mercurial/commands.py Sat Apr 24 01:34:55 2010 -0300 @@ -1158,7 +1158,9 @@ m = cmdutil.match(repo, pats, opts) it = patch.diff(repo, node1, node2, match=m, opts=diffopts) if stat: - width = ui.interactive() and util.termwidth() or 80 + width = 80 + if not ui.plain(): + width = util.termwidth() ui.write(patch.diffstat(util.iterlines(it), width=width, git=diffopts.git)) else:
--- a/mercurial/context.py Mon Apr 19 18:57:16 2010 +0200 +++ b/mercurial/context.py Sat Apr 24 01:34:55 2010 -0300 @@ -276,14 +276,14 @@ def __hash__(self): try: - return hash((self._path, self._fileid)) + return hash((self._path, self._filenode)) except AttributeError: return id(self) def __eq__(self, other): try: return (self._path == other._path - and self._fileid == other._fileid) + and self._filenode == other._filenode) except AttributeError: return False
--- a/mercurial/dispatch.py Mon Apr 19 18:57:16 2010 +0200 +++ b/mercurial/dispatch.py Sat Apr 24 01:34:55 2010 -0300 @@ -33,10 +33,13 @@ def catchterm(*args): raise error.SignalInterrupt - for name in 'SIGBREAK', 'SIGHUP', 'SIGTERM': - num = getattr(signal, name, None) - if num: - signal.signal(num, catchterm) + try: + for name in 'SIGBREAK', 'SIGHUP', 'SIGTERM': + num = getattr(signal, name, None) + if num: + signal.signal(num, catchterm) + except ValueError: + pass # happens if called in a thread try: try:
--- a/mercurial/filemerge.py Mon Apr 19 18:57:16 2010 +0200 +++ b/mercurial/filemerge.py Sat Apr 24 01:34:55 2010 -0300 @@ -135,6 +135,9 @@ if not fco.cmp(fcd.data()): # files identical? return None + if fca == fco: # backwards, use working dir parent as ancestor + fca = fcd.parents()[0] + ui = repo.ui fd = fcd.path() binary = isbin(fcd) or isbin(fco) or isbin(fca)
--- a/mercurial/hgweb/protocol.py Mon Apr 19 18:57:16 2010 +0200 +++ b/mercurial/hgweb/protocol.py Sat Apr 24 01:34:55 2010 -0300 @@ -179,6 +179,8 @@ raise ErrorResponse(HTTP_OK, inst) except (OSError, IOError), inst: error = getattr(inst, 'strerror', 'Unknown error') + if not isinstance(error, str): + error = 'Error: %s' % str(error) if inst.errno == errno.ENOENT: code = HTTP_NOT_FOUND else:
--- a/mercurial/subrepo.py Mon Apr 19 18:57:16 2010 +0200 +++ b/mercurial/subrepo.py Sat Apr 24 01:34:55 2010 -0300 @@ -273,7 +273,8 @@ self._ui = ctx._repo.ui def _svncommand(self, commands): - cmd = ['svn'] + commands + [self._path] + path = os.path.join(self._ctx._repo.origroot, self._path) + cmd = ['svn'] + commands + [path] cmd = [util.shellquote(arg) for arg in cmd] cmd = util.quotecommand(' '.join(cmd)) env = dict(os.environ)
--- a/mercurial/templates/template-vars.txt Mon Apr 19 18:57:16 2010 +0200 +++ b/mercurial/templates/template-vars.txt Sat Apr 24 01:34:55 2010 -0300 @@ -28,6 +28,10 @@ annotate an annotated file entries the entries relevant to the page +url base url of hgweb interface +staticurl base url for static resources + + Templates and commands: changelog(rev) - a page for browsing changesets naventry - a link for jumping to a changeset number
--- a/tests/test-convert-svn-sink.out Mon Apr 19 18:57:16 2010 +0200 +++ b/tests/test-convert-svn-sink.out Sat Apr 24 01:34:55 2010 -0300 @@ -4,8 +4,8 @@ % modify 1:e0e2b8a9156b assuming destination a-hg -initializing svn repo 'a-hg' -initializing svn wc 'a-hg-wc' +initializing svn repository 'a-hg' +initializing svn working copy 'a-hg-wc' scanning source... sorting... converting... @@ -57,7 +57,7 @@ % rename 2:eb5169441d43 assuming destination a-hg -initializing svn wc 'a-hg-wc' +initializing svn working copy 'a-hg-wc' scanning source... sorting... converting... @@ -95,7 +95,7 @@ % copy 3:60effef6ab48 assuming destination a-hg -initializing svn wc 'a-hg-wc' +initializing svn working copy 'a-hg-wc' scanning source... sorting... converting... @@ -134,7 +134,7 @@ % remove 4:87bbe3013fb6 assuming destination a-hg -initializing svn wc 'a-hg-wc' +initializing svn working copy 'a-hg-wc' scanning source... sorting... converting... @@ -168,7 +168,7 @@ % executable 5:ff42e473c340 assuming destination a-hg -initializing svn wc 'a-hg-wc' +initializing svn working copy 'a-hg-wc' scanning source... sorting... converting... @@ -196,8 +196,8 @@ % executable in new directory adding d1/a assuming destination a-hg -initializing svn repo 'a-hg' -initializing svn wc 'a-hg-wc' +initializing svn repository 'a-hg' +initializing svn working copy 'a-hg-wc' scanning source... sorting... converting... @@ -224,7 +224,7 @@ executable % copy to new directory assuming destination a-hg -initializing svn wc 'a-hg-wc' +initializing svn working copy 'a-hg-wc' scanning source... sorting... converting... @@ -267,8 +267,8 @@ 2 files updated, 0 files merged, 0 files removed, 1 files unresolved use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon assuming destination b-hg -initializing svn repo 'b-hg' -initializing svn wc 'b-hg-wc' +initializing svn repository 'b-hg' +initializing svn working copy 'b-hg-wc' scanning source... sorting... converting...
--- a/tests/test-convert.out Mon Apr 19 18:57:16 2010 +0200 +++ b/tests/test-convert.out Sat Apr 24 01:34:55 2010 -0300 @@ -259,13 +259,13 @@ assuming destination emptydir-hg initializing destination emptydir-hg repository emptydir does not look like a CVS checkout -emptydir does not look like a Git repo -emptydir does not look like a Subversion repo -emptydir is not a local Mercurial repo -emptydir does not look like a darcs repo -emptydir does not look like a monotone repo -emptydir does not look like a GNU Arch repo -emptydir does not look like a Bazaar repo +emptydir does not look like a Git repository +emptydir does not look like a Subversion repository +emptydir is not a local Mercurial repository +emptydir does not look like a darcs repository +emptydir does not look like a monotone repository +emptydir does not look like a GNU Arch repository +emptydir does not look like a Bazaar repository cannot find required "p4" tool abort: emptydir: missing or unsupported repository % convert with imaginary source type
--- a/tests/test-inotify Mon Apr 19 18:57:16 2010 +0200 +++ b/tests/test-inotify Sat Apr 24 01:34:55 2010 -0300 @@ -82,7 +82,7 @@ echo c >> a hg st -hg up 0 +HGMERGE=internal:local hg up 0 hg st HGMERGE=internal:local hg up
--- a/tests/test-inotify.out Mon Apr 19 18:57:16 2010 +0200 +++ b/tests/test-inotify.out Sat Apr 24 01:34:55 2010 -0300 @@ -44,7 +44,6 @@ A h R h/h M a -merging a 1 files updated, 1 files merged, 2 files removed, 0 files unresolved M a 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
--- a/tests/test-merge-local.out Mon Apr 19 18:57:16 2010 +0200 +++ b/tests/test-merge-local.out Sat Apr 24 01:34:55 2010 -0300 @@ -24,16 +24,20 @@ use 'hg resolve' to retry unresolved file merges merging zzz1_merge_ok merging zzz2_merge_bad -2 files updated, 2 files merged, 3 files removed, 0 files unresolved +warning: conflicts during merge. +merging zzz2_merge_bad failed! +2 files updated, 1 files merged, 3 files removed, 1 files unresolved +use 'hg resolve' to retry unresolved file merges --- a/zzz1_merge_ok +++ b/zzz1_merge_ok -+new first line +new last line --- a/zzz2_merge_bad +++ b/zzz2_merge_bad +another last line ++======= M zzz1_merge_ok M zzz2_merge_bad +? zzz2_merge_bad.orig # local merge with conflicts merging zzz1_merge_ok merging zzz2_merge_bad @@ -43,18 +47,23 @@ use 'hg resolve' to retry unresolved file merges merging zzz1_merge_ok merging zzz2_merge_bad -2 files updated, 2 files merged, 3 files removed, 0 files unresolved +warning: conflicts during merge. +merging zzz2_merge_bad failed! +2 files updated, 1 files merged, 3 files removed, 1 files unresolved +use 'hg resolve' to retry unresolved file merges --- a/zzz1_merge_ok +++ b/zzz1_merge_ok -+new first line +new last line --- a/zzz2_merge_bad +++ b/zzz2_merge_bad +another last line +======= ++======= +new last line ++======= M zzz1_merge_ok M zzz2_merge_bad +? zzz2_merge_bad.orig # local merge without conflicts merging zzz1_merge_ok 4 files updated, 1 files merged, 2 files removed, 0 files unresolved
--- a/tests/test-subrepo-svn Mon Apr 19 18:57:16 2010 +0200 +++ b/tests/test-subrepo-svn Sat Apr 24 01:34:55 2010 -0300 @@ -16,7 +16,8 @@ fi escapedwd=`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$escapedwd"` filterpath="s|$escapedwd|/root|" -filtersvn='s/ in transaction.*/ is out of date/;s/Out of date: /File /' +filteroutofdate='s/ in transaction.*/ is out of date/;s/Out of date: /File /' +filterexternal="s|Fetching external item into '.*/s/externals'|Fetching external item into 's/externals'|g" echo % create subversion repo @@ -62,7 +63,7 @@ echo % change file in svn and hg, commit echo a >> a echo alpha >> s/alpha -hg commit -m 'Message!' +hg commit -m 'Message!' | sed "$filterexternal" hg debugsub | sed "$filterpath" echo @@ -81,12 +82,12 @@ echo % this commit from hg will fail echo zzz >> s/alpha -hg ci -m 'amend alpha from hg' 2>&1 | sed "$filtersvn" +hg ci -m 'amend alpha from hg' 2>&1 | sed "$filteroutofdate" svn revert -q s/alpha echo % this commit fails because of meta changes svn propset svn:mime-type 'text/html' s/alpha -hg ci -m 'amend alpha from hg' 2>&1 | sed "$filtersvn" +hg ci -m 'amend alpha from hg' 2>&1 | sed "$filteroutofdate" svn revert -q s/alpha echo % this commit fails because of externals changes @@ -106,3 +107,6 @@ cd tc echo % debugsub in clone hg debugsub | sed "$filterpath" + +echo % verify subrepo is contained within the repo directory +python -c "import os.path; print os.path.exists('s')"
--- a/tests/test-subrepo-svn.out Mon Apr 19 18:57:16 2010 +0200 +++ b/tests/test-subrepo-svn.out Sat Apr 24 01:34:55 2010 -0300 @@ -72,11 +72,11 @@ % clone updating to branch default -A s/alpha - U s +A tc/s/alpha + U tc/s -Fetching external item into 's/externals' -A s/externals/other +Fetching external item into 'tc/s/externals' +A tc/s/externals/other Checked out external at revision 1. Checked out revision 3. @@ -85,3 +85,5 @@ path s source file:///root/svn-repo/src revision 3 +% verify subrepo is contained within the repo directory +True
--- a/tests/test-up-local-change.out Mon Apr 19 18:57:16 2010 +0200 +++ b/tests/test-up-local-change.out Sat Apr 24 01:34:55 2010 -0300 @@ -48,8 +48,7 @@ update: a 2/2 files (100.00%) picked tool 'true' for a (binary False symlink False) merging a -my a@802f095af299+ other a@33aaa84a386b ancestor a@33aaa84a386b - premerge successful +my a@802f095af299+ other a@33aaa84a386b ancestor a@802f095af299 0 files updated, 1 files merged, 1 files removed, 0 files unresolved changeset: 0:33aaa84a386b user: test