Commit Graph

20236 Commits

Author SHA1 Message Date
Siddharth Agarwal
def3d4797d histedit: hold wlock and lock while in progress
Currently, histedit acquires and releases lock and wlock several times during
its run. This isn't great because it allows other hg processes to come in and
change state. With this fix, lock and wlock are acquired and released exactly
once.

The change to test-histedit-drop.t is a minor implementation one -- the cache
is still correctly invalidated, but it just happens a little later and only
gets printed out because of the unrelated --debug flag.
2013-11-17 15:11:09 -08:00
Matt Mackall
887569b454 merge with i18n 2013-11-18 15:43:45 -05:00
Matt Mackall
52dafe7a2a templater: only recursively evaluate string literals as templates (issue4103) 2013-11-18 15:37:09 -05:00
Matt Mackall
c9a233d77e templater: fix escaping in nested string literals (issue4102)
Before the templater got extended for nested expressions, it made
sense to decode string escapes across the whole string. Now we do it
on a piece by piece basis.
2013-11-18 14:02:26 -05:00
Wagner Bruna
6cfba5ceb4 i18n-pt_BR: fix typos in notify docs 2013-11-18 13:29:05 -02:00
Wagner Bruna
c3f753b6fe i18n-pt_BR: synchronized with 236f440a7d02 2013-11-17 19:52:49 -02:00
Matt Mackall
d5a4643492 merge with i18n 2013-11-16 12:34:05 -05:00
Matt Mackall
fa9135dd56 strip: fix last unprotected mq reference (issue4097) 2013-11-14 21:37:18 -06:00
Simon Heimberg
a4feb953c7 check-code: prepend warning prefix only once, but for each warning
The code adding the prefix is now run once per pattern. It was run once per
file (after the change 17484f4c54fb).
Demonstrate that it is working now by extending the test. Raise two different
warnings, one of them twice.
2013-11-09 10:21:20 +01:00
Wagner Bruna
b966a63297 hgweb, i18n: do not translate search mode description
The search mode description can't be translated by itself, since
it's displayed as part of a template phrase (the "Assuming ..."
/ "Use ... instead" bits). Just drop the translation markers for
now, since the templates themselves currently do not support
translations.
2013-11-13 16:46:46 -02:00
FUJIWARA Katsunori
40c26276a6 tests: end output lines including path with "(glob)" to pass on Windows 2013-11-10 16:48:24 +09:00
FUJIWARA Katsunori
8f71709e93 tests: quote environment variable to extract wildcard on MinGW environment
On MinGW environment, the command line below in test script can't
extract wildcard "*" and remove target files correctly.

    $ rm $ENVVAR/foo/bar.*

To extract wildcard, environment variable should be quoted by double
quotation like below:

    $ rm "$ENVVAR"/foo/bar.*

This patch also omits "-f" of "rm" to know whether files are removed
or not by exit code of it.
2013-11-10 16:48:24 +09:00
FUJIWARA Katsunori
445ce3d732 tests: choose the path separator in PYTHONPATH suitable for platform
Before this patch, test code introduced by becb9079df52 into
test-extension.t always uses ":" as the path separator in PYTHONPATH.

But ";" should be used on Windows.

This patch chooses the path separator in PYTHONPATH suitable for
platform.
2013-11-10 16:48:24 +09:00
Mads Kiilerich
32fefa2839 util: warn when adding paths ending with \
Paths ending with \ will fail the verification introduced in 0bc0c17d663e when
checking out on Windows ... and if it didn't fail it would probably not do what
the user expected.
2013-11-08 12:35:50 +01:00
David Soria Parra
1ffeccc726 shelve: unshelve using an unfiltered repository
when evolve is enabled and a hidden obsolete changeset exists
in the repository, the strip during unshelve will fail due to
filtered revs. we use an unfiltered repository like to
repair.strip to strip the proper nodes.
2013-11-07 20:36:26 -08:00
Mads Kiilerich
c73c847849 largefiles: update in two steps, handle interrupted updates better
An update would try to fetch any missing largefiles after having updated normal
files and standins. That could fail or be interrupted and would leave the
working directory in a state where the largefiles not only were missing but
also were scheduled for remove ... and where the old largefile was left in
place.

Instead we now remove old largefiles before starting to download and update
missing largefiles.
2013-11-07 01:56:40 +01:00
Mads Kiilerich
6b59065762 largefiles: inline _updatelfile, prepare for further refactorings 2013-11-07 01:49:48 +01:00
Mads Kiilerich
3f82a98b8e largefiles: cache largefiles for update, also without printmessage 2013-11-07 01:48:00 +01:00
Mads Kiilerich
90dc6e20e1 largefiles: cleanup of printmessage handling - the printed flag was redundant 2013-11-07 01:47:59 +01:00
Mads Kiilerich
71f30fd22f convert: fix svn crash when svn.ra.get_log calls back with orig_paths=None
get_log started calling back with orig_paths=None on Fedora 20 with
subversion-1.8.3. That broke test-convert-svn-source.t .

There used to be some handling of that situation until d17c619e40d5 apparently
broke it. This patch restores what seems to be the most obvious handling of the
situation.
2013-11-16 19:56:30 -05:00
Brodie Rao
c0209a0c13 share: fix unshare calling wrong repo.__init__() method
When running the unshare command, if there's other code that tries to use
the repo after the command is finished, it'll end up with a ui object for
repo.unfiltered(). This change fixes an erroneous call to repo.__init__()
that could be on the repoview proxy class--now it's always done on the
unfiltered repo.
2013-11-16 17:30:34 -05:00
Pierre-Yves David
f1f6dad830 obsolete: stop doing membership test on list
According to the Surgeon General, computer should not use list for membership
testing because of the risk of being slow.
2013-11-16 20:34:58 -05:00
Sean Farley
17f6cfcd6f merge: refactor initialization of variables in update
There is no code change here but this helps prepare for future commits that
will fix a bare update with obsolete markers.
2013-11-06 17:02:07 -06:00
Sean Farley
26332808a6 merge: update comment for future devs 2013-11-06 10:26:25 -06:00
Sean Farley
ef93a468a7 obsolete: clarify documentation for succcessorssets 2014-01-15 18:14:12 -06:00
Pierre-Yves David
605b367f84 backout: add a message after backout that need manual commit
In some case Backout silently succeeded to back out but left all the change
uncommitted. This may be confusing for user so this changeset  add a note
reminding to commit. Other backout case already actively informs the user about
created commit.
2014-01-08 17:23:26 -08:00
Pierre-Yves David
75c6a1c8fa backout: avoid update on simple case.
Before the changeset the backout process was:
1) go to <target>
2) revert to <target> parent
3) update back to changeset we came from

The two update steps can takes a very long time to move back and forth unrelated
file change between <target> and current working directory.

The new process is just merging current working directory with the parent of
<target> using <target> as ancestor. This give the very same result but skip
the two updates. On big repo with a lot of files and changes that save a lots of
time (x20 for one week window).

The "merge" version (hg backout --merge) is still done with upgrades. We could
imagine using in memory commit to speed it up but this is another fish.
2014-01-08 14:53:46 -08:00
Simon Heimberg
14f515afb4 run-tests: print more information on unnecessary glob matching
Extend the message with the test name and the approximate line number. (The
line number is the one of the command producing the output.)
Finding the line to fix is easier now.

old message:
......
Info, unnecessary glob: at a/b/c (glob)
..

new message:
......
Info, unnecessary glob in test-example.t (after line 9): at a/b/c (glob)
..


The test result is still pass as before.
2014-01-16 12:08:57 +01:00
Simon Heimberg
2967b15687 run-tests: suggest to append glob when only path sep does not match
When the line does not match because of \ instead of / (on windows), append
(glob) in the expected output.
This allows to rename test-bla.t.err to test-bla.t for getting a correct
output. This worked for other failures like missing (esc), but not here.

  Output example (only +- lines of diff):
Before:
-  path/with/local/sep
+  path\\with\\local/sep
Now:
-  path/with/local/sep
+  path/with/local/sep (glob)
2014-01-16 12:08:29 +01:00
Simon Heimberg
ee6f6f78e3 run-tests: test each line matching function on its own
This has several advantages.
 * Each match function can return some information to the caller runone (used in
   the next patch).
 * It is not checked that the line ends in " (glob)" when rematch() returns
   false.
 * And it looks more readable.
2014-01-16 12:06:49 +01:00
Simon Heimberg
3c3ef48a08 tests: new test for line matching functions in run-tests
Test for failing matches and warnings. (The existing test-run-tests.t can not
do both by design.) And simulate matching on other os.
2014-01-16 19:07:18 +01:00
Pierre-Yves David
1e7f6cb2d0 test-backout: add multiple summary calls to monitor result wc
The main goal is to monitor that working directory parent are correct after
backout. This will be useful the next changeset introducting magic merge usage.
2014-01-08 17:15:22 -08:00
FUJIWARA Katsunori
636302d19b transplant: use "ui.extractchoices()" to show the list of available responses
Before this patch, transplant extension shows the list of available
responses by specific string, even though the prompt string passed to
"ui.promptchoice()" has enough (maybe i18n-ed) information.

This patch uses "ui.extractchoices()" to show the list of available
responses.
2013-12-02 00:50:30 +09:00
FUJIWARA Katsunori
ecea0f8fc0 transplant: use "ui.promptchoice()" for interactive transplant
Before this patch, transplant extension uses "ui.prompt()" for
interactive transplant, and has to check whether user response
returned by "ui.prompt()" is valid or not in own code.

In addition to it, transplant extension uses response characters
(e.g. "y", "n", and so on) directly in own code, and this disallows to
use another response characters by translation, even though the help
shown by '?'  typing is translatable.

This patch uses "ui.promptchoice()" instead of "ui.prompt()" to
resolve problems above.
2013-12-02 00:50:30 +09:00
FUJIWARA Katsunori
b4f116c4e3 transplant: add test for interactive transplant 2013-12-02 00:50:30 +09:00
FUJIWARA Katsunori
c2ab815c76 record: use "ui.extractchoices()" to get the list of available responses
Before this patch, record extension gets the list of available
responses from online help document of "hg record" in the tricky way,
even though the value passed to "ui.promptchoice()" has enough (maybe
i18n-ed) information.

This patch uses "ui.extractchoices()" to get the list of available
responses.
2013-12-02 00:50:30 +09:00
FUJIWARA Katsunori
1629d4ee7f ui: add "extractchoices()" to share the logic to extract choices from prompt 2013-12-02 00:50:29 +09:00
Pierre-Yves David
f0e0234ea1 branchmap: use set for update code
We are doing membership test and substraction. new code is marginally faster.
2014-01-06 15:19:31 -08:00
Pierre-Yves David
fc97641ca7 branchmap: simplify update code
We drop iterrevs which are not needed anymore. The know head are never a
descendant of the updated set. It was possible with the old strip code. This
simplification make the code easier to read an update.
2014-01-06 14:26:49 -08:00
Pierre-Yves David
7641136888 branchmap: stop useless rev -> node -> rev round trip
We never use the node of new revisions unless in the very specific case of
closed heads. So we can just use the revision number.

So give another handfull of percent speedup.
2014-01-03 16:44:23 -08:00
Simon Heimberg
90fcdb6fe7 check-code: more replacement characters
for finding '.. note::' (even) more exact by using more characters:
replace '.' with 'p' and ':' with 'q'
2013-11-05 09:00:31 +01:00
Simon Heimberg
81c6ecacd6 check-code: check comment for '.. note::' without two newlines
Because string entries are replaced before matching, we must search for
the transformed pattern. But it seems to be quite unique and does not return
false matches. If it will, they can be listed as 3rd arg in pypats.
2013-11-05 09:00:31 +01:00
Simon Heimberg
25ae76fc48 documentation: add an extra newline after note directive
Like this no docutils version interprets any line in the following text as
argument of note.
2013-11-05 08:59:55 +01:00
Wagner Bruna
248a729824 i18n-pt_BR: synchronized with a5788a88b721 2013-11-04 10:52:41 -02:00
Simon Heimberg
c3b209ae8d tests: modify minirst test input to new format
Modifying the test input data shows the effects of the last patches.
In text output nothing has changed.
In html output the title has moved on its own line.
2013-11-04 10:23:06 +01:00
Simon Heimberg
386dcc916f minirst: do not add a 2nd empty paragraph
This does not add a separating block after a separated note directive.

.. note::

    text

is formatted to

Note:
    text
2013-11-04 10:23:06 +01:00
Simon Heimberg
664e8c41fe minirst: find admonitions before pruning comments and adding margins
Lines with only a directive are not deleted anymore because they are detected
before comments are deleted by prunecomments().
addmargins() will be adapted later.
2013-11-04 10:23:06 +01:00
Simon Heimberg
c5557c2259 minirst: do not fail on an empty admonition block 2013-11-04 10:23:06 +01:00
Simon Heimberg
0e05d277a4 minirst: do not interpret a directive as a literal block
When a directive was on its own line, it was interpreted as a literal block.

Example of problematic input:

.. note::

    a note text
2013-11-04 10:23:06 +01:00
Siddharth Agarwal
5fa78a0d83 merge: move forgets to the beginning of the action list
Forgets need to be in the beginning of the action list, same as removes. This
lets us avoid clashes in the dirstate where a directory is forgotten and a
file with the same name is added, or vice versa.
2013-11-06 10:20:18 -08:00