Commit Graph

15428 Commits

Author SHA1 Message Date
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
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
Pierre-Yves David
e719727169 phases: set common changeset to public on pull 2011-11-11 00:22:02 +01:00
Pierre-Yves David
bf6f3ef1a7 phases: mark content pushed as public in local repo on push 2011-11-11 00:21:17 +01:00
Pierre-Yves David
493771f789 phases: marked content of a changegroup as published 2011-11-11 00:19:00 +01:00
Pierre-Yves David
0f1186823a phases: set new commit in 1-phase 2011-11-11 00:15:22 +01:00
Pierre-Yves David
c97518dfab phases: add retractboundary function to move boundary backward
The advanceboundary documentation is updated to highlight the difference.
2011-11-11 00:16:53 +01:00
Matt Mackall
71fadf8296 tests: fix trailing whitespace 2011-11-10 17:06:12 -06:00
Matt Mackall
79f43ffdfe hgweb: add hint about finding library path with debuginstall 2011-11-10 15:08:51 -06:00
FUJIWARA Katsunori
970e57770c largefiles: treat status of cache missed largefiles as "missing" correctly
"hg status" may treat cache missed largefiles as "removed" incorrectly.

assumptions for problem case:

  - there is no cache for largefile "L"
  - at first, update working directory to the revision in which "L" is
    not yet added,
  - then, update working directory to the revision in which "L" is
    already added

and now, "hg status" treats "L" as "removed".

current implementation does not allocate entry for cache missed
largefile in ".hg/largefiles/dirstate", but files without
".hg/largefiles/dirstate" entry are treated as "removed" by largefiles
extension.

"hg revert" can not recover from this situation, but "rm -rf
.hg/largefiles", because it causes dirstate rebuilding.

this patch invokes normallookup() for cache missed largefiles to
allocate entry in ".hg/largefiles/dirstate", so "hg status" can treat
it as "missing" correctly.
2011-11-11 02:33:01 +09:00
Matt Mackall
08d628312f merge with i18n 2011-11-10 11:00:02 -06:00
Pierre-Yves David
241fc82f4e phases: rename moveboundary into advance boundary
This rename prepare the creation of retract boundaru that move boundary backward
2011-11-10 01:09:15 +01:00
Pierre-Yves David
1401cbb897 phases: remove underbar into target_phase argument 2011-11-10 01:08:08 +01:00
Matt Mackall
6c38ee4b0b merge with stable 2011-11-10 17:06:30 -06:00
Matt Mackall
e0657b708d merge with stable 2011-11-10 15:55:26 -06:00
Matt Mackall
30c1fc3bf2 mq: add a warning about uncommitted changes for qfinish 2011-11-10 15:40:34 -06:00
David M. Carr
f9ef6cf73b forget: support forgetting explicit paths in subrepos
Change the behavior of the forget command such that explicit paths in
subrepos are handled by forgetting the file in the subrepo. This eliminates the
previous behavior where if you called "hg forget" for an explicit path in a
subrepo, it would state that the file is already untracked.
2011-11-09 19:46:51 -05:00