Mercurial > hg
changeset 16699:d947e1da1259
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 13 May 2012 12:52:24 +0200 |
parents | 26756d9d8143 (current diff) 40cdf8bc8d40 (diff) |
children | 28001e8a5149 |
files | hgext/mq.py mercurial/cmdutil.py mercurial/localrepo.py mercurial/parsers.c tests/test-hook.t |
diffstat | 8 files changed, 88 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Sun May 13 11:47:55 2012 +0200 +++ b/hgext/mq.py Sun May 13 12:52:24 2012 +0200 @@ -2137,12 +2137,11 @@ rev=opts.get('rev'), git=opts.get('git')) finally: q.savedirty() - - - if imported and opts.get('push') and not opts.get('rev'): - return q.push(repo, imported[-1]) finally: lock.release() + + if imported and opts.get('push') and not opts.get('rev'): + return q.push(repo, imported[-1]) return 0 def qinit(ui, repo, create):
--- a/i18n/pt_BR.po Sun May 13 11:47:55 2012 +0200 +++ b/i18n/pt_BR.po Sun May 13 12:52:24 2012 +0200 @@ -3110,13 +3110,13 @@ msgstr "autenticação http com factotum" msgid "" -"This extension allows the factotum facility on Plan 9 from Bell Labs platforms\n" -"to provide authentication information for HTTP access. Configuration entries\n" -"specified in the auth section as well as authentication information provided\n" -"in the repository URL are fully supported. If no prefix is specified, a value\n" -"of ``*`` will be assumed." -msgstr "" -"Esta extensão permite que o recurso factotum nas plataformas\n" +"This extension allows the factotum(4) facility on Plan 9 from Bell Labs\n" +"platforms to provide authentication information for HTTP access. Configuration\n" +"entries specified in the auth section as well as authentication information\n" +"provided in the repository URL are fully supported. If no prefix is specified,\n" +"a value of \"*\" will be assumed." +msgstr "" +"Esta extensão permite que o recurso factotum(4) nas plataformas\n" "Plan 9 from Bell Labs forneçam informação de autenticação para\n" "acesso HTTP. Entradas de configuração especificadas na seção\n" "auth bem como informações de autenticação fornecidas na URL do\n" @@ -12139,6 +12139,13 @@ " Veja :hg:`help revisions` e :hg:`help revsets` para mais\n" " informações sobre a especificação de revisões." +msgid "" +" See :hg:`help templates` for more about pre-packaged styles and\n" +" specifying custom templates." +msgstr "" +" Veja :hg:`help templates` para mais informações sobre estilos\n" +" pré-existentes e especificação de modelos personalizados." + msgid "revision to display" msgstr "revisão a ser exibida" @@ -14826,9 +14833,7 @@ " keys contain PATH-like strings, every part of which must reference\n" " a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will\n" " be read. Mercurial checks each of these locations in the specified\n" -" order until one or more configuration files are detected. If the\n" -" pywin32 extensions are not installed, Mercurial will only look for\n" -" site-wide configuration in ``C:\\Mercurial\\Mercurial.ini``." +" order until one or more configuration files are detected." msgstr "" " Arquivos de configuração por instalação e sistema, para o sistema\n" " no qual o Mercurial está instalado.\n" @@ -14839,10 +14844,7 @@ " diretório do qual arquivos ``*.rc`` serão lidos.\n" " O Mercurial verifica cada uma destas localizações na ordem\n" " especificada até que um ou mais arquivos de configuração sejam\n" -" encontrados.\n" -" Se as extensões pywin32 não estiverem instaladas, o Mercurial\n" -" procurará por arquivos de configuração de sistema apenas em\n" -" ``C:\\Mercurial\\Mercurial.ini``." +" encontrados." msgid "" "Syntax\n" @@ -17599,6 +17601,27 @@ " Habilita suporte a cache na interface hgweb. O padrão é True." msgid "" +"``collapse``\n" +" With ``descend`` enabled, repositories in subdirectories are shown at\n" +" a single level alongside repositories in the current path. With\n" +" ``collapse`` also enabled, repositories residing at a deeper level than\n" +" the current path are grouped behind navigable directory entries that\n" +" lead to the locations of these repositories. In effect, this setting\n" +" collapses each collection of repositories found within a subdirectory\n" +" into a single entry for that subdirectory. Default is False." +msgstr "" +"``collapse``\n" +" Com ``descend`` habilitado, repositórios em subdiretórios são\n" +" exibidos em um único nível junto com repositórios no caminho\n" +" atual. Com ``collapse`` também habilitado, repositórios que\n" +" residam em um nível mais profundo que o caminho atual são\n" +" agrupados atrás de entradas de diretório navegáveis que levam\n" +" às localizações desses repositórios. Ou seja, esta\n" +" configuração colapsa cada coleção de repositórios encontrada\n" +" em um subdiretório em uma única entrada para esse\n" +" subdiretório. O padrão é False." + +msgid "" "``contact``\n" " Name or email address of the person in charge of the repository.\n" " Defaults to ui.username or ``$EMAIL`` or \"unknown\" if unset or empty." @@ -22727,6 +22750,12 @@ msgstr "arquivo spec de sub-repositório %s não encontrado" #, python-format +msgid "invalid subrepository revision specifier in .hgsubstate line %d" +msgstr "" +"especificador de revisão de sub-repositório inválido na linha %d do arquivo " +".hgsubstate" + +#, python-format msgid "bad subrepository pattern in %s: %s" msgstr "padrão ruim de sub-repositório em %s: %s"
--- a/mercurial/cmdutil.py Sun May 13 11:47:55 2012 +0200 +++ b/mercurial/cmdutil.py Sun May 13 12:52:24 2012 +0200 @@ -910,7 +910,10 @@ if not (tmpl or style): tmpl = ui.config('ui', 'logtemplate') if tmpl: - tmpl = templater.parsestring(tmpl) + try: + tmpl = templater.parsestring(tmpl) + except SyntaxError: + tmpl = templater.parsestring(tmpl, quoted=False) else: style = util.expandpath(ui.config('ui', 'style', ''))
--- a/mercurial/localrepo.py Sun May 13 11:47:55 2012 +0200 +++ b/mercurial/localrepo.py Sun May 13 12:52:24 2012 +0200 @@ -390,7 +390,7 @@ # ignore tags to unknown nodes self.changelog.rev(v) t[k] = v - except error.LookupError: + except (error.LookupError, ValueError): pass return t @@ -906,6 +906,8 @@ l = self._lockref and self._lockref() if l: l.postrelease.append(callback) + else: + callback() def lock(self, wait=True): '''Lock the repository store (.hg/store) and return a weak reference @@ -1195,7 +1197,9 @@ finally: wlock.release() - self.hook("commit", node=hex(ret), parent1=hookp1, parent2=hookp2) + def commithook(node=hex(ret), parent1=hookp1, parent2=hookp2): + self.hook("commit", node=node, parent1=parent1, parent2=parent2) + self._afterlock(commithook) return ret def commitctx(self, ctx, error=False):
--- a/mercurial/parsers.c Sun May 13 11:47:55 2012 +0200 +++ b/mercurial/parsers.c Sun May 13 12:52:24 2012 +0200 @@ -785,7 +785,7 @@ if (PyInt_Check(value)) return index_get(self, PyInt_AS_LONG(value)); - if (PyString_AsStringAndSize(value, &node, &nodelen) == -1) + if (node_check(value, &node, &nodelen) == -1) return NULL; rev = index_find_node(self, node, nodelen); if (rev >= -1) @@ -868,12 +868,15 @@ static PyObject *index_m_get(indexObject *self, PyObject *args) { + Py_ssize_t nodelen; + PyObject *val; char *node; - int nodelen, rev; + int rev; - if (!PyArg_ParseTuple(args, "s#", &node, &nodelen)) + if (!PyArg_ParseTuple(args, "O", &val)) return NULL; - + if (node_check(val, &node, &nodelen) == -1) + return NULL; rev = index_find_node(self, node, nodelen); if (rev == -3) return NULL; @@ -892,11 +895,8 @@ return rev >= -1 && rev < index_length(self); } - if (!PyString_Check(value)) - return 0; - - node = PyString_AS_STRING(value); - nodelen = PyString_GET_SIZE(value); + if (node_check(value, &node, &nodelen) == -1) + return -1; switch (index_find_node(self, node, nodelen)) { case -3:
--- a/tests/test-command-template.t Sun May 13 11:47:55 2012 +0200 +++ b/tests/test-command-template.t Sun May 13 12:52:24 2012 +0200 @@ -45,6 +45,15 @@ $ hg mv second fourth $ hg commit -m third -d "2020-01-01 10:01" +Quoting for ui.logtemplate + + $ hg tip --config "ui.logtemplate={rev}\n" + 8 + $ hg tip --config "ui.logtemplate='{rev}\n'" + 8 + $ hg tip --config 'ui.logtemplate="{rev}\n"' + 8 + Make sure user/global hgrc does not affect tests $ echo '[ui]' > .hg/hgrc
--- a/tests/test-hook.t Sun May 13 11:47:55 2012 +0200 +++ b/tests/test-hook.t Sun May 13 12:52:24 2012 +0200 @@ -101,9 +101,9 @@ precommit hook: HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 pretxncommit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PENDING=$TESTTMP/a 4:539e4b31b6dc + tag hook: HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a commit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 commit.b hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 - tag hook: HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a $ hg tag -l la pretag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la tag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la
--- a/tests/test-tag.t Sun May 13 11:47:55 2012 +0200 +++ b/tests/test-tag.t Sun May 13 12:52:24 2012 +0200 @@ -300,3 +300,16 @@ t3 1:c3adabd1a5f4 local $ cd .. + +commit hook on tag used to be run without write lock - issue3344 + + $ hg init repo-tag + $ hg init repo-tag-target + $ hg -R repo-tag --config hooks.commit="hg push \"`pwd`/repo-tag-target\"" tag tag + pushing to $TESTTMP/repo-tag-target + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files +