- Apr 12, 2014
-
-
Pierre-Yves David authored
Now that we have lazy generation of parts, let's use it.
-
- Apr 11, 2014
-
-
Pierre-Yves David authored
When the `part.data` attribute is an iterator, we assume it is an iterator of chunks and use it. We use a chunkbuffer to yield chunks of 4096 bytes. The tests are updated to use this feature.
-
- Apr 10, 2014
-
-
Pierre-Yves David authored
We are preparing streaming capability for part. So the generation of payload chunk will becomes more complex. We extract this part in its own function before any changes.
-
Pierre-Yves David authored
This code used to be in `writebundle` only. We needs to make it more broadly available for bundle2. The "changegroup" bundle2 part has to retrieve the binary content of changegroup stream. We moved the chunks retrieving code into the `unbundle10` object directly and the `writebundle` code is now using that. This split is useful for bundle2 purpose, we want to be able to easily stream changegroup content in a part. To keep thing simples, we kept compression out of the new methods. If it make more sense in the future, compression may get included in this function too.
-
- Mar 25, 2014
-
-
Pierre-Yves David authored
We now have an official way to return the result of addchangegroup. The tests are updated to check that the return bundle is properly created. It will be used when push is bundle2 enabled.
-
- Apr 04, 2014
-
-
Pierre-Yves David authored
We do not know yet what kind of data future features and extensions will need to exchange. To handle that, bundle2 allows to send arbitrary content to the server. As a consequence, we need to be able to reply arbitrary content to the client. And, we can use bundle2 to transmit those arbitrary data. When a client will push a bundle2 to the server, the server will reply with a bundle2 itself. This changeset installs the first stone of this logic and test it.
-
- Apr 11, 2014
-
-
Pierre-Yves David authored
We need an efficient way to handle bundle replies. The unbundle records class is extended to carry such data.
-
- Apr 01, 2014
-
-
Pierre-Yves David authored
For sending response to a pushed bundle, we need to link reply parts to request part. We introduce a part id for this purpose. This is a 32 bit unique integer stored in the header.
-
- Apr 07, 2014
-
-
Mads Kiilerich authored
This can happen after backout or grafts or criss cross merges. We already do the same (but slightly different) thing in manifestmerge and filemerge.
-
Sean Farley authored
With this changeset, we can now send a color name directly to the label function, e.g. $ hg log -r . -T "{label('red', node|short)}\n"
-
Sean Farley authored
This patch is just setup work so that we can reduce code duplication and have one place to define a valid effect.
-
Mads Kiilerich authored
We want to move in this direction.
-
- Feb 25, 2014
-
-
Mads Kiilerich authored
-
Mads Kiilerich authored
mergecopies might be doomed but it is not dead yet ...
-
- Apr 07, 2014
-
-
Mads Kiilerich authored
We want to move in this direction. ctx.ancestor is in a better position for handling a situation with multiple ancestors.
-
Mads Kiilerich authored
This do probably not make any real difference but is slightly more correct and we would like to get rid of flog.ancestor.
-
Mads Kiilerich authored
This do probably not make any real difference but is slightly more correct and we would like to get rid of changelog.ancestor.
-
- Mar 20, 2014
-
-
Mads Kiilerich authored
-
- Apr 07, 2014
-
-
Mads Kiilerich authored
-
- Mar 08, 2014
-
-
Katsunori FUJIWARA authored
-
Katsunori FUJIWARA authored
"applybundle()" also includes "addchangegroup()" invocation to encapsulate "vfs.join()" inside it.
-
Katsunori FUJIWARA authored
-
Katsunori FUJIWARA authored
-
Katsunori FUJIWARA authored
This patch makes "repair.strip()" treat bundle files via vfs. This patch also avoids applying "vfs.join()" on the value returned by "changegroup.writebundle()", to get relative path from "_bundle()".
-
Katsunori FUJIWARA authored
-
Katsunori FUJIWARA authored
This patch makes paths below in "_bundle()" relative to ".hg": - backup directory ("strip-backup"), and - bundle file under backup directory "vfs" is passed to "changegroup.writebundle()" to use relative path directly. This patch applies "vfs.join()" on the value returned by "_bundle()", because the caller expect it to return absolute path. This will be changed by succeeding patch changing the caller side.
-
Katsunori FUJIWARA authored
Before this patch, filename specified to "changegroup.writebundle()" should be absolute one. In some cases, they should be relative to repository root, store and so on (backup before strip, for example). This patch adds "vfs" argument to "writebundle()", and makes "writebundle()" open (and unlink) "filename" via vfs for relative access, if both filename and vfs are specified.
-
Katsunori FUJIWARA authored
Before this patch, "localrepository.undofiles()" returns list of absolute filename of undo files. This patch makes it return list of tuples "(vfs, relative filename)" to access undo files via vfs. This patch also changes "repair.strip()", which is the only user of "localrepository.undofiles()".
-
- Apr 11, 2014
-
-
Matt Mackall authored
-
- Apr 10, 2014
-
-
Wei, Elson authored
The default http request character set is UTF-8. If the message is not encoded in UTF-8, such as big5, it cannot be shown correctly. The 'charset' is overridden by the root document's, such that the user can select the proper encoding in the browser.
-
- Apr 11, 2014
-
-
Matt Mackall authored
-
Pierre-Yves David authored
-
Matt Mackall authored
-
- Apr 05, 2014
-
-
Pierre-Yves David authored
Localrepo now supports the unbundle method of pushing changegroups. We plan to use the unbundle call for bundle2 so it is important that all peers supports it. The `peer.unbundle` and `peer.addchangegroup` code path have small difference so cause some test output changes. None of those changes seems problematic.
-
Pierre-Yves David authored
The `exchange` module now contains an `unbundle` function that holds the core unbundle logic. The wire protocol keeps its own unbundle function. It enforces wireprotocol-specific logic and then calls the extracted function. This aims at implementing unbundle for localrepo.
-
Pierre-Yves David authored
We are going to refactor the unbundle function to have it working on a local repository too. Having this function extracted will ease the process. In the case of non-matching heads, the function now directly raises an exception. The top level of the function is catching it.
-
- Apr 08, 2014
-
-
Pierre-Yves David authored
When a changegroup is added by a push on a publishing server, we ensure they are added as public. This is used to enforce publishing on server when the client is not aware of phases. It also prevents race conditions where a reader could see the changesets as draft before they get turned public by the client. Finally, this save rounds trip as the client does not need additional request to turn them public. However, this logic was only enforced when the changegroup was from a "push" source. And "push" is used for local pushes only. Wireprotocol push uses "serve" as source since Mercurial 1.9. We now enforce this logic for both "push" and "serve" sources. One could note that this logic was mainly useful during wireprotocol exchanges. So this code is finally put into good use, 9 versions after its introduction.
-
- Apr 10, 2014
-
-
Matt Mackall authored
-
- Dec 20, 2013
-
-
Stéphane Klein authored
[This was applied in 181108726ea5 but backed out again in af02783dea65 because of Python 2.4 issues. This edition and test-http.t works with Python 2.4.] Context: mercurial access to repository server with http access, and this server is protected by basic auth. Before patch: * mercurial try an anonymous access to server, server return 401 response and mercurial resend request with login / password information After patch: * mercurial try an anonymous access to server, server return 401 response. For all next requests, mercurial keep in memory this information (this server need basic auth information). This patch reduce the number of http access against mercurial server. Example, before patch: 10.10.168.170 - - [25/Oct/2013:15:44:51 +0200] "GET /hg/testagt?cmd=capabilities HTTP/1.1" 401 260 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:44:52 +0200] "GET /hg/testagt?cmd=capabilities HTTP/1.1" 200 147 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:00 +0200] "GET /hg/testagt?cmd=capabilities HTTP/1.1" 401 260 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:01 +0200] "GET /hg/testagt?cmd=capabilities HTTP/1.1" 200 147 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:03 +0200] "GET /hg/testagt?cmd=batch HTTP/1.1" 401 260 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:04 +0200] "GET /hg/testagt?cmd=batch HTTP/1.1" 200 42 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:06 +0200] "GET /hg/testagt?cmd=getbundle HTTP/1.1" 401 260 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:07 +0200] "GET /hg/testagt?cmd=getbundle HTTP/1.1" 200 61184 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:09 +0200] "GET /hg/testagt?cmd=listkeys HTTP/1.1" 401 260 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:10 +0200] "GET /hg/testagt?cmd=listkeys HTTP/1.1" 200 15 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:12 +0200] "GET /hg/testagt?cmd=listkeys HTTP/1.1" 401 260 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:12 +0200] "GET /hg/testagt?cmd=listkeys HTTP/1.1" 200 - "-" "mercurial/proto-1.0" Example after patch: 10.10.168.170 - - [28/Oct/2013:11:49:14 +0100] "GET /hg/testagt?cmd=capabilities HTTP/1.1" 401 260 "-" "mercurial/proto-1.0" 10.10.168.170 - - [28/Oct/2013:11:49:15 +0100] "GET /hg/testagt?cmd=capabilities HTTP/1.1" 200 147 "-" "mercurial/proto-1.0" 10.10.168.170 - - [28/Oct/2013:11:49:17 +0100] "GET /hg/testagt?cmd=batch HTTP/1.1" 200 42 "-" "mercurial/proto-1.0" 10.10.168.170 - - [28/Oct/2013:11:49:19 +0100] "GET /hg/testagt?cmd=getbundle HTTP/1.1" 200 61184 "-" "mercurial/proto-1.0" 10.10.168.170 - - [28/Oct/2013:11:49:22 +0100] "GET /hg/testagt?cmd=listkeys HTTP/1.1" 200 15 "-" "mercurial/proto-1.0" 10.10.168.170 - - [28/Oct/2013:11:49:24 +0100] "GET /hg/testagt?cmd=listkeys HTTP/1.1" 200 - "-" "mercurial/proto-1.0" In this last example, you can see only one 401 response.
-
- Apr 08, 2014
-
-
Durham Goode authored
caps.remove('bundle2') was throwing an exception if bundle2 wasn't present in the capabilities. This was causing test-static-http.t to hang. Let's just use discard, so we don't get an exception.
-