FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 17 Jan 2014 23:42:12 +0900] rev 20287
revset: avoid loop for "match.files()" having always one element for efficiency
This patch avoids the loop for "match.files()" having always one
element in revset predicate "filelog()" for efficiency: "match" object
"m" is constructed with "[pat]" as "patterns" argument.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 17 Jan 2014 23:42:12 +0900] rev 20286
revset: make default kind of pattern for "contains()" rooted at cwd
Before this patch, default kind of pattern for revset predicate
"contains()" is treated as the exact file path rooted at the root of
the repository. This decreases usability, because:
- all other predicates taking pattern argument (also "filelog()")
treat such pattern as the path rooted at the current working
directory
- "contains()" doesn't describe this difference in its help
- this difference may confuse users
for example, this prevents revset aliases from sharing same
argument between "contains()" and other predicates
This patch makes default kind of pattern for revset predicate
"contains()" be rooted at the current working directory.
This patch uses "pathutil.canonpath()" instead of creating "match"
object for efficiency.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 17 Jan 2014 23:42:12 +0900] rev 20285
revset: narrow scope of the variable referred only in specific code path
This patch narrows scope of the variable "m" in the function for
revset predicate "contains()", because it is referred only in "else"
code path of "if not matchmod.patkind(pat)" examination.
Simon Heimberg <simohe@besonet.ch> [Fri, 17 Jan 2014 12:46:29 +0100] rev 20284
tests: fix test-run-tests.py on OS X
Do the same hack as in test-doctests.py to let the test pass on OS X.
Simon Heimberg <simohe@besonet.ch> [Fri, 17 Jan 2014 19:46:23 +0100] rev 20283
tests: test-debugcommands.t also matches stack trace on python 2.4
Some versions of python 2.4 write ? instead of <module>. Ignore this detail by
a glob.
This fixes a failure spotted on buildbot, existing since this test lines were
introduced
47d0843647d1.
Sean Farley <sean.michael.farley@gmail.com> [Wed, 15 Jan 2014 17:55:13 -0600] rev 20282
commands: use bookmarks.validdest instead of duplicating logic
Now that bookmarks.py has grown a validdest method that even handles successor
changesets, we use that instead of duplicating the logic in commands.py
Sean Farley <sean.michael.farley@gmail.com> [Wed, 15 Jan 2014 17:48:48 -0600] rev 20281
update: consider successor changesets when moving active bookmark
Previously, when an obsolete changeset was bookmarked, successor changesets were not considered
when moving the bookmark forward. Now that a bare update will move to the tip most of the
successor changesets, we also update the bookmark logic to allow the bookmark to move with this
update.
Tests have been updated and keep
issue4015 covered as well.
Sean Farley <sean.michael.farley@gmail.com> [Wed, 15 Jan 2014 16:41:18 -0600] rev 20280
merge: consider successor changesets for a bare update
Previously, a bare update would ignore any successor changesets thus
potentially leaving you on an obsolete head. This happens commonly when there
is an old bookmark that hasn't been moved forward which is the motivating
reason for this patch series.
Now, we will check for successor changesets if two conditions hold: 1) we are
doing a bare update 2) *and* we are currently on an obsolete head.
If we are in this situation, then we calculate the branchtip of the successor
set and update to that changeset.
Tests coverage has been added.
Sean Farley <sean.michael.farley@gmail.com> [Wed, 06 Nov 2013 17:02:07 -0600] rev 20279
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.
Sean Farley <sean.michael.farley@gmail.com> [Wed, 06 Nov 2013 10:26:25 -0600] rev 20278
merge: update comment for future devs
Sean Farley <sean.michael.farley@gmail.com> [Wed, 15 Jan 2014 18:14:12 -0600] rev 20277
obsolete: clarify documentation for succcessorssets
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 08 Jan 2014 17:23:26 -0800] rev 20276
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.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 08 Jan 2014 14:53:46 -0800] rev 20275
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.
Simon Heimberg <simohe@besonet.ch> [Thu, 16 Jan 2014 12:08:57 +0100] rev 20274
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.
Simon Heimberg <simohe@besonet.ch> [Thu, 16 Jan 2014 12:08:29 +0100] rev 20273
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)
Simon Heimberg <simohe@besonet.ch> [Thu, 16 Jan 2014 12:06:49 +0100] rev 20272
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.
Simon Heimberg <simohe@besonet.ch> [Thu, 16 Jan 2014 19:07:18 +0100] rev 20271
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.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 08 Jan 2014 17:15:22 -0800] rev 20270
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.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 02 Dec 2013 00:50:30 +0900] rev 20269
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.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 02 Dec 2013 00:50:30 +0900] rev 20268
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.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 02 Dec 2013 00:50:30 +0900] rev 20267
transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 02 Dec 2013 00:50:30 +0900] rev 20266
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.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 02 Dec 2013 00:50:29 +0900] rev 20265
ui: add "extractchoices()" to share the logic to extract choices from prompt
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 06 Jan 2014 15:19:31 -0800] rev 20264
branchmap: use set for update code
We are doing membership test and substraction. new code is marginally faster.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 06 Jan 2014 14:26:49 -0800] rev 20263
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.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 03 Jan 2014 16:44:23 -0800] rev 20262
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.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 15 Jan 2013 20:04:12 +0100] rev 20261
branchmap: stop membership test in update logic
Now that no user try to update the cache on a truncated repo we can drop the
extra lookup. Give an handfull percent speedup on big branchmap update.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 03 Jan 2014 17:06:07 -0800] rev 20260
branchmap: remove silly line break
The line fit in 80 character limit without it. It is even shorter without it.