Commit Graph

15443 Commits

Author SHA1 Message Date
Mads Kiilerich
df6c03ed7a tests: make test-commandserver.py independent of line ending and slash direction 2011-11-21 00:39:32 +01:00
Mads Kiilerich
a71b0e4d4e tests: make test-commandserver.py output readable 2011-11-21 00:39:32 +01:00
Mads Kiilerich
dd70310a2a tests: 'hghave unix-permissions' for test-import.t
'hg import' of a patch with mode changes requires unix permissions support in
the file system.
2011-11-21 00:39:32 +01:00
Mads Kiilerich
bd64c64dd6 tests: skip color test on platforms without tic 2011-11-21 00:39:32 +01:00
Matt Mackall
0caacfba55 merge with i18n 2011-11-20 16:07:07 -06:00
Matt Mackall
d795921141 merge with i18n 2011-11-20 16:06:51 -06:00
Matt Mackall
6c076151bb merge with stable 2011-11-20 16:06:18 -06:00
Patrick Mezard
c4cef76e25 mdiff: replace wscleanup() regexps with C loops
On my system it reduces:

  hg annotate -w mercurial/commands.py

from 36s to less than 8s, to be compared with 6.3s when run without whitespace
options.
2011-11-18 14:23:03 +01:00
Patrick Mezard
252fc23b56 mdiff: split lines in allblocks() only when necessary
These are only required to handle the --ignore-blank-lines case
2011-11-18 14:16:47 +01:00
Wagner Bruna
53444db76c i18n-pt_BR: synchronized with 16bb54565f4f 2011-11-18 10:21:56 -02:00
Patrick Mezard
cc3315778f annotate: support diff whitespace filtering flags (issue3030)
splitblock() was added to handle blocks returned by bdiff.blocks() which differ
only by blank lines but are not made only of blank lines. I do not know exactly
how it could happen but mdiff.blocks() threshold behaviour makes me think it
can if those blocks are made of very popular lines mixed with popular blank
lines. If it is proven to be wrong, the function can be dropped.

The first implementation made annotate share diff configuration entries. But it
looks like users will user -w/b for annotate but not for diff, on both the
command line and hgweb. Since the latter cannot use command line entries, we
introduce a new [annotate] section duplicating the diff whitespace options.
2011-11-18 12:04:31 +01:00
Pascal Quantin
fe27d67b3c setup: fix py2exe generation broken by c7ccdf21c98c (issue3116)
Py2exe is patching default distutils Distribution class. This patch ensures
that the right one is taken when calling hgdist class.
2011-11-20 19:14:36 +01:00
Patrick Mezard
4772aafb85 mdiff: make diffblocks() return all blocks, matching and changed
Annotate uses matching blocks not changed ones.
2011-11-18 12:01:04 +01:00
Patrick Mezard
ddbd229fe3 mdiff: extract blocks whitespace normalization in diffblocks()
We want to reuse it in annotate for whitespace normalization.
2011-11-18 11:53:38 +01:00
Matt Mackall
309d28f3f5 merge with crew 2011-11-17 23:02:18 -06:00
Matt Mackall
8ff3689535 setup: backout 4c2574ae2b6b
Change wasn't compatible with Python 2.x
2011-11-17 23:01:58 -06:00
Mads Kiilerich
7f38d9b9d4 help: Backed out changeset daf758dccb52, description of file urls
This help entry didn't try to describe the 'localhost' notation. It described a
non-standard host-less notation where 'local' just was the first part of a
sample relative path. It describe "urls" with relative and absolute paths like:

  file://file.txt
  file:///tmp/file.txt
  file://c:/tmp/file.txt
2011-11-18 01:32:28 +01:00
Matt Mackall
8de0c77dee revset: follow(nosuchfile) should give an empty set (issue3114) 2011-11-20 15:29:55 -06:00
Matt Mackall
75db0d196a merge with stable 2011-11-17 16:53:17 -06:00
Thomas De Schampheleire
09f4a92184 hook: flush stdout before redirecting to stderr
When hook output redirection is enabled (e.g. when cloning over ssh), hook
output on stdout is redirected to stderr, to prevent the repository data on
stdout from being corrupted.
In certain cases, the redirection could cause part of the repository data to
end up on stderr as well. In case of a clone, this causes:
"abort: consistency error in delta!"

This was seen with a clone over ssh, an outgoing hook present (any
non-python type, e.g. 'pwd'), on certain repositories only,
probably depending on the distribution of the sent data)

This patch updates the hook redirection code to flush stdout before
redirecting, removing the problem.
2011-11-16 08:34:36 +01:00
Patrick Mezard
942cefafa6 import: fix parent selection when importing merges
With "wp1" and "wp2" the current working directory parents, "p1" and "p2" the
patch parents and "parents" the resulting commit parents, the current behaviour
is:

--bypass --exact p2 parents
0        0       0  [wp1, wp2]
0        0       1  [wp1, wp2]/buggy
0        1       0  [p1]
0        1       1  [p1, p2]
1        0       0  [wp1, wp2]
1        0       1  [p1, p2]
1        1       0  [p1]
1        1       1  [p1, p2]

The original behaviour before 1f543fd375c5 was:

--bypass --exact p2 parents
0        0       0  [wp1, wp2]
0        0       1  if p1 == wp1 then [p1, p2] otherwise [wp1, wp2]
0        1       0  [p1]
0        1       1  [p1, p2]

This patch restores the previous behaviour when --bypass is not set, and align
--bypass behaviour when --exact is not set with merge diffs.
2011-11-16 12:53:10 +01:00
Mads Kiilerich
786be21bbb tests: don't use stdout redirection for test data
Stdout redirection is not binary safe everywhere - for example not on windows
with msys.
2011-11-16 03:45:14 +01:00
Mads Kiilerich
637e2ecde2 tests: hide 'No such file or directory' messages
Windows will use a different and localized message.
2011-11-16 03:45:14 +01:00
Mads Kiilerich
9c95d62a3d tests: add missing '(glob)'s to match '\' in paths in test output on windows 2011-11-16 03:45:14 +01:00
Mads Kiilerich
d648884b09 tests: add 'hghave system-sh' to skip tests on windows 2011-11-16 03:45:14 +01:00
Mads Kiilerich
8e24d85037 tests: launch hghave with python interpreter without relying on hash-bang 2011-11-16 03:45:14 +01:00
Mads Kiilerich
e0ce7904f7 tests: use the specified shell for running old fashioned sh tests 2011-11-16 03:45:14 +01:00
Mads Kiilerich
13d122b2cd tests: add missing 'hghave unix-permissions' 2011-11-16 03:45:14 +01:00
Mads Kiilerich
cb035c4003 tests: remove hacks for testing if file or directory exists 2011-11-16 03:45:14 +01:00
Mads Kiilerich
f695ee71c6 tests: don't leave temporary directories without write permission behind 2011-11-16 03:45:06 +01:00
Matt Mackall
3a9838cebc merge with stable 2011-11-15 14:33:06 -06:00
Matt Mackall
3eab62750e dirstate: fix case-folding identity for traditional Unix
We used to use os.path.normcase which was a no-op, which was unhelpful
for cases like VFAT on Linux.
2011-11-15 14:25:11 -06:00
Thomas Arendsen Hein
5f8b5fa5ff convert/bzr: fix test of divergent nested renames for bzr 1.x
7ad43b163555 introduced a new block in test-convert-bzr-directories.t
which produces a slightly different output with older bzr versions.
Tested with bzr 1.5 on Debian lenny.
2011-11-15 17:16:17 +01:00
Patrick Mezard
31705153e3 patch: simplify hunk extents parsing
Do not capture unwanted groups in regexps
2011-11-14 18:16:01 +01:00
Marc-Antoine Ruel
803348c87d posix: fix findexe() to check for file type and access 2011-11-17 15:44:37 -06:00
Mads Kiilerich
82bc04a832 forget: use forward slashes for internal paths
forget into a subrepo failed on windows because pathes were joined with \.
2011-11-15 02:44:55 +01:00
Patrick Mezard
16811ddcba diff: --ignore-blank-lines was too enthusiastic
It was ignoring changes from:

ab

to:

a
b
2011-11-13 21:37:14 +01:00
Stefano Tortarolo
f195f71994 graft: disallow grafting grafted csets in specific situations (issue3091)
In particular, we do not allow:
- grafting an already grafted cset onto its original branch
- grafting already grafted csets with the same origin onto each other
2011-11-12 14:00:25 +01:00
Stefano Tortarolo
2dbc061389 graft: use revs to make tests more readable 2011-11-12 11:23:52 +01:00
Stefano Tortarolo
dfee711e26 graft: preserve original source in subsequent grafts 2011-11-12 13:15:40 +01:00
Dmitry Panov
6649925e57 makedate: wrong timezone offset if DST rules changed this year (issue2511)
Python's time module sets timezone and altzone based on UTC offsets of
two dates: first and middle day of the current year. This approach
doesn't work on a year when DST rules change.

For example Russia abandoned winter time this year, so the correct UTC
offset should be +4 now, but time.timezone returns 3 hours difference
because that's what it was on 01.01.2011.

Related python issue: http://bugs.python.org/issue1647654
2011-11-13 00:29:26 +00:00
Marc-Antoine Ruel
05df0333e0 posix: fix findexe() to check for file type and access 2011-11-16 17:55:32 -06:00
Mads Kiilerich
b49a4ee31a subrepo: use correct paths for subrepos with ..-relative paths on windows
posixpath normpath of c:\foo\bar/../baz is baz, so now we pconvert first.
2011-11-15 02:16:30 +01:00
Mads Kiilerich
ef0024b865 check-code: add --nolineno option for hiding line numbers
This makes the output more stable when it is used as a whitelist.
2011-11-11 01:25:47 +01:00
Matt Mackall
66de5cde16 merge: give a special message for internal:merge failure (issue3105) 2011-11-16 18:04:19 -06:00
Simon Heimberg
77b258d449 setup: raise when executing with python3 without c2to3 argument 2011-11-12 02:08:01 +01:00
Mads Kiilerich
065de91b14 add missing localization markup 2011-11-11 01:07:10 +01:00
Mads Kiilerich
5d7000644a url: handle file://localhost/c:/foo "correctly"
The path was parsed correctly, but localpath prepended an extra '/' (as in
'/c:/foo') because it assumed it was an absolute unix path.
2011-11-16 00:10:56 +01:00
Mads Kiilerich
85ec0fb7bf help: it is 'file://localhost/', not 'file://local/'
The documentation has apparently always been wrong.
2011-11-16 00:10:52 +01:00
Eric Roshan Eisner
5dcac2b222 subrepo: fix git status false positive (issue3109)
It turns out there's a separate command to force git to look at file contents
if the stat has changed.
2011-11-11 11:11:11 +11:11