- 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
-
Katsunori FUJIWARA authored
Before this patch, 'bmstore.write()' always write in-memory bookmark changes into '.hg/bookmarks' regardless of transaction activity. If 'bmstore.write()' is invoked inside a transaction and it writes changes into '.hg/bookmarks', then: - original bookmarks aren't restored at failure of that transaction This breaks "all or nothing" policy of the transaction. BTW, "hg rollback" can restore bookmarks successfully even before this patch, because original bookmarks are saved into '.hg/journal.bookmarks' at the beginning of the transaction, and it (actually renamed as '.hg/undo.bookmarks') is used by "hg rollback". - uncommitted bookmark changes are visible to other processes This is a kind of "dirty read" For example, 'rebase.rebase()' implies 'bmstore.write()', and it may be executed inside the transaction of "hg unshelve". Then, intentional aborting at the end of "hg unshelve" transaction doesn't restore original bookmarks (this is obviously a bug). This patch uses 'bmstore.recordchange()' instead of actual writing by 'bmstore._writerepo()', if any transaction is active This patch also removes meaningless restoring bmstore explicitly at the end of "hg shelve". This patch doesn't choose fixing each 'bmstore.write()' callers as like below, because writing similar code here and there is very redundant. before: bmstore.write() after: tr = repo.currenttransaction() if tr: bmstore.recordchange(tr) else: bmstore.write() Even though 'bmstore.write()' itself may have to be discarded by putting bookmark operations into transaction scope, this patch chose fixing it to implement "transactional dirstate" at first.
-
Siddharth Agarwal authored
Just like :merge, :merge3 doesn't support merging symlinks.
-
Siddharth Agarwal authored
Earlier we'd print ':merge' even if the tool was something else like ':union'. That's clearly a bug.
-
Siddharth Agarwal authored
In upcoming patches we're going to present these names in the UI -- it would be good not to present deprecated names.
-
Siddharth Agarwal authored
This exposes a couple of bugs, both of which will be fixed in upcoming patches.
-
Siddharth Agarwal authored
This will be used by internal merge tools.
-
Siddharth Agarwal authored
In upcoming patches we'll define a precheck function for some merge tools.
-
Siddharth Agarwal authored
We're going to separate the pre-merge and merge steps for merge tools. The merge step will be specific to the tool, but the pre-merge step will be common to all merge tools that need it. However, some merge tools run checks *before* the pre-merge step. This callback will allow that to continue to work.
-
Siddharth Agarwal authored
This will make upcoming patches much easier to review.
-
- Oct 02, 2015
-
-
Pierre-Yves David authored
We now have a convenient command to look at bundle contents, let's use it.
-
Pierre-Yves David authored
We are going to introduce significant extensions of the bundle parsing code to support creation of bundle2 through the bundle command. As an early step, we extract the logic in its own function.
-
Pierre-Yves David authored
For some obscure reasons (probably upsetting a Greek goddess), getchangegroup did not had a 'version' argument to control the changegroup version. We fixes this to allow cg02 to be used with 'hg bundle' in the future.
-
Pierre-Yves David authored
For some obscure reasons (probably upsetting a Greek goddess), getlocalchangegroup did not have a 'version' argument to control the changegroup version. We fix this to allow cg02 to be used with 'hg bundle' in the future.
-
- Oct 01, 2015
-
-
Pierre-Yves David authored
This will prevent expensive delta computation on bundling and is similar to what we do for strip backup.
-
Pierre-Yves David authored
We will generate different changegroup if general delta is enabled so we gather this in the lower level function. There wasn't any good reason to have it in the main code anyway.
-
- Sep 30, 2015
-
-
Pierre-Yves David authored
Shelve is using 'HG10UN' bundle for no obvious reason. Changing this to 'HG10BZ' as we do for other bundle stored on disk.
-
- Oct 07, 2015
-
-
Matt Mackall authored
-
- Oct 05, 2015
-
-
Bruce Cran authored
Set the author field in notification emails for the 'incoming' hook type in addition to 'changegroup' and 'outgoing' types.
-
Matt Harbison authored
The function isn't documented to work with negative values at all, but it does, which can be useful. However, the range check didn't account for this.
-
- Oct 02, 2015
-
-
Siddharth Agarwal authored
We're going to be extending the merge state very soon, and this will give us a way to test all that.
-
- Oct 01, 2015
-
-
Siddharth Agarwal authored
We're going to need this in another place in upcoming patches.
-
- Oct 06, 2015
-
-
Siddharth Agarwal authored
Review feedback from Pierre-Yves David. A separate line of work is working to ensure that dirstate writes are written to a separate 'pending' file while a transaction is active. Lock inheritance currently conflicts with that, so dodge the issue by simply preventing inheritance while a transaction is running. Custom merge drivers aren't going to run inside a transaction, so this doesn't affect that.
-
Siddharth Agarwal authored
We want to prevent locks from being inherited sometimes (e.g. when there's a currently running transaction, which will break a lot of assumptions we're making in here.)
-
Siddharth Agarwal authored
This is annoying to keep up to date, and also just plain unnecessary.
-
timeless authored
-
timeless authored
Users unfamiliar with an extension should be reading the documentation for the feature, not the command.
-
timeless authored
-
- Oct 04, 2015
-
-
Yuya Nishihara authored
Because st.st_mtime is computed as 'sec + 1e-9 * nsec' and double is too narrow to represent nanoseconds, int(st.st_mtime) can be 'sec + 1'. Therefore, that value could be different from the one got by osutils.listdir(). This patch fixes the problem by accessing to raw st_mtime by tuple index. It catches TypeError to fall back to st.st_mtime because our osutil.stat does not support tuple index. In dirstate.normal(), 'st' is always a Python stat, but in dirstate.status(), it can be either a Python stat or an osutil.stat. Thanks to vgatien-baron@janestreet.com for finding the root cause of this subtle problem.
-
Yuya Nishihara authored
This function is trivial but will need a long comment why it can't use st.st_mtime. See the next patch for details.
-
- Oct 05, 2015
-
-
Siddharth Agarwal authored
This is part of a series that will allow locks to be inherited by subprocesses in limited circumstances. In the future, we'll call this for custom merge drivers.
-
Siddharth Agarwal authored
This is part of a series that will allow locks to be inherited by subprocesses in limited circumstances. In an upcoming patch, we'll add an API for the wlock to be inherited.
-
Siddharth Agarwal authored
This will be useful to pass around a reference to the lock to some functions we're going to add to scmutil. We don't want those functions to live in localrepo to avoid bloat.
-
Siddharth Agarwal authored
We'll use this in upcoming patches to return a reference to the wlock if it's held.
-
- Sep 24, 2015
-
-
timeless authored
fixed by a2291c9c85a1
-