- Oct 16, 2015
-
-
Katsunori FUJIWARA authored
Before this patch, external editor process for the commit log can't view some in-memory changes (especially, of dirstate), because they aren't written out until the end of transaction (or wlock). This causes unexpected output of Mercurial commands spawned from that editor process. To make in-memory changes visible to external editor process, this patch does: - write (or schedule to write) in-memory dirstate changes, and - set HG_PENDING environment variable, if: - a transaction is running, and - there are in-memory changes to be visible "hg diff" spawned from external editor process for "hg qrefresh" shows: - "changes newly imported into the topmost" before 49148d7868df(*) - "all changes recorded in the topmost by refreshing" after this patch (*) 49148d7868df changed steps invoking editor process Even though backward compatibility may be broken, the latter behavior looks reasonable, because "hg diff" spawned from the editor process consistently shows "what changes new revision records" regardless of invocation context. In fact, issue4378 itself should be resolved by 800e090e9c64, which made 'repo.transaction()' write in-memory dirstate changes out explicitly before starting transaction. It also made "hg qrefresh" imply 'dirstate.write()' before external editor invocation in call chain below. - mq.queue.refresh - strip.strip - repair.strip - localrepository.transaction - dirstate.write - localrepository.commit - invoke external editor Though, this patch has '(issue4378)' in own summary line to indicate that issues like issue4378 should be fixed by this. BTW, this patch adds '-m' option to a 'hg ci --amend' execution in 'test-commit-amend.t', to avoid invoking external editor process. In this case, "unsure" states may be changed to "clean" according to timestamp or so on. These changes should be written into pending file, if external editor invocation is required, Then, writing dirstate changes out breaks stability of test, because it shows "transaction abort!/rollback completed" occasionally. Aborting after editor process invocation while commands below may cause similar instability of tests, too (AFAIK, there is no more such one, at this revision) - commit --amend - without --message/--logfile - import - without --message/--logfile, - without --no-commit, - without --bypass, - one of below, and - patch has no description text, or - with --edit - aborting at the 1st patch, which adds or removes file(s) - if it only changes existing files, status is checked only for changed files by 'scmutil.matchfiles()', and transition from "unsure" to "normal" in dirstate doesn't occur (= dirstate isn't changed, and written out) - aborting at the 2nd or later patch implies other pending changes (e.g. changelog), and always causes showing "transaction abort!/rollback completed"
-
Katsunori FUJIWARA authored
This is used to detect 'dirstate.write()' invocation without the value gotten by 'repo.currenttransaction()' (mainly focused on 3rd party extensions).
-
Katsunori FUJIWARA authored
Now, 'dirstate.write(tr)' delays writing in-memory changes out, if a transaction is running. This may cause treating this revision as "the first bad one" at bisecting in some cases using external hook process inside transaction scope, because some external hooks and editor process are still invoked without HG_PENDING and pending changes aren't visible to them. 'dirstate.write()' callers below in localrepo.py explicitly use 'None' as 'tr', because they can assume that no transaction is running: - just before starting transaction - at closing transaction, or - at unlocking wlock
-
Katsunori FUJIWARA authored
This violation, which passes repo object to dirstate, was introduced by 09bb1ee7e73e. This patch uses 'False' instead of 'None' as default value of 'tr' argument, to distinguish "None as repo.currenttransaction() result" from "legacy invocation without explicit tr passing".
-
Katsunori FUJIWARA authored
This violation, which passes 'repo' object to dirstate, was introduced by 59b5e8844eb0 and 020b12d591f3.
-
- Oct 15, 2015
-
-
Christian Delahousse authored
Refactoring by reduce the scope of the try catch block so that it only captures what it needs. I could have made it smaller but another patch in the series will add onto it.
-
Christian Delahousse authored
When a user's repository is in an unfinished rebase state and they choose to abort, at a minimum, the repo should be out of that state. We've found situations where the user could not leave the state unless manually deleting the rebasestate file. This fix ensures that no matter what exception may be raised during the abort, the rebase state file will be deleted, the user will be out of the rebase state and they can get their repository into a workable condition.
-
- Oct 16, 2015
-
-
Christian Delahousse authored
This fix adds a caret to the start of the regex looking for merge markers. This avoids the issue arises when you've real merge conflicts in a file that tests for the existance of merge markers in test output. Editmerge will not open on the fake/tested merge markers because they'll be indented in.
-
- Oct 10, 2015
-
-
Tony Tung authored
If a committemplate is provided and no message is provided on the command line, and no edits are made to the commit template, then abort the commit.
-
- Oct 14, 2015
-
-
Siddharth Agarwal authored
This code will not currently be activated because there's no code to mark files as driver-resolved in core. This point is also somewhat hard to plug into from extensions.
-
Siddharth Agarwal authored
Just like for unresolved files above, we need to be able to tell what files are driver-resolved.
-
Siddharth Agarwal authored
The hook code treats python hooks raising an exception and returning True as the exact same. This is OK for hooks themselves, but other code that wants to invoke external code using the same underlying code is a bit more interested in making a distinction.
-
Siddharth Agarwal authored
This will be useful to other calling code that would be interested in what the individual hooks return.
-
Siddharth Agarwal authored
This will allow other code to run a predetermined series of hooks.
-
- Mar 10, 2015
-
-
kiilerix authored
Avoid the pointless numeric rev.diff patch names. Instead, do like mbox extension does and create meaningful patch names.
-
- Oct 15, 2015
-
-
Mads Kiilerich authored
-
Mads Kiilerich authored
-
- Oct 16, 2015
-
-
Mads Kiilerich authored
-
- Oct 15, 2015
-
-
Gregory Szorc authored
We don't appear to print error codes elsewhere. The error codes are inconsistent between at least Linux and OS X and are more trouble than they are worth. Humans care about the error string more than the code anyway. A glob was also added to pave over differences in error strings between Linux and OS X.
-
- Oct 14, 2015
-
-
Augie Fackler authored
-
Augie Fackler authored
Very often in my life I'm finding that the only configured merge tool present on the system is vimdiff[0], and it's currently impossible (as far as I can tell) short of specifying `ui.merge = `[1] to actually *disable* a merge tool. This allows vimdiff-haters to put: [merge-tools] vimdiff.disable = yes in their ~/.hgrc and never see vimdiff again. I'm stopping short of putting this as a commented out entry in the sample new user hgrc (seen when a user runs `hg config --edit` with no ~/.hgrc) for now, but I might come back and do that later. 0: vimdiff is at an awkward intersection: it's usually installed by the vim package which is often installed as a vi substitute, so it's mere presence doesn't imply me wanting it, unlike (say) kdiff3. 1: There's a related problem I ran into today where specifying `ui.merge = :merge` failed because :merge isn't a command, which I think is a regression. I'll try and figure that out and at least file a bug.
-
Sean Farley authored
-
- Oct 15, 2015
-
-
Pierre-Yves David authored
One of the main goal of having consolidated destination function is to allow extension to play with this logic. We extract sub logic to make is wrapping more practical.
-
Pierre-Yves David authored
One of the main goal of having consolidated destination function is to allow extension to play with this logic. We extract sub logic to make is wrapping more practical.
-
Pierre-Yves David authored
We want extension to be able to easily override or add new way to select the default update destination. We use the same list + dict approach as in other parts of the code.
-
Pierre-Yves David authored
One of the main goal of having consolidated destination function is to allow extension to play with this logic. We extract sub logic to make is wrapping more practical.
-
Pierre-Yves David authored
One of the main goal of having consolidated destination function is to allow extension to play with this logic. We extract sub logic to make is wrapping more practical.
-
Pierre-Yves David authored
One of the main goal of having consolidated destination function is to allow extension to play with this logic. We extract sub logic to make is wrapping more practical.
-
Pierre-Yves David authored
This block was overwriting any result from the previous block anyway. So we move it first to prove it is possible and we'll extract it in its own function in the next patch.
-
Pierre-Yves David authored
We'll move the obsolete related logic first (as it is overwriting any other anyway) to make the next patch clearer we add indentation in this one.
-
Pierre-Yves David authored
One of the main goal of having consolidated destination function is to allow extension to play with this logic. We extract sub logic to make is wrapping more practical.
-
Pierre-Yves David authored
We make the name consistent with the other similar revsets and make sure it has minimal tests.
-
Pierre-Yves David authored
There is little value in using the revset instead of the function.
-
Pierre-Yves David authored
This makes it much simple to wrap for other extension.
-
Pierre-Yves David authored
We make the name consistent with the one used by '_destupdate' and we ensure the code is run by testing it (abort is expected and merge would).
-
Pierre-Yves David authored
There is no real value in using the revset over the function. The revset have no remaining users and will be taken care of in a later changesets.
-
Pierre-Yves David authored
Function in destutil are much simpler to wrap and more flexible than revset. This also help consistency as 'destupdate' live here and cannot become a pure revset anyway.
-
Pierre-Yves David authored
The revset is not ready for prime time yet. However it is useful to have some version of it exposed to help candidate users to play with it and provide feedback on what we should aim at. We add a small test to make sure the code runs.
-
- Oct 14, 2015
-
-
Augie Fackler authored
The upcoming cg3 will need different logic for unpacking manifests.
-
- Oct 01, 2015
-
-
Augie Fackler authored
A future change will introduce a new function on a cg3packer that can pack treemanifests as well as flatmanifests.
-