diff --git a/.hgsigs b/.hgsigs --- a/.hgsigs +++ b/.hgsigs @@ -131,3 +131,4 @@ a9764ab80e11bcf6a37255db7dd079011f767c6c 26a5d605b8683a292bb89aea11f37a81b06ac016 0 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 diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -144,3 +144,4 @@ a9764ab80e11bcf6a37255db7dd079011f767c6c 26a5d605b8683a292bb89aea11f37a81b06ac016 3.8.4 519bb4f9d3a47a6e83c2b414d58811ed38f503c2 3.9-rc 299546f84e68dbb9bd026f0f3a974ce4bdb93686 3.9 +ccd436f7db6d5d7b9af89715179b911d031d44f1 3.9.1 diff --git a/i18n/pt_BR.po b/i18n/pt_BR.po --- a/i18n/pt_BR.po +++ b/i18n/pt_BR.po @@ -4117,18 +4117,6 @@ msgstr "" " diretório de trabalho serão comparados com seu pai." #, python-format -msgid "use %(path)s to diff repository (or selected files)" -msgstr "usa %(path)s para exibir diffs do repositório ou arquivos" - -#, python-format -msgid "" -" Show differences between revisions for the specified files, using\n" -" the %(path)s program." -msgstr "" -" Mostra diferenças entre revisões para os arquivos especificados,\n" -" usando o programa %(path)s." - -#, python-format msgid "hg %s [OPTION]... [FILE]..." msgstr "hg %s [OPÇÃO]... [ARQUIVO]..." @@ -5616,6 +5604,14 @@ msgid "" " bookmarks and the working copy; each line will then include the bookmark\n" " name, or '.' for the working copy, as well." msgstr "" +" O journal é usado para ver as revisões anteriores para as quais\n" +" marcadores e a cópia de trabalho apontaram.\n" +" Por padrão, mostra as localizações anteriores da cópia de trabalho.\n" +" Ao receber um nome de marcador, mostra todas as posições anteriores\n" +" desse marcador.\n" +" Use a opção --all para mostrar localizações anteriores para todos\n" +" os marcadores e para a cópia de trabalho; cada linha incluirá o\n" +" nome do marcador, ou '.' para a cópia de trabalho." msgid "" " If `name` starts with `re:`, the remainder of the name is treated as\n" @@ -6425,8 +6421,8 @@ msgid "unknown operating system: %s\n" msgstr "sistema operacional desconhecido: %s\n" #, python-format -msgid "unknown %s usercache location\n" -msgstr "localização de cache de usuário %s desconhecida\n" +msgid "unknown %s usercache location" +msgstr "localização de cache de usuário %s desconhecida" #, python-format msgid "found %s in store\n" @@ -14126,45 +14122,45 @@ msgstr "" "são:" msgid "" -" rev revision number\n" -" chainid delta chain identifier (numbered by unique base)\n" -" chainlen delta chain length to this revision\n" -" prevrev previous revision in delta chain\n" -" deltatype role of delta / how it was computed\n" -" compsize compressed size of revision\n" -" uncompsize uncompressed size of revision\n" -" chainsize total size of compressed revisions in chain\n" -" chainratio total chain size divided by uncompressed revision size\n" +" :``rev``: revision number\n" +" :``chainid``: delta chain identifier (numbered by unique base)\n" +" :``chainlen``: delta chain length to this revision\n" +" :``prevrev``: previous revision in delta chain\n" +" :``deltatype``: role of delta / how it was computed\n" +" :``compsize``: compressed size of revision\n" +" :``uncompsize``: uncompressed size of revision\n" +" :``chainsize``: total size of compressed revisions in chain\n" +" :``chainratio``: total chain size divided by uncompressed revision size\n" " (new delta chains typically start at ratio 2.00)\n" -" lindist linear distance from base revision in delta chain to end\n" +" :``lindist``: linear distance from base revision in delta chain to end\n" " of this revision\n" -" extradist total size of revisions not part of this delta chain from\n" +" :``extradist``: total size of revisions not part of this delta chain from\n" " base of delta chain to end of this revision; a measurement\n" " of how much extra data we need to read/seek across to read\n" " the delta chain for this revision\n" -" extraratio extradist divided by chainsize; another representation of\n" +" :``extraratio``: extradist divided by chainsize; another representation of\n" " how much unrelated data is needed to load this delta chain\n" " " msgstr "" -" rev número da revisão\n" -" chainid identificador de cadeia de deltas (numerado por base única)\n" -" chainlen comprimento da cadeia de deltas para esta revisão\n" -" prevrev revisão anterior na cadeia de deltas\n" -" deltatype tipo de delta / como foi computado\n" -" compsize tamanho comprimido da revisão\n" -" uncompsize tamanho não comprimido da revisão\n" -" chainsize tamanho total das revisões comprimidas na cadeia\n" -" chainratio tamanho total da cadeia dividido pelo tamanho não\n" +" :``rev``: número da revisão\n" +" :``chainid``: identificador de cadeia de deltas (numerado por base única)\n" +" :``chainlen``: comprimento da cadeia de deltas para esta revisão\n" +" :``prevrev``: revisão anterior na cadeia de deltas\n" +" :``deltatype``: tipo de delta / como foi computado\n" +" :``compsize``: tamanho comprimido da revisão\n" +" :``uncompsize``: tamanho não comprimido da revisão\n" +" :``chainsize``: tamanho total das revisões comprimidas na cadeia\n" +" :``chainratio``: tamanho total da cadeia dividido pelo tamanho não\n" " comprimido da revisão\n" " (novas cadeias de deltas tipicamente começam em 2.00)\n" -" lindist distância linear da revisão base na cadeia de deltas\n" +" :``lindist``: distância linear da revisão base na cadeia de deltas\n" " até o final desta revisão\n" -" extradist tamanho total de revisões que não fazem parte desta\n" +" :``extradist``: tamanho total de revisões que não fazem parte desta\n" " cadeia de deltas da base da cadeia de deltas até o\n" " fim desta revisão; uma medida de quantos dados\n" " extras em leitura ou posicionamento são necessários\n" " para ler a cadeia de deltas para esta revisão\n" -" extraratio extradist dividido por chainsize; outra representação\n" +" :``extraratio``: extradist dividido por chainsize; outra representação\n" " de quantos dados não relacionados são necessários para\n" " carregar esta cadeia de deltas\n" " " @@ -15621,7 +15617,7 @@ msgid "" " resulting changeset has a different ID than the one recorded in\n" " the patch. This will guard against various ways that portable\n" " patch formats and mail systems might fail to transfer Mercurial\n" -" data or metadata. See ':hg: bundle' for lossless transmission." +" data or metadata. See :hg:`bundle` for lossless transmission." msgstr "" " Se --exact for especificado, import irá posicionar o diretório de\n" " trabalho no pai de cada patch antes de aplicá-lo, e irá abortar\n" @@ -15630,7 +15626,7 @@ msgstr "" " Isso protegerá contra várias falhas nos formatos portáveis\n" " de patch e sistemas de email ao transferir dados ou metadados\n" " do Mercurial.\n" -" Veja ':hg: bundle' para uma forma de transmissão sem perdas." +" Veja :hg:`bundle` para uma forma de transmissão sem perdas." msgid "" " Use --partial to ensure a changeset will be created from the patch\n" @@ -21922,7 +21918,7 @@ msgstr "" " Esta opção não tem efeito se a opção ``fingerprints`` estiver\n" " definida para o servidor." -msgid " The format of the file is as follows:" +msgid " The format of the file is as follows::" msgstr " O formato do arquivo é como segue::" msgid "" @@ -23119,6 +23115,20 @@ msgstr "" "mais detalhes." msgid "" +"``templates``\n" +"-------------" +msgstr "" +"``templates``\n" +"-------------" + +msgid "" +"Use the ``[templates]`` section to define template strings.\n" +"See :hg:`help templates` for details." +msgstr "" +"Use a seção ``[templates]`` para definir strings de modelos.\n" +"Veja :hg:`help templates` para detalhes." + +msgid "" "``trusted``\n" "-----------" msgstr "" @@ -23401,12 +23411,12 @@ msgstr "" msgid "" "``interface.chunkselector``\n" -" Select the interface for change recording (e.g. :hg:`commit` -i).\n" +" Select the interface for change recording (e.g. :hg:`commit -i`).\n" " Possible values are 'text' and 'curses'.\n" " This config overrides the interface specified by ui.interface." msgstr "" "``interface.chunkselector``\n" -" Seleciona a interface para gravar mudanças (por exemplo em :hg:`commit` -i).\n" +" Seleciona a interface para gravar mudanças (por exemplo em :hg:`commit -i`).\n" " Os valores possíveis são 'text' e 'curses'.\n" " Esta configuração se sobrepõe à interface especificada à configuração\n" " ui.interface." @@ -27927,14 +27937,14 @@ msgid "" ":hg:`serve` can also start a \"command server.\" Clients can connect\n" "to this server and issue Mercurial commands over a special protocol.\n" "For more details on the command server, including links to client\n" -"libraries, see https://mercurial.selenic.com/wiki/CommandServer." +"libraries, see https://www.mercurial-scm.org/wiki/CommandServer." msgstr "" ":hg:`serve` também pode iniciar um \"servidor de comandos.\"\n" "Clientes podem conectar a esse servidor e enviar comandos\n" "do Mercurial através de um protocolo especial.\n" "Para mais detalhes sobre o servidor de comandos, incluindo\n" "referências para bibliotecas de clientes, veja\n" -"https://mercurial.selenic.com/wiki/CommandServer." +"https://www.mercurial-scm.org/wiki/CommandServer." msgid "" ":hg:`serve` based interfaces (the hgweb and command servers) have the\n" @@ -28804,6 +28814,27 @@ msgstr "" "define dois apelidos de símbolos, ``r`` e ``rn``, e um apelido de função\n" "``leftpad()``." +msgid "" +"It's also possible to specify complete template strings, using the\n" +"``templates`` section. The syntax used is the general template string syntax." +msgstr "" +"Também é possível especificar strings de modelo completas, usando\n" +"a seção ``templates``. A sintaxe usada é a mesma sintaxe geral de\n" +"strings de modelo." + +msgid "" +" [templates]\n" +" nodedate = \"{node|short}: {date(date, \"%Y-%m-%d\")}\\n\"" +msgstr "" +" [templates]\n" +" nodedate = \"{node|short}: {date(date, \"%Y-%m-%d\")}\\n\"" + +msgid "defines a template, ``nodedate``, which can be called like::" +msgstr "define um modelo, ``nodedate``, que pode ser chamado assim::" + +msgid " $ hg log -r . -Tnodedate" +msgstr " $ hg log -r . -Tnodedate" + msgid "Some sample command line templates:" msgstr "Alguns exemplos de modelos de linha de comando:" @@ -29191,10 +29222,6 @@ msgid "checking subrepo links\n" msgstr "checando links para sub-repositórios\n" #, python-format -msgid "%s: %s\n" -msgstr "%s: %s\n" - -#, python-format msgid ".hgsubstate is corrupt in revision %s\n" msgstr ".hgsubstate está corrompido na revisão %s\n" @@ -31668,9 +31695,11 @@ msgstr "especificação do sort deve ser uma string" msgid "unknown sort key %r" msgstr "especificação de ordenação desconhecida: %r" +#. i18n: "topo" is a keyword msgid "topo sort order cannot be combined with other sort keys" msgstr "a ordem topo não pode ser combinada com outras formas de ordenação" +#. i18n: "topo" and "topo.firstbranch" are keywords msgid "topo.firstbranch can only be used when using the topo sort key" msgstr "topo.firstbranch só pode ser usada com a chave de ordenação topo" @@ -32032,14 +32061,56 @@ msgstr "" "carregado; veja https://mercurial-scm.org/wiki/SecureConnections para como " "configurar o Mercurial para evitar este erro)\n" -msgid "" -"(could not negotiate a common protocol; see https://mercurial-" -"scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this " -"error)\n" -msgstr "" -"(não foi possível negociar um protocolo em comum; veja https://mercurial-" -"scm.org/wiki/SecureConnections para como configurar o Mercurial para evitar " -"este erro)\n" +#, python-format +msgid "" +"(could not communicate with %s using security protocols %s; if you are using" +" a modern Mercurial version, consider contacting the operator of this " +"server; see https://mercurial-scm.org/wiki/SecureConnections for more " +"info)\n" +msgstr "" +"(não foi possível comunicar com %s usando os protocolos de segurança %s; se " +"você estiver usando uma versão moderna do Mercurial, considere contactar o " +"operador deste servidor; veja https://mercurial-" +"scm.org/wiki/SecureConnections para mais informações)\n" + +#, python-format +msgid "" +"(could not communicate with %s using TLS 1.0; the likely cause of this is " +"the server no longer supports TLS 1.0 because it has known security " +"vulnerabilities; see https://mercurial-scm.org/wiki/SecureConnections for " +"more info)\n" +msgstr "" +"(não foi possível comunicar com %s usando TLS 1.0; a causa mais provável " +"deste problema é o servidor não suportar mais TLS 1.0 por essa versão " +"apresentar vulnerabilidades de segurança conhecidas; veja https://mercurial-" +"scm.org/wiki/SecureConnections para mais informações)\n" + +#, python-format +msgid "" +"(could not negotiate a common security protocol (%s+) with %s; the likely " +"cause is Mercurial is configured to be more secure than the server can " +"support)\n" +msgstr "" +"(não foi possível negociar um protocolo de segurança comum (%s+) com %s; a " +"causa mais provável deste problema é o Mercurial estar configurado para ser " +"mais seguro do que o servidor suporta)\n" + +#, python-format +msgid "" +"(consider contacting the operator of this server and ask them to support " +"modern TLS protocol versions; or, set hostsecurity.%s:minimumprotocol=tls1.0" +" to allow use of legacy, less secure protocols when communicating with this " +"server)\n" +msgstr "" +"(considere entrar em contato com o operador deste servidor e solicitar que " +"suporte versões modernas de protocolo TLS; ou defina " +"hostsecurity.%s:minimumprotocol=tls1.0 para permitir o uso de protocolos " +"legados menos seguros ao comunicar com este servidor)\n" + +msgid "(see https://mercurial-scm.org/wiki/SecureConnections for more info)\n" +msgstr "" +"(veja https://mercurial-scm.org/wiki/SecureConnections para mais " +"informações)\n" msgid "ssl connection failed" msgstr "a conexão ssl falhou" @@ -33765,6 +33836,28 @@ msgstr "procurar mudanças remotas" msgid "number of cpus must be an integer" msgstr "o número de cpus deve ser um inteiro" +#~ msgid "use %(path)s to diff repository (or selected files)" +#~ msgstr "usa %(path)s para exibir diffs do repositório ou arquivos" + +#~ msgid "" +#~ " Show differences between revisions for the specified files, using\n" +#~ " the %(path)s program." +#~ msgstr "" +#~ " Mostra diferenças entre revisões para os arquivos especificados,\n" +#~ " usando o programa %(path)s." + +#~ msgid "%s: %s\n" +#~ msgstr "%s: %s\n" + +#~ msgid "" +#~ "(could not negotiate a common protocol; see https://mercurial-" +#~ "scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this " +#~ "error)\n" +#~ msgstr "" +#~ "(não foi possível negociar um protocolo em comum; veja https://mercurial-" +#~ "scm.org/wiki/SecureConnections para como configurar o Mercurial para evitar " +#~ "este erro)\n" + #~ msgid "hooks for integrating with the CIA.vc notification service" #~ msgstr "ganchos para integração com o serviço de notificação CIA.vc" diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -353,7 +353,7 @@ def processbundle(repo, unbundler, trans try: for nbpart, part in iterparts: _processpart(op, part) - except BaseException as exc: + except Exception as exc: for nbpart, part in iterparts: # consume the bundle content part.seek(0, 2) @@ -382,6 +382,7 @@ def _processpart(op, part): The part is guaranteed to have been fully consumed when the function exits (even if an exception is raised).""" status = 'unknown' # used by debug output + hardabort = False try: try: handler = parthandlermapping.get(part.type) @@ -436,9 +437,15 @@ def _processpart(op, part): outpart = op.reply.newpart('output', data=output, mandatory=False) outpart.addparam('in-reply-to', str(part.id), mandatory=False) + # If exiting or interrupted, do not attempt to seek the stream in the + # finally block below. This makes abort faster. + except (SystemExit, KeyboardInterrupt): + hardabort = True + raise finally: # consume the part content to not corrupt the stream. - part.seek(0, 2) + if not hardabort: + part.seek(0, 2) def decodecaps(blob): @@ -1467,7 +1474,7 @@ def handlecheckheads(op, inpart): def handleoutput(op, inpart): """forward output captured on the server to the client""" for line in inpart.read().splitlines(): - op.ui.status(('remote: %s\n' % line)) + op.ui.status(_('remote: %s\n') % line) @parthandler('replycaps') def handlereplycaps(op, inpart): diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -990,15 +990,29 @@ class basefilectx(object): # bit recursion-hostile. Instead we do an iterative # depth-first search. + # 1st DFS pre-calculates pcache and needed visit = [base] - hist = {} pcache = {} needed = {base: 1} while visit: + f = visit.pop() + if f in pcache: + continue + pl = parents(f) + pcache[f] = pl + for p in pl: + needed[p] = needed.get(p, 0) + 1 + if p not in pcache: + visit.append(p) + + # 2nd DFS does the actual annotate + visit[:] = [base] + hist = {} + while visit: f = visit[-1] - pcached = f in pcache - if not pcached: - pcache[f] = parents(f) + if f in hist: + visit.pop() + continue ready = True pl = pcache[f] @@ -1006,18 +1020,11 @@ class basefilectx(object): if p not in hist: ready = False visit.append(p) - if not pcached: - needed[p] = needed.get(p, 0) + 1 if ready: visit.pop() - reusable = f in hist - if reusable: - curr = hist[f] - else: - curr = decorate(f.data(), f) + curr = decorate(f.data(), f) for p in pl: - if not reusable: - curr = pair(hist[p], curr) + curr = pair(hist[p], curr) if needed[p] == 1: del hist[p] del needed[p] @@ -1025,7 +1032,7 @@ class basefilectx(object): needed[p] -= 1 hist[f] = curr - pcache[f] = [] + del pcache[f] return zip(hist[base][0], hist[base][1].splitlines(True)) diff --git a/mercurial/crecord.py b/mercurial/crecord.py --- a/mercurial/crecord.py +++ b/mercurial/crecord.py @@ -387,7 +387,7 @@ class uihunk(patchnode): contextlen = (len(self.before) + len(self.after) + removedconvertedtocontext) - if self.after and self.after[-1] == '\\ no newline at end of file\n': + if self.after and self.after[-1] == '\\ No newline at end of file\n': contextlen -= 1 fromlen = contextlen + self.removed tolen = contextlen + self.added diff --git a/tests/test-annotate.t b/tests/test-annotate.t --- a/tests/test-annotate.t +++ b/tests/test-annotate.t @@ -606,3 +606,35 @@ Even when the starting revision is the l 3: B $ cd .. + +Issue5360: Deleted chunk in p1 of a merge changeset + + $ hg init repo-5360 + $ cd repo-5360 + $ echo 1 > a + $ hg commit -A a -m 1 + $ echo 2 >> a + $ hg commit -m 2 + $ echo a > a + $ hg commit -m a + $ hg update '.^' -q + $ echo 3 >> a + $ hg commit -m 3 -q + $ hg merge 2 -q + $ cat > a << EOF + > b + > 1 + > 2 + > 3 + > a + > EOF + $ hg resolve --mark -q + $ hg commit -m m + $ hg annotate a + 4: b + 0: 1 + 1: 2 + 3: 3 + 2: a + + $ cd .. diff --git a/tests/test-commit-interactive-curses.t b/tests/test-commit-interactive-curses.t --- a/tests/test-commit-interactive-curses.t +++ b/tests/test-commit-interactive-curses.t @@ -9,6 +9,21 @@ Set up a repo > crecordtest = testModeCommands > EOF +Record with noeol at eof (issue5268) + $ hg init noeol + $ cd noeol + $ printf '0' > a + $ printf '0\n' > b + $ hg ci -Aqm initial + $ printf '1\n0' > a + $ printf '1\n0\n' > b + $ cat <testModeCommands + > c + > EOF + $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -m "add hunks" -d "0 0" + $ cd .. + +Normal repo $ hg init a $ cd a