- Jun 01, 2015
-
-
Katsunori FUJIWARA authored
-
- May 29, 2015
-
-
Durham Goode authored
The --keep option was being serialized to the state file, but it wasn't actually being used when running a histedit --continue. This fixes that.
-
- May 27, 2015
-
-
Matt Mackall authored
Mercurial uses tags of null to mark deletions, but convert was silently discarding these because it had no mapping for them. Thus, it was resurrecting deleted tags.
-
- May 26, 2015
-
-
Pierre-Yves David authored
The fix in fd905b2bea59 is actually wrong. We now use the filename to match what '_addentry'. This whole untested code is quite suspicious. This seems to point that no one is ever running 'tr.find' for a backup file.
-
Matt Mackall authored
checkcopies was using fctx.rev() which it was expecting would be equivalent to linkrev() but was triggering the new _adjustlinkrev path. This was making grafts and merges with large sets of potential copies very expensive.
-
- May 24, 2015
-
-
Katsunori FUJIWARA authored
Before this patch, hook argument `txnid` isn't passed to `pretxnopen` hooks, even though `hooks` section of `hg help config` describes so. ``pretxnopen`` Run before any new repository transaction is open. The reason for the transaction will be in ``$HG_TXNNAME`` and a unique identifier for the transaction will be in ``HG_TXNID``. A non-zero status will prevent the transaction from being opened.
-
Katsunori FUJIWARA authored
Before this patch, transaction ID (TXNID) is calculated from `transaction` object itself by `id()`, but this prevents TXNID from being passed to `pretxnopen` hooks, which should be executed before starting transaction processing (also any preparations for it, like writing journal files out). As a preparation for passing TXNID to `pretxnopen` hooks, this patch separates calculation of TXNID from creation of `transaction` object. This patch uses "random" library for reasonable unique ID. "uuid" library can't be used, because it was introduced since Python 2.5 and isn't suitable for Mercurial 3.4.x stable line. `%f` formatting for `random.random()` is used with explicit precision number 40, because default precision for `%f` is 6. 40 should be long enough, even if 10**9 transactions are executed in a short time (a second or less). On the other hand, `time.time()` is used to ensures uniqueness of TXNID in a long time, for safety. BTW, platform not providing `/dev/urandom` or so may cause failure of `import random` itself with some Python versions (see Python issue15340 for detail http://bugs.python.org/issue15340). But this patch uses "random" without any workaround, because: - "random" is already used directly in some code paths, - such platforms are very rare (e.g. Tru64 and HPUX), and http://bugs.python.org/issue15340#msg170000 - updating Python runtime can avoid this issue
-
- May 23, 2015
-
-
Yuya Nishihara authored
This fixes the crash caused by "branch(null)" revset. No cache should be necessary for nullrev because changelog.branchinfo(nullrev) does not involve IO operation. Note that the problem of "branch(wdir())" isn't addressed by this patch. "wdir()" will raise TypeError in many places because of None. This is the reason why "wdir()" is still experimental.
-
- May 24, 2015
-
-
Yuya Nishihara authored
This patch partially backs out d2de20e1451f and adds an alternative workaround to functions that evaluate "null" and "wdir()". Because the new workaround is incomplete, "first(null)" and "min(null)" don't work as expected. But they were not usable until 3.4 and "null" isn't commonly used, we can postpone a complete fix for 3.5. The issue4682 was caused because "branch(default)" is evaluated to "<filteredset <fullreposet>>", keeping fullreposet magic. The next patch will fix crash on "branch(null)", but without this patch, it would make "null in <branch(default)>" be True, which means "children(branch(default))" would return all revisions but merge (p2 != null). I believe the right fix is to stop propagating fullreposet magic on filter(), but it wouldn't fit to stable release. Also, we should discuss how to handle "null" and "wdir()" in revset before.
-
- May 22, 2015
-
-
Pierre-Yves David authored
The 'file' variable was undefined but resolved to the 'file' built-in. This is why pylint complains about overwriting built-ins...
-
Wagner Bruna authored
-
- May 19, 2015
-
-
Katsunori FUJIWARA authored
Before this patch, "the reason for the transaction" is passed to `pretxnclose` hooks via wrong name argument `xnname` (`HG_XNNAME` for external hooks)
-
Katsunori FUJIWARA authored
From the first (3.4 or d283517b260b), `TXNID` is passed to Python hooks without lowering its name, but it is wrong.
-
- May 18, 2015
-
-
Matt Harbison authored
The files command supports naming directories to limit the output to children of that directory, and it also supports -S to force recursion into a subrepo. But previously, using -S and naming a subrepo caused nothing to be output. The reason was narrowmatcher() strips the current subrepo path off of each file, which would leave an empty list if only the subrepo was named. When matching on workingctx, dirstate.matches() would see the submatcher is not always(), so it returned the list of files in dmap for each file in the matcher- namely, an empty list. If a directory in a subrepo was named, the output was as expected, so this was inconsistent. The 'not anypats()' check is enforced by an existing test around line 140: $ hg remove -I 're:.*.txt' sub1 Without the check, this removed all of the files in the subrepo.
-
- May 17, 2015
-
-
Matt Harbison authored
Previously, the first added test printed the following: $ hg files -S -r '.^' sub1/sub2/folder sub1/sub2/folder: no such file in rev 9bb10eebee29 sub1/sub2/folder: no such file in rev 9bb10eebee29 sub1/sub2/folder/test.txt One warning occured each time a subrepo was crossed into. The second test ensures that the matcher copy stays in place. Without the copy, the bad() function becomes an increasingly longer chain, and no message would be printed out for a file missing in the subrepo because the predicate would match in one of the replaced methods. Manifest doesn't know anything about subrepos, so it needs help ignoring subrepos when complaining about bad files.
-
- May 19, 2015
-
-
Pierre-Yves David authored
I just discovered that we are not displaying ssh server output in real time anymore. So we can just fall back to the bundle2 output capture for now. This fix the race condition issue we where seeing in tests. Re-instating real time output for ssh would fix the issue too but lets get the test to pass first.
-
- May 15, 2015
-
-
Tony Tung authored
After a rebase --abort, we attempt to restore the previously active bookmark. We need to ensure that the bookmark still exists.
-
Yuya Nishihara authored
Instead of keeping 'onlypost' as a method, this patch rewrites it to 'only' function. This way, 'x%' always has the same weight as 'only(x)'.
-
- May 10, 2015
-
-
Jordi Gutiérrez Hermoso authored
The check of the inrebase function was not correct, and it failed to consider the situation in which nothing has been rebased yet, *and* the working dir had been updated away from the initial revision. But this is easy to fix. Given the rebase state, we know exactly where we should be standing: on the first unrebased commit. We check that instead. I also took the liberty to rename the function, as "inrebase" doesn't really describe the situation: we could still be in a rebase state yet the user somehow forcibly updated to a different revision. We also check that we're in a merge state, since an interrupted merge is the only "safe" way to interrupt a rebase. If the rebase got interrupted by power loss or whatever (so there's no merge state), it's still safer to not blow away the working directory.
-
Jordi Gutiérrez Hermoso authored
The fix for issue4009, namely fe78eb7bcca0, introduced issue4661. Let's make sure that the fix for issue4661 will not reintroduce issue4009.
-
- May 08, 2015
-
-
Pierre-Yves David authored
Otherwise variable set for the real test run interfere with the test runner tests.
-
- May 01, 2015
-
-
Durham Goode authored
If histedit failed after all the rules were complete (for instance, if there was an exception in the cleanup phase), you couldn't --continue because it was unable to pop a rule. Let's just skip the rule execution phase of --continue if there are no more rules.
-
Durham Goode authored
If the histedit backupfile was None (like if evolve is enabled) it would get serialized as 'None' into the state file. Later if the histedit was aborted and the top most commit was unreachable (ex: if it was obsolete or stripped), histedit would try to unbundle the backupfile and try to read .hg/None. This fixes it to not serialize None. Since it only happens with evolve, I'm not sure how to add test coverage here.
-
- May 06, 2015
-
-
Yuya Nishihara authored
Since fdf7794be41d, column headers are wrapped by <thead> element, so the first and only <tbody> contains changelog data. I got the following error without this patch: Uncaught TypeError: Cannot read property 'lastElementChild' of null scrollHandler @ mercurial.js:375
-
Gregory Szorc authored
It was reported that enabling pager without color could cause a hang. Inserting print statements revealed that the callbacks in extensions._aftercallbacks were being invoked twice. extensions.loadall can be called multiple times. If entries in extensions._aftercallbacks linger between calls, this could result in double execution of the callbacks. This can lead to unwanted behavior. The reproduce steps in the bug seem to only occur when the output of a command is less than the size of the current screen. This is not something that can easily be tested. I verified the test case works with this patch and that pager and color interaction continues to work. Since we have no existing automated tests for pager, this sadly appears to be the best testing I can do.
-
- May 04, 2015
-
-
Yuya Nishihara authored
Because double backslashes are processed as a string escape sequence, '\\{' should start the template syntax. On the other hand, r'' disables any sort of \-escapes, so r'\{' can go either way, never start the template syntax or always start it. I simply chose the latter, which means r'\{' is the same as '\\{'.
-
Yuya Nishihara authored
This patch brings back pre-2.8.1 behavior. The result of parsestring() is stored in templater's cache, t.cache, and then it is parsed as a template string by compiletemplate(). So t.cache should keep an unparsed string no matter if it is sourced from config value. Otherwise backslashes would be processed twice. The test vector is borrowed from 64b4f0cd7336.
-
- May 05, 2015
-
-
Durham Goode authored
test-histedit-edit was broken because it relied on the HGEDITOR script being executable. Instead, lets just execute 'sh' and pass it the script to run. This seems to be the pattern followed in other tests.
-
Matt Harbison authored
The previous behavior when archiving a subrepo 's' on Windows was to internally name the file under it 's\file', due to the use of vfs.reljoin(). When printing the file list from the archive on Windows or Linux, the file was named 's\\file'. The archive extracted OK on Windows, but if the archive was brought to a Linux system, it created a file named 's\file' instead of a directory 's' containing 'file'. *.zip format achives seemed not to have the problem, but this was definitely an issue with *.tgz archives. Largefiles actually got this right, but a test is added to keep this from regressing. The subrepo-deep-nested-change.t test was repurposed to archive to a file, since there are several subsequent tests that archive to a directory. The output change is losing the filesystem prefix '../archive_lf' and not listing the directories 'sub1' and 'sub1/sub2'.
-
- Apr 22, 2015
-
-
Durham Goode authored
--edit-plan was completely broken from the command line because it used an old api that was not updated (it would crash with a stack trace). Let's update it and add tests to catch this.
-
- Apr 30, 2015
-
-
Yuya Nishihara authored
117b9a101f71 introduced the EXPERIMENTAL marker, so we should use it consistently.
-
- Apr 20, 2015
-
-
Alexander Drozdov authored
The patch solves two issues: 1. id(unknown_full_hash) aborts, but id(unknown_short_hash) doesn't 2. id(40byte_tag_or_bookmark) returns tagged/bookmarked revision, but id(non-40byte_tag_or_bookmark) doesn't After the patch: 1. id(unknown_full_hash) doesn't abort 2. id(40byte_tag_or_bookmark) returns empty set
-
- May 03, 2015
-
-
Yuya Nishihara authored
"date information" is somewhat obscure, but we call it that way in templatekw.showdate().
-
Siddharth Agarwal authored
One case where that would happen is while trying to resolve a subrepo, if the path to the subrepo was actually a broken symlink. This bug was exposed by an hg-git test.
-
- May 01, 2015
-
-
Matt Mackall authored
-
Matt Mackall authored
-
Katsunori FUJIWARA authored
With "dash" (as "/bin/sh" on Debian GNU/Linux), command execution in "ENV=val foo bar" style doesn't work as expect in test script files, if "foo" is user-defined function: it works fine, if "foo" is existing commands like "hg". 09049042ab99 introduced tests for HGPLAIN and HGPLAINEXCEPT into test-revset.t, and all of them are in such style. This patch doesn't: - add explicit unsetting for HGPLAIN and HGPLAINEXCEPT they are already introduced by 09049042ab99 - write assignment and exporting in one line "ENV=val; export ENV" for two or more environment variables in one line causes failure of test-check-code-hg.t: it is recognized as "don't export and assign at once" unfortunately.
-
Matt Harbison authored
The editor launches without expanding the path with commits because the shell does that for us. If the path isn't an executable, the expanded path is displayed, which is probably more useful than the unexpanded path. For example, in cmd.exe, '~' expands to C:\Users\$user. But it expands to C:/mingw/msys/1.0/home/$user in MinGW.
-
Katsunori FUJIWARA authored
According to recent "filectx.data()" implementation, "censor.policy" should be configured as "ignore" to ignore error at censored file: "censor.allow" seems outdated name.
-
- Apr 30, 2015
-
-
Matt Mackall authored
-