Commit Graph

28834 Commits

Author SHA1 Message Date
Augie Fackler
280edd8f34 make: use shell-command assignment instead of $(eval ...)
This is portable between BSD and GNU make.

As of this change, our Makefile appears to work in both BSD and GNU
make, with the caveat that the test-% and testpy-% wildcard rules
don't work on BSD make. That said, this still seems worthwhile because
it lets the buildbots work more consistently across platforms.
2016-04-21 10:11:20 -04:00
Augie Fackler
da32b6b74d make: do assignment and export in a single statement
This is portable between GNU and BSD make, whereas doing the export on
its own line confuses BSD make.
2016-04-21 10:10:48 -04:00
Augie Fackler
10944bd011 make: alter how we compute compiler flags for setup.py
This is portable between BSD and GNU make. I'm not thrilled with how
it worked out, but it's portable and solves the problem.
2016-04-21 10:05:14 -04:00
Yuya Nishihara
5ed7576a38 revset: unindent "if True" block in sort()
It was there to make the previous patch readable.
2016-04-23 16:11:05 +09:00
Yuya Nishihara
37d980f070 revset: make sort() do dumb multi-pass sorting for multiple keys (issue5218)
Our invert() function was too clever to not take length into account. I could
fix the problem by appending '\xff' as a terminator (opposite to '\0'), but
it turned out to be slower than simple multi-pass sorting.

New implementation is pretty straightforward, which just calls sort() from the
last key. We can do that since Python sort() is guaranteed to be stable. It
doesn't sound nice to call sort() multiple times, but actually it is faster.
That's probably because we have fewer Python codes in hot loop, and can avoid
heavy string and list manipulation.

  revset #0: sort(0:10000, 'branch')
  0) 0.412753
  1) 0.393254

  revset #1: sort(0:10000, '-branch')
  0) 0.455377
  1) 0.389191  85%

  revset #2: sort(0:10000, 'date')
  0) 0.408082
  1) 0.376332  92%

  revset #3: sort(0:10000, '-date')
  0) 0.406910
  1) 0.380498  93%

  revset #4: sort(0:10000, 'desc branch user date rev')
  0) 0.542996
  1) 0.486397  89%

  revset #5: sort(0:10000, '-desc -branch -user -date -rev')
  0) 0.965032
  1) 0.518426  53%
2016-04-23 16:09:30 +09:00
Yuya Nishihara
20d3269298 log: fix status template to list copy source per dest (issue5155)
Before, copied files were assumed as "A" (added) and listed followed by
non-copy added files. This could double entries of a copy if it had "M"
(modified) state.

So, this patch makes the template check if a file is included in copies dict.
This way, entries should never be doubled.

The output of "log -Tstatus -C" does not always agree with "status -C --change"
due to the bug of "status", which is documented in test-status.t. See also
21a68fa3c757.
2016-03-24 22:55:56 +09:00
Martijn Pieters
4b822b7401 graphmod: disable graph styling when HGPLAIN is set (issue5212)
Produce stable output for tools to rely on by hardcoding all edge styles to
"|". This ensures that any tool parsing the output of hg log -G still gets the
same behaviour as pre-3.8 releases.
2016-04-20 16:33:13 +01:00
Martijn Pieters
2f489ce3b5 graphmod: fix seen state handling for > 2 parents (issue5174)
When there are more than 2 parents for a given node (in a sparse graph), extra
dummy nodes are inserted to transition the lines more gradually. However, since
the seen state was not updated when yielding the extra nodes, the wrong graph
styles were being applied to the nodes.
2016-04-20 18:26:29 +01:00
timeless
70411b9a13 httpclient: reverse accidental damage from c91cccd0719b 2016-04-20 21:33:02 +00:00
timeless
cc4a444d91 tests: tolerate http2
You can run tests like this:
run-tests.py -l --extra-config-opt ui.usehttp2=true

And ideally, no tests should fail...
2016-04-21 04:30:18 +00:00
Sean Farley
c278aa536d make: add rule for building an ubuntu ppa 2016-04-16 13:02:13 -07:00
Sean Farley
2ae42c9c04 builddeb: add flag for a source-only deb
This is required for building a ppa for ubuntu which following patches will
use.
2016-04-16 13:01:47 -07:00
Sean Farley
ac64faac8c builddeb: create source archive for ubuntu 2016-04-16 17:06:11 -07:00
Sean Farley
86966707e3 builddeb: ignore vcs and build results
This one is a no-brainer. Previously, if you tried to build a deb on ubuntu, it
would try to diff files in the .hg store. These flags prevent that.
2016-04-15 15:44:00 -07:00
Sean Farley
2aa8466d25 builddeb: copy over .gz and .dsc files
We were forgetting to copy over the signature (if it exists) and the zipped
diff, so let's do that.
2016-04-15 14:28:26 -07:00
Sean Farley
738ce5394f builddeb: ignore errors about find not finding files
The debuild command may output less files than we explicitly list so let's not
error out if none exist.
2016-04-15 14:27:42 -07:00
Sean Farley
cf4a77c8c0 builddeb: use the os codename instead of 'unstable'
This fixes a lintian error (and indeed, launchpad rejects it) by using the
distribution's codename (e.g. xenial, trusty, etc).
2016-04-16 12:42:53 -07:00
Sean Farley
71e02dfaad builddeb: use sed -i
Notice that there is no space after '-i'. This makes it work on both GNU and
BSD versions of sed.
2016-04-16 12:33:21 -07:00
Sean Farley
aa0d445553 dockerdeb: redirect 'cd' in export command to /dev/null
This had the unfortunate side effect of causing the environment to have a
newline due to the fact that some 'cd' outputs the result of the directory
change. So, let's just redirect the meaningless output.
2016-04-17 10:36:40 -07:00
Yuya Nishihara
be362c5e3b help: avoid using "$n" parameter in revsetalias example
Because parsing "$n" requires a crafted tokenizer, it exists only for backward
compatibility (as documented in revset._tokenizealias.) This patch updates the
examples so that users are encouraged to use symbolic names instead of "$n"s.

I'm going to implement alias expansion in templater, which won't support "$n"
parameters to make my life easier. Templater is more complicated than revset
because tokenizer and parser call each other.
2016-03-26 18:50:56 +09:00
Sean Farley
24f7624e5e debian: add missing netbase dependency
Apparently, some machines don't have this service (launchpad builders are one
such example). This adds the correct dependency for test-serve.t.
2016-04-17 10:39:17 -07:00
Sean Farley
11b650fc97 debian: add missing zip/unzip dependencies 2016-04-16 14:24:25 -07:00
Sean Farley
278c6cac50 debian: add missing python-docutils dependency 2016-04-15 13:53:23 -07:00
Sean Farley
10771f89cc debian: add missing python-all-dev dependency 2016-04-15 13:46:16 -07:00
timeless
85999ce49e patchbomb: use single quotes around command hint
Windows command lines use double quotes to quote arguments with spaces.
This change is in a series to unify around using single quotes around
commands, and double quotes around interior arguments.

This changeset is taken on stable for consistency with similar update done
before the freeze.
See dc90bb772edc, 675a0be03493, 518b94d8f911 and 149a699cfd98.
2016-04-14 15:15:49 +00:00
Jun Wu
837ef17e43 chg: forward SIGWINCH to worker
Before this patch, if the user uses chg and ncurses interface, resizing the
terminal window will mess up its content.

This patch fixes the issue by forwarding SIGWINCH to the worker process.
2016-04-10 01:28:52 +01:00
Matt Mackall
1b3b5f9e64 Added signature for changeset b892d98c6d4c 2016-04-16 18:09:42 -05:00
Sean Farley
33f8cae522 make: remove packages directory in clean rule 2016-04-15 13:10:34 -07:00
Sean Farley
8110a0a71f make: add forgotten hgext3rd to clean rule 2016-04-15 11:51:57 -07:00
Sean Farley
ec938b217f make: add chg to clean rule 2016-04-15 11:51:41 -07:00
Sean Farley
8506d89fe7 test-docker-packaging: add new line to test output
It seems we changed our build but didn't update the docker test.
2016-04-16 11:17:06 -07:00
Sean Farley
51cd78fbe1 tests: relax pattern matching for newer docker 2016-04-15 14:47:32 -07:00
Pulkit Goyal
e613a4c10d py3: make factotum use absolute_import
check-code complains for using urllib2 so that too was fixed.
2016-04-17 02:29:33 +05:30
Pulkit Goyal
d623f99ed3 py3: make extdiff use absolute_import 2016-04-17 02:15:05 +05:30
Pulkit Goyal
e8c7dbca1d py3: make eol use absolute_import 2016-04-17 02:10:55 +05:30
Pulkit Goyal
570e0beb47 py3: make color use absolute_import 2016-04-17 00:53:56 +05:30
Pulkit Goyal
16d6b10e69 py3: make hgmanpage use absolute_import 2016-04-17 00:23:05 +05:30
Pulkit Goyal
e736fa4f52 py3: make gendoc use absolute_import
Fixed direct imports even the tests were not complaining.
2016-04-17 00:20:44 +05:30
Pulkit Goyal
f869841929 py3: make check-seclevel use absolute_import
Also fixed direct symbol imports even the tests were not complaining.
2016-04-17 00:14:42 +05:30
timeless
0dd163b523 fetch: use single quotes around command hint
Windows command lines use double quotes to quote arguments with spaces.
This change is in a series to unify around using single quotes around
commands, and double quotes around interior arguments.
2016-04-14 15:20:11 +00:00
timeless
ce70666e78 graft: use single quotes around command hint
Windows command lines use double quotes to quote arguments with spaces.
This change is in a series to unify around using single quotes around
commands, and double quotes around interior arguments.
2016-04-14 15:19:57 +00:00
timeless
4466b53c45 config: use single quotes around command hint
Windows command lines use double quotes to quote arguments with spaces.
This change is in a series to unify around using single quotes around
commands, and double quotes around interior arguments.
2016-04-14 15:18:59 +00:00
timeless
f26cdc0d89 debugcreatestreamclonebundle: use single quotes around command hint
Windows command lines use double quotes to quote arguments with spaces.
This change is in a series to unify around using single quotes around
commands, and double quotes around interior arguments.
2016-04-14 15:17:15 +00:00
Gregory Szorc
2a792d7c94 transaction: clear callback instances after usage
Prevents double usage and helps reduce reference cycles, which
were observed to occur in `hg convert` and other scenarios where
there are multiple transactions per process.
2016-04-16 09:02:37 -07:00
Gregory Szorc
5120867e9f lock: clear postrelease hooks list after usage
Post release hooks should only be called once. Setting the
list to None after usage will prevent accidental usage after
they are used.

In addition, it is easy for reference cycles to sneak into hook
functions. Clearing the hooks after usage helps prevent these
cycles.
2016-04-16 09:00:15 -07:00
Yuya Nishihara
d21d4d0b82 ui: drop template aliases by HGPLAIN
Otherwise, scripting output could be suffered from user aliases.
2016-03-27 21:05:55 +09:00
Yuya Nishihara
ec53346d72 templater: load and expand aliases by template engine (API) (issue4842)
Now template aliases are fully supported in log and formatter templates.

As I said before, aliases are not expanded in map files. This avoids possible
corruption of our stock styles and web templates. This behavior is undocumented
since no map file nor [templates] section are documented at all. Later on,
we might want to add [aliases] section to map files if it appears to be useful.
2016-03-27 20:59:36 +09:00
Yuya Nishihara
97c46852fc templater: inline compiletemplate() function into engine
This allows the template engine to modify parsed tree.
2016-04-03 13:23:40 +09:00
Yuya Nishihara
84a8ba9511 templater: factor out function that creates templater from string template
This function will host loading of template aliases. It is not defined at
templater, but at formatter, since formatter is the module handling ui stuff
in front of templater.
2016-04-10 17:23:09 +09:00
Yuya Nishihara
3f981af86b templater: separate function to create templater from map file (API)
New frommapfile() function will make it clear when template aliases will be
loaded. They should be applied to command arguments and templates in hgrc,
but not to map files. Otherwise, our stock styles and web templates
(i.e map-file templates) could be modified unintentionally.

Future patches will add "aliases" argument to __init__(), but not to
frommapfile().
2016-04-03 23:26:48 +09:00