- Oct 08, 2015
-
-
Mads Kiilerich authored
d3908c911d5e introduced nice hexified display of missing nodes. It did however also make missing 20 character revision specifications be shown as hex - very confusing. Users are often wrong and somehow specify revisions that don't exist. Nodes will however rarely be missing ... and they will only look like a user provided revision specification and be all ascii in 1 of 4*10**9. With this change, missing revisions will only be hexified if they really look like binary nodes. This change will thus improve the error reporting UI in the common case and only very rarely make it confusing in the opposite direction of how it was before.
-
- Oct 12, 2015
-
-
Pierre-Yves David authored
Having the simple and tiny branch of the conditional first help readability. The "else" that appears after a screen of code is harder to relate to a conditional.
-
- Oct 09, 2015
-
-
Pierre-Yves David authored
That function is actually not returning public ancestors at all. This is pointed by the second line of the docstring... The bundling behavior was made correct in a5141977198d but with confusion remaining regarding what each function was doing. This close issue4737, because this highlight that shelve is actually -not- bundling too much data (this was actually properly tested).
-
Nathan Goldbaum authored
-
Nathan Goldbaum authored
This should allow easier experimentation with using setuptools in mercurial's build automation, without breaking anything that currently depends on distutils behavior
-
- Oct 12, 2015
-
-
Gijs Kruitbosch authored
-
Anton Shestakov authored
For reference, this was added to paper/coal in bb00a159e594 and to gitweb in b3b57ecbda50.
-
- Oct 09, 2015
-
-
Pierre-Yves David authored
We extend the comment about this code flaw with more code flaw.
-
Pierre-Yves David authored
The idea here is that the code is imperfect, not that it is impossible to get something behaving properly.
-
Pierre-Yves David authored
The current setup requires to pass both a packer and, optionally, the version of the unpacker. This is confusing and error prone as the two value cannot mismatch. Instead, we simply grab the version from the packer. This fixes a bug where requesting a cg2 from 'hg bundle' were reported as changegroup 1. I should have caught that in the initial changeset but I missed it somehow.
-
- Oct 12, 2015
-
-
Emanuele Giaquinta authored
This change makes the test pass on gcc112.fsffrance.org.
-
- Oct 07, 2015
-
-
Emanuele Giaquinta authored
cvsps computes the parent revisions of log entries by walking the cvs log sorted by (rcs, revision) and by iteratively maintaining a 'versions' dictionary which maps a (rcs, branch) pair onto the last revision seen for that pair. When log caching is on and a log cache exists, cvsps fails to set the parent revisions of new log entries because it does not iterate over the log cache in the parents computation. A complication is that a file rcs can change (move to/from the attic), with respect to its value in the log cache, if the file is removed/added back. This patch adds an iteration over the log cache to update the rcs of cached log entries, if changed, and to properly populate the 'versions' dictionary.
-
- Oct 06, 2015
-
-
Matt Mackall authored
This makes it more interruptible.
-
- Oct 11, 2015
-
-
Yuya Nishihara authored
The issue4888 was caused by 0-length obsolete marker. If msize is zero, fm1readmarkers() never ends. This patch adds several bound checks to fm1readmarker(). Therefore, 0-length and invalid-size marker should be rejected.
-
Yuya Nishihara authored
This will make it easy to implement bound checking. Currently fm1readmarker() has no protection for corrupted obsstore and can cause infinite loop or out-of-bound reads.
-
- Oct 08, 2015
-
-
Siddharth Agarwal authored
This isn't really a big deal because the temp files are created in $TMPDIR, but it makes some upcoming work simpler.
-
Pierre-Yves David authored
We have seen the light, please use the new way.
-
Pierre-Yves David authored
The home of 'Abort' is 'error' not 'util' however, a lot of code seems to be confused about that and gives all the credit to 'util' instead of the hardworking 'error'. In a spirit of equity, we break the cycle of injustice and give back to 'error' the respect it deserves. And screw that 'util' poser. For great justice.
-
- Oct 06, 2015
-
-
Pierre-Yves David authored
The variable 'error' conflict with the module name that we would like to import and use in a coming changeset.
-
Pierre-Yves David authored
The variable 'error' conflict with the module name that we would like to import and use in a coming changeset.
-
- Oct 05, 2015
-
-
Christian Delahousse authored
When an user aborts a histedit, many things could go wrong. At a minimum, after a histedit abort failure, their repository should be out of that state. We've found situations where the user could not exit the histedit state without manually deleting the histedit state file. This patch ensures that if any exception happens during an abort, the histedit statefile will be deleted so that users are out of the histedit state and can at least manually get the repo back to a workable condition.
-
- Oct 06, 2015
-
-
Christian Delahousse authored
When the histeditstate class instance has it's clear() method called, there is nothing to check to see if the state file exists before deleting it. It may not exist, which would create an exception. This patch allows clear to be called at any time. This will be needed for the following patch.
-
- Oct 05, 2015
-
-
Christian Delahousse authored
If a histedit is progress, the 'histedit-state' file should exist. The patch implements a convenience function to do check if a histedit is in progress. This method will be use in next patch in the series.
-
- Oct 08, 2015
-
-
Katsunori FUJIWARA authored
Before this patch, "hg backout" uses 'begin'/'end'-'parentchange()' of 'dirstate' class to avoid writing incomplete dirstate changes out at failure. But this framework doesn't work as expected, if 'dirstate.write()' is invoked between them. In fact, in-memory dirstate changes may be written out at 'repo.status()' implied by 'merge.update()', even before this patch. To restore dirstate as expected at failure of "hg backout", this patch uses 'dirstateguard' instead of 'begin'/'end'-'parentchange()'.
-
Katsunori FUJIWARA authored
Previous patch made dirstate changes in a transaction scope "all or nothing". Therefore, 'dirstateguard' is meaningless, if its scope is as same as one of the related transaction. Before this patch, "hg import" uses 'dirstateguard' always, but transaction is also started if '--no-commit' isn't specified. To avoid redundancy, this patch makes "hg import" use dirstateguard only if transaction isn't started (= '--no-commit' is specified). In this patch, 'if dsguard' can be examined safely, because 'dsguard' is initialized (with None) before outermost 'try'.
-
Katsunori FUJIWARA authored
There is no user of 'cmdutil.tryimportone()' other than 'commands.import_()', which can restore dirstate at failure of applying patches by transaction or dirstateguard. Therefore, it is reasonable to stop 'tryimportone()' from using redundant 'dirstateguard', even though it changes behavior of 'tryimportone()'. After this patch, 3rd party extensions should use 'dirstateguard' or so explicitly, if they want to restore dirstate at failure of importing a patch.
-
Katsunori FUJIWARA authored
Previous patch made dirstate changes in a transaction scope "all or nothing". Therefore, 'dirstateguard' is meaningless, if its scope is as same as one of the related transaction. This patch removes such meaningless 'dirstateguard' usage.
-
Katsunori FUJIWARA authored
Before this patch, in-memory dirstate changes are still kept over a transaction scope boundary regardless of the result of it. For "all or nothing" policy of the transaction, in-memory dirstate changes should be: - written out at successful closing a transaction, because subsequent 'dirstate.invalidate()' can lose them - discarded at failure of a transaction, because outer 'wlock.release()' or so may write them out To discard all changes in a transaction completely, this patch also restores '.hg/dirstate' by '.hg/journal.dirstate' at failure, because 'transaction' itself does nothing for files related to '.hg/journal.*' in such case (therefore, renaming in this patch is safe enough). This is a part of preparations for "transactional dirstate". See also the wiki page below for detail about it. https://mercurial.selenic.com/wiki/DirstateTransactionPlan This patch also removes redundant 'dirstate.invalidate()' just before aborting a transaction for shelve/unshelve.
-
Katsunori FUJIWARA authored
'releasefn' is used by subsequent patch, to do appropriate action according to the result of it at the end of a transaction scope. To ensure that 'releasefn' is invoked only once, this patch invokes it after assignment 'self.journal = None', because such assignment prevents from invoked 'transaction._abort()' again via '__del__()'. def __del__(self): if self.journal: self._abort()
-
Siddharth Agarwal authored
This makes the overall filemerge function easier to follow, and makes upcoming work simpler.
-
Siddharth Agarwal authored
Cleanup from an earlier patch to make premerge be directly called from the main filemerge function.
-
Siddharth Agarwal authored
Cleanup from an earlier patch to make premerge be directly called from the main filemerge function.
-
Siddharth Agarwal authored
Cleanup from an earlier patch to make premerge be directly called from the main filemerge function.
-
- Oct 05, 2015
-
-
Pierre-Yves David authored
The revset is not used anywhere anymore. We delete the function until we use (and therefore test it again).
-
- Sep 29, 2015
-
-
Pierre-Yves David authored
There is no value in using the revset instead of the extracted function.
-
- Oct 05, 2015
-
-
Pierre-Yves David authored
We ultimately want this to be accessible through a revset, but there is too much complexity here for that to work. Especially we'll have to return more than just the destination to control the behavior (eg: bookmarks to activate, etc). To prevent cycle, a new module is created, it will receive other destination/behavior function in the future.
-
- Oct 08, 2015
-
-
Gregory Szorc authored
This is a backout of d29859cfcfc2. The stdlib implementation of multiprocessing.cpu_count() attempts to invoke a process on BSD and Darwin platforms (at least on 2.7). Under certain conditions (such as cwd being removed) this could raise. Our old code was silently catching the exception. The old code was more robust, so restore it.
-
Siddharth Agarwal authored
The merge code currently does (in pseudocode): for f in tomerge: premerge f merge f We'd like to change this to look more like: for f in tomerge: premerge f for f in tomerge: merge f This makes sure as many files are resolved as possible before prompting for the others. This restructuring is also necessary for custom merge drivers. This function separates out the premerge step from the merge step. In future patches we'll actually turn these into separate steps in the merge driver. The 'if r:' occurrences will be cleaned up in subsequent patches.
-
- Oct 05, 2015
-
-
Durham Goode authored
In the external pushrebase extension, it is valuable to be able to do some work without taking the lock (like running expensive hooks). This enables significantly higher commit throughput. This patch adds an option to lazily acquire the lock. It means that all bundle2 part handlers that require writing to the repo must first call op.gettransction(), when in this mode.
-
- Oct 06, 2015
-
-
Durham Goode authored
A future patch will allow the bundle2 lock be taken lazily. We need to introduce transaction-gets to each handler that needs the lock. The tests caught these issues when I added lazy locking.
-