Commit Graph

18231 Commits

Author SHA1 Message Date
Mads Kiilerich
d98fa22802 commandserver: report capabilities sorted 2012-12-12 02:38:14 +01:00
Mads Kiilerich
c4b6cff1d3 bisect: store state sorted 2012-12-12 02:38:14 +01:00
Mads Kiilerich
641f4b8a6c localrepo: store branchheads sorted 2013-01-15 02:59:12 +01:00
Mads Kiilerich
26b3c84619 localrepo: store requirements sorted 2012-12-12 02:38:14 +01:00
Mads Kiilerich
ff0cc1a7f9 copies: make the loss in _backwardcopies more stable
A couple of tests shows slightly more correct output. That is pure coincidence.
2013-01-15 02:59:12 +01:00
Mads Kiilerich
3cb021c3b0 serve: use chunked encoding in hgweb responses
'hg serve' used to close connections when sending a response with unknown
length ... such as a bundle or archive.

Now chunked encoding will be used for responses with unknown length, and the
connection do thus not have to be closed to indicate the end of the response.

Chunked encoding is only used if the length is unknown, if the connection
wouldn't be closed for other reasons, AND if it is a HTTP 1.1 request.

This will not benefit other users of hgweb ... but it can serve as an example
that it can be done.
2013-01-15 01:10:08 +01:00
Mads Kiilerich
df2c27e00a serve: remove connection close hack for Python 2.3
Introduced in 172ac22869f4 and no longer needed - BaseHTTPServer handles
connection closing just fine if we don't mess with its internals.
2013-01-15 01:10:08 +01:00
Mads Kiilerich
202753eeb5 hgweb: pass the actual response body to request.response, not just the length
This makes it less likely to send a response that doesn't match Content-Length.
2013-01-15 01:07:03 +01:00
Mads Kiilerich
e3bf5c6dbe hgweb: don't pass empty response chunks on
hgweb internals will often produce empty writes - especially when returning
compressed data.  hgweb is no middleware application and there is thus no
reason to pass them on to be processed in other layers.
2013-01-15 01:05:12 +01:00
Mads Kiilerich
00d7d25679 hgweb: remove handling of any else than strings from request.write
Iterators should be returned WSGI style, not written. And apparently all of
hgweb do that.
2013-01-15 01:05:12 +01:00
Mads Kiilerich
01096c5713 serve: send response headers even if response has no body
The headers would usually be sent anyway because the app did a number of writes
of empty strings.
2013-01-15 01:05:12 +01:00
Mads Kiilerich
ab33fcb117 hgweb: simplify wsgirequest header handling
Remove leaky header abstraction and prepare for other encodings.
2013-01-15 01:05:12 +01:00
Mads Kiilerich
5b3ff65d9e hgweb: make type a mandatory parameter to request.respond
There will thus always be headers and the runtime check can be removed.
2013-01-15 01:05:12 +01:00
Mads Kiilerich
87b39b3461 hgweb: use Content-Length for pushres
This prevents some unnecessary http connection close.
2013-01-15 01:05:12 +01:00
Mads Kiilerich
14dc808b35 hgweb: send Content-Length 0 for zero length response
Before, Content-Length wasn't sent for 0 length responses. Now it is.

This could in principle prevent some unnecessary http connection close.
2013-01-15 01:05:12 +01:00
Mads Kiilerich
b66ec06f79 archival: tarit should never close the dest passed to it
Some archive types closed the open file passed to it, some didn't.

This could cause either missing or duplicate close and cause problems in hgweb.

The fix in 4f98880c1b4e should only have closed the compressors and archivers -
not the underlying file itself if no compressor is used.
2013-01-15 01:05:12 +01:00
Mads Kiilerich
d913c8547f mq: checktoppatch should only check if p1 is qtip
There is no way qtip in p2 could be used for anything, and there is thus no
reason to check and accept it.
2013-01-15 01:05:12 +01:00
Mads Kiilerich
60f82115fc mq: fix qpop of working directory parent patch when not at qtip
mq assumed that it had to update from qtip to qparent, and instead of updating
from where it was it failed with:
  abort: working directory revision is not qtip
2013-01-15 01:05:12 +01:00
Mads Kiilerich
9692d4642d largefiles: make log match largefiles in the non-standin location too
Yet another match hack.
2013-01-15 01:05:12 +01:00
Mads Kiilerich
5af2faad25 log: make log work even if first parameter doesn't exist
A slowpath optimization kicked in too often because of wrong indentation.
2013-01-15 01:05:12 +01:00
Mads Kiilerich
60e6a66d4b merge: remove "case" comments
The comments introduced in a1723fcd2b2d seems important ... but the context has
apparently been lost and they do not have any value now.
2013-01-15 01:05:12 +01:00
Mads Kiilerich
37a2d73d5e merge: merge file flags together with file content
The 'x' flag and the 'l' flag are very different. It is usually not a problem
to change the 'x' flag of a normal file independent of the content, but one
does not simply change the type of a file to 'l' independent of the content.

This removes the fmerge function that merged both 'x' and 'l' independent of
content early in the merge process. This correctly introduces some conflicts
instead of silent incorrect merges. 3-way flag merge will now be done in the
resolve process, right next to file content merge. Conflicts can thus be
resolved with (slightly inconvenient) resolve commands like 'resolve f --tool
internal:other'. It thus brings us closer to be able to re-solve manifest merge
after the merge and avoid prompts during merge.

This also removes the "conflicting flags for a - (n)one, e(x)ec or sym(l)ink?"
prompt that nobody could answer and that made it easy to mix symlink targets
and file contents up. Instead it will give a file merge where a sufficiently
clever merge tool can help resolving the issue.
2013-01-09 02:02:45 +01:00
Mads Kiilerich
c9fe95a3b6 tests: better test coverage of merges of flags
This makes existing problems with merges of symlinks and files more obvious and
add test coverage for tricky merges without real common ancestors.
2013-01-15 01:05:12 +01:00
Mads Kiilerich
befdd21355 merge: remove old pre-audit code checking for absolute paths
Audit will handle this in a more elegant way.
2013-01-10 03:40:45 +01:00
Mads Kiilerich
233c071ef3 merge: drop reference to file contents immediately after write
Like 6c6ada8fd4c5 this reduces memory usage on large merges.
2013-01-10 00:45:51 +01:00
Mads Kiilerich
a09e5b862c merge: changing the mode of a file is also an update
It was a change in the file system that wasn't reported in the summaries.
2013-01-10 00:44:23 +01:00
Mads Kiilerich
b4877a560f merge: use util.unlinkpath for removing moved files
- more like how removed files are removed.
2013-01-15 01:05:12 +01:00
Mads Kiilerich
39b66595ef merge: .hgsubstate is special as merge destination, not as merge source 2013-01-15 01:05:12 +01:00
Mads Kiilerich
360ab16fc3 merge: remove redundant unlink after merge
The early prescan for move/remove and removal of moved files in applyupdates
was introduced with mergestate 5ff549be1f0c and rendered this chunk of code
irrelevant.

The impact of the chunk was reduced in 0309b0586c65 - but it could have been
removed completely.
2013-01-09 00:01:33 +01:00
Mads Kiilerich
106702cb3a merge: rename list of actions from action to actions 2013-01-09 00:01:33 +01:00
Mads Kiilerich
2c466c126f merge: consistently use "x" instead of 'x' for internal action types
This makes it simpler to search for places where the action types are handled.
2013-01-09 00:01:33 +01:00
Mads Kiilerich
0fea0bfee8 merge: consistently use repo.wopener.audit instead of creating a new auditor 2013-01-09 00:01:33 +01:00
Mads Kiilerich
0d0f5ceab6 scmutil: simplify vfs.audit - drop wrapped vfs.auditor 2013-01-09 00:01:33 +01:00
Mads Kiilerich
33393d7e47 util: copyfile: remove dest before copying
This prevents spurious problems writing to locked files on Windows.
2013-01-10 00:44:23 +01:00
Mads Kiilerich
4d69012587 merge: warn when internal:merge cannot merge symlinks
A follow-up to 6847621b4da6.

internal:merge should never be picked for merging symlinks ... but in the test
suite we have HGMERGE="internal:merge" which bypasses all the usual merge-tool
cleverness. Without any output it can be hard to figure out what happened and
where the problem is.
2013-01-15 01:05:11 +01:00
Kevin Bullock
bd7b56e105 merge with stable 2013-01-14 10:17:06 -06:00
FUJIWARA Katsunori
573ec722a6 histedit: correct the number of added revisions in online help
In the context of help document on which this patch focuses, the
example repository, which is source of cloning, should be already
histedit-ed, and contain only 3 revisions (rev # 0 to 2). So, not 3,
but 4 revisions should be added to the destination repository of
cloning, if it contains 7 revisions (rev # 0 to 6).

This patch also adds modifier "histedit-ed" to "example repository",
to make context clear.
2013-01-14 23:14:45 +09:00
FUJIWARA Katsunori
75da74f62e histedit: correct changeset IDs in online help
There is no '633536316234' revision in the example repository. It
should be 'c561b4e977df', according to the revisions in it and
explanation in help document.
2013-01-14 23:14:45 +09:00
FUJIWARA Katsunori
9fd6562bca convert: correct 'hooks' section name in online help
The section name for hooks is not 'hook', but 'hooks'.
2013-01-14 23:14:45 +09:00
Pierre-Yves David
e4fab34c27 hgweb: document the revnavgen function 2013-01-13 21:36:35 +01:00
Mads Kiilerich
79e0196dc6 largefiles: make update with backup files in .hglf slightly less broken
Largefiles update would try to copy f to f.orig if there was a .hglf/f.orig .
That is in many many ways very very wrong, but it also caused an abort if f
didn't exist.

Now it only tries to copy f if it exists.
2013-01-10 15:33:14 +01:00
Pierre-Yves David
ed7bbaa14c dispatch: handle empty testedwith value in extension
When extensions had an empty `testedwith` attribute the code tried to parse it
and failed. As a result the actual error were shallowed by a This crash.

We now treat empty strip as 'unknown'
2013-01-04 19:06:42 +01:00
Benoit Boissinot
487f5cb58d test-command-template.t: make "age" filter test work on Feb 29th
reported by Julien Cristau.
2013-01-02 13:59:07 +01:00
Matt Mackall
56ee5e8df3 Added signature for changeset 9d7e53f4560e 2013-01-02 00:07:43 -06:00
Matt Mackall
b65fcfe7e4 merge with i18n 2013-01-02 00:03:31 -06:00
Matt Mackall
4ba8b9bde7 merge i18n heads 2013-01-02 00:02:22 -06:00
Augie Fackler
f909cd2da7 test-command-template.t: fix test so it all year
This test started failing for me after midnight UTC on December
31st. Fixed it by specifying a date 7 years in the future more
precisely (rather than just adding 8 to the year and specifying
January 1st), which allows the test to pass both now and on 2012-12-01
at the same time.
2012-12-31 21:50:35 -06:00
Pierre-Yves David
b6d4017a84 amend: prevent loss of bookmark on failed amend
The active bookmark were moved to the temporary commit. When the transaction
were rollbacked, the bookmark were lost.

We now temporarly disable the bookmark to prevent this effect.
2012-12-30 03:49:15 +01:00
Pierre-Yves David
6a1ec255bb amend: invalidate dirstate in case of failure (issue3670)
The temporary commit created by amend update the dirstate. If the final commit
fails, we need to invalidate the change made to the dirstate, otherwise the
release of the wlock will write the dirstate created after the rollbacked
temporary commit.

This dirstate writing logic should probably be handled in the same object than
the transaction one. However such change are too big for stable.
2012-12-29 18:00:18 +01:00
Alexander Sauta
39c2e8f8fe i18n-ru: synchonized with ce5a796b8950 2012-12-27 07:32:51 +00:00