Commit Graph

34380 Commits

Author SHA1 Message Date
Jun Wu
7f6381a6d9 selectors2: do not use platform.system()
`platform.system()` may have a side effect spawning a shell executing
`uname -p`, which may print a warning when the current directory is removed:

  shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

This patch changes selectors2 to test the `sys.platform` string, which is a
much safer way to detect Jython.

Jython's `sys.platform` looks like this:

  Jython 2.7.1 (default:0df7adb1b397, Jun 30 2017, 19:02:43)
  [OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.8.0_144
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.platform
  'java1.8.0_144 ( ==linux2 for targets )'

Differential Revision: https://phab.mercurial-scm.org/D1018
2017-10-11 17:27:21 -07:00
Jun Wu
c0f8669061 dispatch: when --pager=no is passed, also disable pager on req.repo.ui
With a future chg change, `req.repo` could be set and currently it is
unaffected by `--pager=on`. This patch makes it so.

This could make one of the test cases in `test-pager.t` pass with future chg
changes.

Differential Revision: https://phab.mercurial-scm.org/D990
2017-10-09 12:42:28 -07:00
Durham Goode
c48caf9e03 bundle2: immediate exit for ctrl+c (issue5692)
21c2df59a regressed bundle2 by catching all exceptions and trying to handle
them. The old behavior was to allow KeyboardInterrupts to throw and not have
graceful cleanup, which allowed it to exit immediately. Let's go back to that
behavior.

Differential Revision: https://phab.mercurial-scm.org/D960
2017-10-11 10:36:59 -07:00
Augie Fackler
fb50ec8285 exewrapper: format with clang-format
A few *s move around, some spaces around parens, a couple of
braces. Nothing remarkable.

Differential Revision: https://phab.mercurial-scm.org/D1032
2017-10-04 11:04:18 -04:00
Augie Fackler
bad97ff7fe util: add clang-format control comment around struct and format macro
clang-format is not a fan of PyObject_HEAD.

Differential Revision: https://phab.mercurial-scm.org/D1031
2017-10-04 11:02:44 -04:00
Augie Fackler
f4d56c2a16 mpatch: reflow two oddly formatted else blocks with clang-format
Differential Revision: https://phab.mercurial-scm.org/D1029
2017-10-04 10:57:23 -04:00
Augie Fackler
0455ba8dfd mpatch: re-wrap wide line with clang-format
Differential Revision: https://phab.mercurial-scm.org/D1027
2017-10-04 10:55:51 -04:00
Augie Fackler
186610a84b bdiff: remove trailing newlines
Differential Revision: https://phab.mercurial-scm.org/D1009
2017-10-04 10:51:39 -04:00
Augie Fackler
22f768930e bdiff: rewrap function prototypes per clang-format
Differential Revision: https://phab.mercurial-scm.org/D1008
2017-10-04 10:51:25 -04:00
Augie Fackler
137e46c3ae bdiff: re-wrap lines per clang-format
A few too-wide lines corrected, and some places where clang-format
prefers to wrap after the binary operator instead of before. I don't
feel strongly, so I'm leaving the auto-format result as "after the
binary operator".

Differential Revision: https://phab.mercurial-scm.org/D1007
2017-10-04 10:50:54 -04:00
Augie Fackler
49e9563e2f bdiff: remove extra space after * per clang-format
Differential Revision: https://phab.mercurial-scm.org/D1006
2017-10-04 10:49:34 -04:00
Augie Fackler
2163c58549 bdiff: fix misplaced comma in macro definition with clang-format
Differential Revision: https://phab.mercurial-scm.org/D1005
2017-10-04 10:48:46 -04:00
Augie Fackler
663aee0a1f bdiff: format header file with clang-format
Differential Revision: https://phab.mercurial-scm.org/D1004
2017-10-04 10:47:51 -04:00
Augie Fackler
834627e694 bdiff: sort includes using clang-format
Differential Revision: https://phab.mercurial-scm.org/D1003
2017-10-04 10:47:19 -04:00
muxator
178f61557c build: "make deb" failed when the base path contained spaces
With these changes, all the commands triggered by "make deb" use proper quoting
and succeed even when invoked from a directory containing spaces.
2017-10-11 01:47:00 +02:00
muxator
292c1fdcc4 build: chg build was failing when the base directory contained spaces 2017-10-11 02:06:12 +02:00
muxator
62eddfee7e build: initial version detection by make deb/rpm was missing quoting 2017-10-11 01:37:43 +02:00
muxator
0c29e9b194 build: make install in "/doc" failed if the destination dir contained spaces
This and the following commits try to add the necessary quoting in the build
scripts to make the process more robust.

The target for now is rendering "make deb" successful even when the base
directory contains spaces (eg. "/opt/mercu rial").
The build process should succeed without scattering files in spurious
directories (eg.: "/opt/mercu/usr/bin/hg").
2017-10-11 01:19:48 +02:00
Paul Morelle
eb2ac24b51 strip: take branch into account when selecting update target (issue5540)
Test contributed by Matt Harbison

Keep the same behavior in most cases (i.e. first parent of the first root of
stripped changsets), but if the branch differs from wdir's, try to find another
parent of stripped commits that is on the same branch.
2017-10-05 16:13:05 +02:00
Denis Laxalde
2964e634ed scmutil: factor out building of transaction summary callback
In registersummarycallback(), we extra generic bits of the existing
"reportsummary" function into a decorator which will be used in forthcoming
changesets to add new summary callbacks.
2017-10-04 18:49:09 +02:00
Denis Laxalde
df0f57f316 scmutil: factor out transaction name lookup in registersummarycallback()
Add an inner txmatch function in registersummarycallback() factoring out the
logic to determine if the transaction matches a particular sources set. We'll
reuse this function to add some new report logic in the new changeset.
2017-10-01 09:52:44 +02:00
Boris Feld
9ab1fae2b8 configitems: register the annotate diff options 2017-10-11 05:23:45 +02:00
Boris Feld
1d9fc2f4c6 configitems: register the 'convert.cvsps.logencoding' config 2017-10-11 05:42:56 +02:00
Boris Feld
cfd170bf5c configitems: register the 'ui.interface.chunkselector' config 2017-10-11 05:36:10 +02:00
Boris Feld
b09f40c232 configitems: register the 'experimental.archivemetatemplate' config 2017-10-11 05:18:20 +02:00
Boris Feld
103976d6a9 configitems: register the 'rebase.singletransaction' config 2017-10-11 04:57:54 +02:00
Boris Feld
bea8fba132 configitems: register the 'server.bundle*' family of config
All these config use the same function specifying a default value. We need to
register them all at the same time.
2017-10-11 17:51:40 +02:00
Boris Feld
baa18d572d configitems: register the 'web.logourl' config 2017-10-11 04:16:17 +02:00
Boris Feld
8209e13aaa configitems: register the 'web.logoimg' config 2017-10-11 04:16:05 +02:00
Boris Feld
783ea5f54c configitems: register the 'web.labels' config 2017-10-11 04:15:48 +02:00
Boris Feld
da25127b96 configitems: register the 'web.hidden' config 2017-10-11 04:15:37 +02:00
Boris Feld
34bf70b86f configitems: register the 'web.guessmime' config 2017-10-11 04:15:24 +02:00
Boris Feld
c8a7ed3681 configitems: register the 'web.deny_push' config 2017-10-11 04:15:08 +02:00
Boris Feld
4be8c3b528 configitems: register the 'web.contact' config 2017-10-11 04:14:44 +02:00
Boris Feld
c71a63f860 configitems: register the 'web.cache' config 2017-10-11 04:14:33 +02:00
Boris Feld
4d84c5f2d5 configitems: register the 'web.allowzip' config 2017-10-11 04:14:14 +02:00
Boris Feld
088bf5e857 configitems: register the 'web.allow_push' config 2017-10-11 04:14:01 +02:00
Boris Feld
e45e1468d5 configitems: register the 'web.allowpull' config 2017-10-11 04:12:50 +02:00
Boris Feld
dc941fd5a9 configitems: register the 'web.allowgz' config 2017-10-11 04:12:34 +02:00
Boris Feld
0af5173fc6 configitems: register the 'web.allowbz2' config 2017-10-11 04:12:23 +02:00
Boris Feld
ff16b03815 configitems: register the 'email.reply-to' config 2017-10-11 03:54:19 +02:00
Boris Feld
74f545a616 configitems: register the 'email.cc' config 2017-10-11 03:54:05 +02:00
Boris Feld
bffa794209 configitems: register the 'email.bcc' config 2017-10-11 03:53:58 +02:00
Boris Feld
502053e485 configitems: register the 'logtoprocess.uiblocked' config 2017-10-11 03:50:24 +02:00
Boris Feld
185e06d7c6 configitems: register the 'logtoprocess.develwarn' config 2017-10-11 03:50:14 +02:00
Boris Feld
6de7bd7a6d configitems: register the 'logtoprocess.command' config 2017-10-11 03:49:47 +02:00
Boris Feld
c6d40db127 configitems: register the 'logtoprocess.commandfinish' config 2017-10-11 03:49:21 +02:00
Boris Feld
d9578ea92a configitems: register the 'logtoprocess.commandexception' config 2017-10-11 03:49:04 +02:00
Boris Feld
cdcf29ac77 configitems: register the 'pager.pager' config 2017-10-11 03:45:14 +02:00
Boris Feld
64308038dd configitems: register the 'web.maxchanges' config 2017-10-11 03:41:48 +02:00