- 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.
-
- Oct 08, 2015
-
-
Matt Mackall authored
-
- Oct 02, 2015
-
-
Pierre-Yves David authored
patchbomb relies on the 'hg bundle' command to generate an attached bundle using --bundle. However, while 'hg bundle' has a --type option, patchbomb did not. This is becoming very relevant since we are about to issue bundle2 for general-delta repository. This was tracked as issue4863
-
- Oct 07, 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 point to do extra work after the import have been committed.
-
- 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.
-