- Oct 06, 2015
-
-
Pierre-Yves David authored
As we have a way for extension to add more header, we need a way for them to actually process them. We add a basic hook points to alter the changeset (especially extra) before we commit. There would be more to do for a full featured hooking, but this currently fit my needs.
-
Pierre-Yves David authored
Parsing 'nodeid' is very simple and a good first test.
-
Pierre-Yves David authored
Parsing 'branch' is very simple and a good first test.
-
- Oct 07, 2015
-
-
Pierre-Yves David authored
Parsing 'date' is very simple and a good first test.
-
Pierre-Yves David authored
We need a way for extension to extend the header we can parse. We start with a very simple mechanism that will be used in the next changeset.
-
- Oct 06, 2015
-
-
Pierre-Yves David authored
It is not heavily used enough to justify being something other than a dictionary entry.
-
Pierre-Yves David authored
The differences between both returns are now very thin, we factor out that part.
-
- Oct 07, 2015
-
-
Pierre-Yves David authored
The is one setter and no consumer, we can move it there directly.
-
- Oct 06, 2015
-
-
Pierre-Yves David authored
There is one setter and no consumer, we can move it there directly.
-
Pierre-Yves David authored
This is used in both case, we can assign it once.
-
Pierre-Yves David authored
There is one setter and no consumer, we can move it there directly.
-
Pierre-Yves David authored
The temporary variables are not adding anything.
-
Pierre-Yves David authored
This return is shared between the two cases. We can move it earlier.
-
Pierre-Yves David authored
We move to the more standard style of: value = default if special: value = other This is more consistent and compact.
-
Pierre-Yves David authored
The final goal here is to be able to parse, return and process arbitrary data from patch. This mirror the recently added ability to add arbitrary data to patch headers. The first step is to return something more flexible, so we return a dict without changing any other logic.
-
Pierre-Yves David authored
This config allows to specify a public location where your changeset can be found. It then include a dedicated patch header show a command to be used to retrieve the change. See the test for example. This is flagged as experimental because this feature is not safe until we have more logic to test that: - changeset actually exists on destination - changeset is draft on destination. As all this is experimental, bike shedding can happily happens before we remove the experimental flag.
-
Pierre-Yves David authored
Extensions currently have no easy way to add data to exported patch. This is now fixed using a generic mechanism in the same fashion used by bundle2. Tests are coming in the next changeset with its first user.
-
- Oct 05, 2015
-
-
Pierre-Yves David authored
Incoming was using bundle1 in all cases, as bundle1 is restricted to changegroup1 and does not support general delta, this can lead to significant CPU overhead if the server is using general delta storage. We now properly request and store a bundle2 to disk. If the server include any output or error in the bundle, they will be stored on disk and replayed when the bundle is read. As 'hg incoming' is going to read the bundle right away, we call that 'good' enough and go back to the bigger plan of having general delta on by default. This was tracked as 4864
-
Pierre-Yves David authored
We are about to add a new condition. Code is indented in a separated patch for readability.
-
- Oct 08, 2015
-
-
Pierre-Yves David authored
There is use case for directly forward and bundle2 stream from the peer to a file (eg: 'hg incoming --bundle'), However ssh peers have no way to know the 'getbundle' is over except for actually interpreting the bundle. So we need to have the unbundle do the interpreting and forward job. The function is marked as private to highlight that this is terrible and that we are sorry.
-
- Oct 05, 2015
-
-
Pierre-Yves David authored
We want to introduce a simple way to forward the content of a bundle2 stream. For this purpose, we will need to both yield the parameters block and process it (to apply any behavior change it might indicate).
-
Pierre-Yves David authored
The current writebundle function do two things: - taking a changegroup-packer instance and storing it into a valid bundle with proper header. - creating a temporary or requested file to store that bundle We would like to make it easier to forward bundle stream directly from a remote peer to a file, so we split the two logic to be able to skip the one about building a valid bundle (the remote is already sending one).
-
Pierre-Yves David authored
We were reading the wrong key...
-
- Oct 07, 2015
-
-
Yuya Nishihara authored
This is what branch() and tag() do.
-
Yuya Nishihara authored
If "literal:" is specified, it must not be a revset expression. It should error out with a better message.
-
Gijs Kruitbosch authored
When users configure the default foreground or background color to non-default (black on white) values, several hgweb styles lack contrast for headers and table row items. This patch fixes that by ensuring that where either foreground or background colors are specified, both are specified.
-
- Oct 05, 2015
-
-
Pierre-Yves David authored
We can safely drop this because the very same assignment is enforcement later in the function. Dropping it will make it simpler to extract the default destination logic in its own function.
-
- Oct 02, 2015
-
-
Pierre-Yves David authored
As bundle1 does not support generaldelta, this would mean recomputing delta at bundle time. This is similar to what we do for strip and shelve and was tracked as issue4865.
-
Pierre-Yves David authored
-
Pierre-Yves David authored
We had some basic undocumented support for uncompressed bundle2 support. We now have an official extensible syntax to specify both format type and compression (eg: bzip2-v2). In practice, this changeset introduce the 'v1' and 'v2' identifier to make it possible to combine format and compression. The default format is still 'v1'. We'll care about picking 'v1' or 'v2' in regard with general delta in the next changesets.
-
- Oct 07, 2015
-
-
Gijs Kruitbosch authored
While here, remove an old gecko-specific property, as gecko has supported the unprefixed version for many years.
-
- Oct 08, 2015
-
-
Siddharth Agarwal authored
This is much simpler, and also avoids unnecessary disk IO.
-
Siddharth Agarwal authored
This has no visible impact but makes some future work simpler.
-
Siddharth Agarwal authored
We're going to need this same tuple elsewhere.
-
- Oct 07, 2015
-
-
Siddharth Agarwal authored
trymerge = False becomes mergetype = nomerge, and trymerge = True becomes mergetype = fullmerge or mergeonly, depending on whether a premerge happens.
-
Siddharth Agarwal authored
We're going to turn the 'trymerge' boolean into a 'mergetype' enum with these three possible values.
-
Katsunori FUJIWARA authored
Before this patch, "hg unshelve" uses aborting a current transaction to discard temporary changes while unshelving. This assumes that dirstate changes in a transaction scope are kept even after aborting it. But this assumption will be broken by "transactional dirstate". See the wiki page below for detail about it. https://mercurial.selenic.com/wiki/DirstateTransactionPlan This patch explicitly saves shelved dirstate just before aborting current transaction, and restore dirstate with it after aborting by utility function '_aborttransaction()' added by previous patch.
-
Katsunori FUJIWARA authored
Before this patch, "hg shelve" uses aborting a current transaction to discard temporary changes while shelving. This assumes that dirstate changes in a transaction scope are kept even after aborting it. But this assumption will be broken by "transactional dirstate". See the wiki page below for detail about it. https://mercurial.selenic.com/wiki/DirstateTransactionPlan This patch explicitly saves shelved dirstate just before aborting current transaction, and restore dirstate with it after aborting by utility function '_aborttransaction()' added by previous patch. This patch replaces 'if tr: tr.abort()' by 'lockmod.release(tr)', because the former is already done in '_aborttransaction()' (and the latter has no effect), if current transaction is aborted in it successfully. Otherwise, the latter is enough to trigger aborting.
-
Katsunori FUJIWARA authored
"hg shelve" and "hg unshelve" use aborting a current transaction to discard temporary changes while (un)shelving. This assumes that dirstate changes in a transaction scope are kept even after aborting it. But this assumption will be broken by "transactional dirstate". See the wiki page below for detail about it. https://mercurial.selenic.com/wiki/DirstateTransactionPlan This patch adds utility function "_aborttransaction()" to abort current transaction but keep dirstate changes for (un)shelving. 'dirstate.invalidate()' just after aborting a transaction should be removed soon by subsequent patch, which writes or discards in-memory dirstate changes at releasing transaction according to the result of it. BTW, there are some other ways below, which (seem to, at first glance) resolve this issue. But this patch chose straightforward way for ease of review and future refactorring. - commit transaction at first, and then rollback it It causes unintentional "dirty read" of running transaction to other processes at committing it. - use dirstateguard to save and restore shelved dirstate After DirstateTransactionPlan, making 'dirstate.write()' write in-memory changes into actual file requires 'transaction.writepending()' while transaction running. It causes meaningless writing other in-memory changes out, even though they are never referred. In addition to it, it isn't desirable that scope of dirstateguard and transaction intersects each other. - get list of files changed from the parent, keep it in memory, and emulate that changes after aborting transaction This additional memory consumption may block aborting transaction in large repository (on small resource environment).
-
Katsunori FUJIWARA authored
'_writedirstate()' is used mainly for "transactional dirstate". See the wiki page below for detail about it. https://mercurial.selenic.com/wiki/DirstateTransactionPlan
-