Matt Harbison <matt_harbison@yahoo.com> [Wed, 15 Apr 2015 11:23:26 -0400] rev 24785
subrepo: backout
93b0e0db7929 to restore reporelpath()
The path for hgsubrepo needs to be calculated slightly differently from other
subrepo types, but can reuse this. See the next patch for details.
Matt Mackall <mpm@selenic.com> [Thu, 16 Apr 2015 18:48:20 -0500] rev 24784
rollback: clear resolve state (
issue4593)
Durham Goode <durham@fb.com> [Thu, 16 Apr 2015 11:31:48 -0700] rev 24783
diff: pass the diff matcher to the copy logic
This passes the existing diff matcher instance down to the copy logic so copy
tracing can be more efficient when possible and only trace copies for matching
files.
This only actually affects forwardcopies (i.e. Given A<-B<-C<-D, it works for
'hg diff -r B -r D foo.txt', but not for 'hg diff -r D -r B foo.txt') since
backward copies require walking all histories, and not just the individual
file's.
This reduces 'hg diff -r A -r B foo.txt' time from 15s to 1s when A and B have
80,000 files different.
Durham Goode <durham@fb.com> [Thu, 16 Apr 2015 11:29:30 -0700] rev 24782
copies: add matcher parameter to copy logic
This allows passing a matcher down the pathcopies() stack to _forwardcopies().
This will let us add logic in a later patch to avoid tracing copies when not
necessary (like when doing hg diff -r 1 -r 2 foo.txt).
Martin von Zweigbergk <martinvonz@google.com> [Sun, 12 Apr 2015 23:01:18 -0700] rev 24781
treemanifest: extract parse method from constructor
When we start to lazily load submanifests, it will be useful to be
able to create an treemanifest instance before manifest data gets
parsed into it. To prepare for this, extract the parsing code from
treemanifest's constructor to a separate method.
Martin von Zweigbergk <martinvonz@google.com> [Sun, 12 Apr 2015 14:37:55 -0700] rev 24780
manifest: duplicate call to addrevision()
When we start writing submanifests to their own revlogs, we will not
want to write a new revision for a directory if there were no changes
to it. To prepare for this, duplicate the call to addrevision() and
move them earlier where they can more easily be avoided.
Laurent Charignon <lcharignon@fb.com> [Thu, 16 Apr 2015 14:26:50 -0700] rev 24779
record: add message when starting record's curses interface
We are adding this log message to reduce a confusion when a command prints
something just before starting the curses interface.
Since the interactive mode is taking over the entire screen, starts with no
delay and does wait for a key press, the user believes that messages printed
before opening the interactive mode were actually printed after using
interactive mode, not before.
The fix adds the line "Starting interactive mode" helping the user separate
the messages that were printed before and after the start of the
interactive mode.
One particular example where this was a problem is the revert command where we
first print the list of changes to be considered for revert, then opens the
curses interface right away without letting the user see the messages.
The user then selects the changes, validates and then see the messages from
before opening the interactive mode and is confused.
Mathias De Maré <mathias.demare@gmail.com> [Tue, 14 Apr 2015 20:09:56 +0200] rev 24778
subrepo: add include/exclude support for diffing git subrepos
Previously, git subrepos were ignored if any type of path selection
was done.
This can be solved by using subrepo status and filtering matching files.
Yuya Nishihara <yuya@tcha.org> [Sun, 12 Apr 2015 19:00:31 +0900] rev 24777
revset: undocument wdir() until its command outputs get stable
wdir() implementation is still incomplete and shouldn't be advertised to
users. This patch will be backed out when
- template values such as {rev} and {node} are settled
- major commands and revsets work without crashing
Matt Mackall <mpm@selenic.com> [Thu, 16 Apr 2015 18:30:08 -0500] rev 24776
linkrev: fix issue with annotate of working copy
The introrev was appearing as None in new annotate tests, which the
code from the stable branch wasn't expecting.
Matt Mackall <mpm@selenic.com> [Thu, 16 Apr 2015 17:30:01 -0500] rev 24775
merge with stable
Durham Goode <durham@fb.com> [Sat, 04 Apr 2015 02:16:48 -0700] rev 24774
histedit: delete all non-actionclass related code
Now that all actions have been migrated to the class format, we can delete all
the unnecessary code that supported the old function format.
Durham Goode <durham@fb.com> [Sat, 04 Apr 2015 02:12:53 -0700] rev 24773
histedit: improve roll action integration with fold
Previously the fold action would inspect it's class to figure out if it was a
rollup or not. This was hacky. Now that finishfold is inside the fold class,
let's modify it to check a function (which roll can override) to determine if it
should be prompting for a commit message.
Durham Goode <durham@fb.com> [Sat, 04 Apr 2015 02:12:24 -0700] rev 24772
histedit: move finishfold into fold class
Let's move the finishfold function into the fold class so we can modify it from
the roll class more easily.
Durham Goode <durham@fb.com> [Sat, 04 Apr 2015 02:03:27 -0700] rev 24771
histedit: convert fold/roll actions into a class
This converts the fold/roll actions into a histeditclass instance, as part of an
ongoing effort to refactor histedit for maintainability and robustness.
The tests changed for two reasons:
1) We get a new 'empty changeset' warning because we now warn more consistently
between normal histedit and --continue about commits disappearing.
2) Previously we were not putting the histedit-source extra field on the
temporary fold commit during normal runs, but we were on --continue runs. By
unifying these code paths we now consistently put histedit-source on the
temporary fold commit, which changes some of the hashes in the backup bundles.
Durham Goode <durham@fb.com> [Sat, 04 Apr 2015 01:00:51 -0700] rev 24770
histedit: convert edit action into a class
This converts the edit action into a histeditclass instance, as part of an
ongoing effort to refactor histedit for maintainability and robustness.
Durham Goode <durham@fb.com> [Sat, 04 Apr 2015 00:42:32 -0700] rev 24769
histedit: convert message action into a class
This converts the message action into a histeditclass instance, as part of an
ongoing effort to refactor histedit for maintainability and robustness.
Durham Goode <durham@fb.com> [Sat, 04 Apr 2015 00:30:01 -0700] rev 24768
histedit: convert drop action into a class
This converts the drop action into a histeditclass instance, as part of an
ongoing effort to refactor histedit for maintainability and robustness.
Durham Goode <durham@fb.com> [Sat, 04 Apr 2015 11:39:08 -0700] rev 24767
histedit: convert pick action into a class
This converts the pick action into a histeditclass instance, as part of an
ongoing effort to refactor histedit for maintainability and robustness.
The test output changed because previously pick would only report the commit
disappearing if there were no merge conflicts. Now that we've unified the normal
and the --continue flows, they act the same and we get the warning even after
--continue.
Durham Goode <durham@fb.com> [Sat, 04 Apr 2015 11:37:08 -0700] rev 24766
histedit: integrate action class into flow
This takes the newly added histeditaction class and integrates it into the
histedit run and bootstrapcontinue logic. No actions implement the class yet,
but they will be add in upcoming patches.
Durham Goode <durham@fb.com> [Sat, 04 Apr 2015 11:34:53 -0700] rev 24765
histedit: add a new histeditaction class
This adds a new class called histeditaction. It represents a single action in a
histedit plan. Future patches will integrate it into the histedit flow, then
convert each existing action in to the class form one by one.
This is part of a larger refactor aimed at increasing histedit robustness,
maintainability, and extensibility.
Durham Goode <durham@fb.com> [Sat, 04 Apr 2015 01:00:05 -0700] rev 24764
histedit: allow histedit --continue when not on a descendant (BC)
Previously we would not allow --continue if the current working copy parent was
not a descendant of the commit produced by the previous histedit step. There's
nothing really blocking us from continuing the histedit in this situation, so
let's stop aborting in this case.
This is technically a BC change, but it is making things more forgiving so I
think it's ok.
In the future we will likely add an 'exec' action to histedit, which means the
user can do whatever they want during the middle of a histedit (like perhaps
calling 'hg update'), which means we'll need to support this case eventually
anyway.
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 16 Apr 2015 11:59:36 -0400] rev 24763
tags: explicitly log which tags cache file is being written
We now have multiple tags cache files. Record exactly which file is
being written. This should help aid debugging into performance issues
with any single filter.
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 16 Apr 2015 11:54:13 -0400] rev 24762
tags: write a separate tags cache file for unfiltered repos
Since we changed the format of the tags cache, we should bump the
filename. Before this patch, "tags" was being used for unfiltered
repositories. Change the naming scheme to be consistent and ensure
that a new cache file is used.
While I was here, I updated the docs to describe the existence of
multiple caches. I also added explicit test coverage for the creation of
the unfiltered tags cache.
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 16 Apr 2015 11:32:46 -0400] rev 24761
tags: return empty list of heads for no .hgtags case
The caller only uses the heads to resolve tags from content of .hgtags.
Returning a non-empty array is pointless if there is no .hgtags file.
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 16 Apr 2015 12:01:00 -0400] rev 24760
tags: change format of tags cache files
.hgtags fnodes are now written to a shared cache file. They don't need
to exist in the per-filter tags cache files. Stop writing them.
The format of the tags cache file has changed in a backwards
incompatible way. This should be acceptable, as we just established
per-filter tags cache files and no client should have per-filter tags
cache files that will need to be read. So no backwards compatbility
concern is present.
The new format has a single header line followed by resolved tags
entries.
The header line is similar to the old first line with a major
difference: we now compute and store a hash of the filtered revisions.
Before, if the set of filtered revs changed, we may return incorrect
results. We now detect that.
A test for verifying filtered rev change is handled properly has been
added.
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 16 Apr 2015 10:12:44 -0400] rev 24759
tags: don't read .hgtags fnodes from tags cache files
Now that we have a standalone and shared cache for .hgtags fnodes, the
.hgtags fnodes stored in the tags cache files are redundant.
Upcoming patches will change the format of the tags cache files to
remove this data and to improve the validation. To prepare for this, we
change the tags reading code to ignore all but the tip .hgtags fnodes
entries in existing tags cache files.
All fnodes lookups now go through our new shared cache, which is why
test output changed. Format of tags cache files has not yet changed.
Tony Tung <tonytung@fb.com> [Mon, 13 Apr 2015 14:54:02 -0400] rev 24758
rebase: restore bookmark state on abort
The bookmark state was already being preserved, but it wasn't being
properly restored.
Durham Goode <durham@fb.com> [Sat, 04 Apr 2015 02:37:43 -0700] rev 24757
histedit: store backup file before histedit
It's possible for the user to delete some of the commits they started with
during a histedit, and aborting the histedit doesn't bring them back. Let's
store a backup bundle so we can always recover the stack of commits from before
they began.
Durham Goode <durham@fb.com> [Mon, 13 Apr 2015 08:23:57 -0700] rev 24756
histedit: replace pickle with custom serialization
Pickle is undesirable, so let's serialize it ourselves. We keep the ability to
parse existing pickle blobs for now.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 15 Apr 2015 01:18:09 -0400] rev 24755
devel-warn: add a prefix to all messages ("devel-warn: ")
We want to make the origin and importance of the message clear to developers.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 15 Apr 2015 10:36:21 -0400] rev 24754
push: acquire local 'wlock' if "pushback" is expected (BC) (
issue4596)
If the client allows "pushback", the bundle2 served back by the server may
contains parts that will write to the repository. Such parts may require the
'wlock' (eg: bookmark) so we acquire it in advance to make sure it got acquired
before the 'lock'.
Yuya Nishihara <yuya@tcha.org> [Thu, 16 Apr 2015 22:33:53 +0900] rev 24753
annotate: always prepare ancestry context of base fctx (
issue4600)
This patch extends the workaround introduced by
dd01834a696f. Even if the
base fctx is the same as intorrev, _ancestrycontext must be built for faster
_changeid lookup.
repo: https://hg.mozilla.org/releases/mozilla-beta
command: hg annotate -r
4954faa47dd0 gfx/thebes/gfxWindowsPlatform.cpp
before: 52.450 sec
after: 1.820 sec
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 15 Apr 2015 01:16:40 -0400] rev 24752
unbundle: acquire 'wlock' when processing bundle2 (BC) (
issue4596)
A bundle2 may contain bookmark updates (or other extension content) that
requires the 'wlock' to be written. As 'wlock' must be acquired before 'lock',
we must stay on the side of caution and use both in all case to ensure their
ordering.
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 12 Apr 2015 09:46:03 -0400] rev 24751
run-test: enable the devel warning during tests
This should help us to catch new locking order issues as soon as possible.
There are two harmless test updates (from the config change). Moreover, some
bundle2 tests are displaying warning for a legitimate reason. The use of pushkey
during the unbundle process may requires the 'wlock' after 'lock' (around the
whole unbundle process was taken). This is non-trivial to fix, so I better have
the check on, with the warning in the test than the check off. See
issue4596 for
details.
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 12 Apr 2015 15:37:59 -0400] rev 24750
wlock: do not warn for non-wait locking
We are warning about lock acquired in the wrong order because this can create
dead-lock situation. But non-wait acquisition will not block and therefore not
create a dead-lock. So we do not need to wait in such case.
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 12 Apr 2015 14:27:42 -0400] rev 24749
develwarn: include call site in the simple message version
Just displaying the warning makes it quite hard to recognise the guilty code
quickly and using --traceback for all calls is not very convenient. So we
include the call site with all simple message to help developer to recognise
errors sources.
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 12 Apr 2015 14:26:11 -0400] rev 24748
develwarn: handle the end of line inside the function itself
The traceback version should not have a end of line at all. The non-traceback
version will requires the same things soon.
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 12 Apr 2015 14:24:28 -0400] rev 24747
develwarn: refactor the developer warning logic
The logic is currently duplicated and we plan to make it a bit smarter. So we
move it into a function first to make the update more robust and simple.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 15 Apr 2015 01:20:48 -0400] rev 24746
lock: update the docstring with order information
Lock must be acquired in a specific order to avoid dead-lock. This was
documented on the wiki, but having this information in the docstring is also
useful.
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 12 Apr 2015 13:28:35 -0400] rev 24745
wlock: reword the devel warning
We change the wording of the developer warning:
- "lock" taken before "wlock"
+ "wlock" acquired after "lock"
The goals here are to:
- Put the "subject" as the first word,
- use "acquired" instead of "taken" since it seems more accurate.
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 12 Apr 2015 10:01:48 -0400] rev 24744
wlock: only issue devel warning when actually acquiring the lock
Before this change, any call to 'wlock' after we acquired a 'lock' was issuing a
warning. This is wrong as the 'wlock' have been properly acquired before the
'lock' in a previous call.
We move the warning code to only issue such warnings when we are acquiring the
'wlock' -after- acquiring 'lock'. This is the expected behavior of this warning
from the start.
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 11 Apr 2015 17:30:45 -0400] rev 24743
bundle2: flush output in a part in all cases
We want to preserve output even when the unbundling fails (eg: hook output). So
we must make sure that everything we have is flushed into the reply bundle.
(This is related to
issue4594)
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 11 Apr 2015 14:44:12 -0400] rev 24742
run-tests: also follow symlink when update PATH with 'run-tests.py' dir
I'm using 'run-tests.py' from my '$PATH' and use a symlink to get 'run-tests.py'
to in that '$PATH'. There is a handful of test helpers (like f) that needs to be
in the '$PATH' for the test to run, and they are expected to live next to the
'run-tests.py' binary. Using a symlink confuses this logic, so we add to the
'$PATH' both the 'run-tests.py' executable directory, and the actual file
location direction.
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 11 Apr 2015 16:55:14 -0400] rev 24741
bundle2: fix names for error part handler
The name is not very important but copy paste banshee got there. We make
distinctive name.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 15 Apr 2015 11:11:54 -0400] rev 24740
transaction: introduce a transaction ID, to be available to all hooks
The transaction ID is built from the object ID and creation time stamp to make
sure it is unique.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 14 Apr 2015 13:07:41 -0400] rev 24739
transaction: actually use tr.hookargs in pretxnclose
The 'tr.hookargs' is a dictionary containing all the arguments to be passed to
hooks. It is actually used for hooks now...
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 11 Apr 2015 13:58:36 -0400] rev 24738
bundle2: use unbundle source as transaction name
This is what a bundle 1 push is doing. This got caught by trying to run the
whole test-suite using bundle2 for exchanges.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 15 Apr 2015 18:34:34 -0400] rev 24737
tags: have a different cache file per filter level
Currently whichever filter level asks for tags last will write the data on disk.
This create massive issues when tags are read for "visible" and "unfiltered"
on large and multi headed repository (like Mozilla central). See
issue4550 for
details
Each filter level recomputes its own cache without direct collaboration but they
all share the same 'hgtagsfnodes' cache. And that is where most of the time is
spent.
Siddharth Agarwal <sid0@fb.com> [Wed, 15 Apr 2015 14:35:44 -0700] rev 24736
parsers: when available, use a presized dictionary for the file foldmap
On a repo with over 300,000 files, this speeds up perffilefoldmap:
before: wall 0.178421 comb 0.180000 user 0.160000 sys 0.020000 (best of 55)
after: wall 0.164462 comb 0.160000 user 0.140000 sys 0.020000 (best of 59)
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 15 Apr 2015 17:42:38 -0400] rev 24735
tags: extract .hgtags filenodes cache to a standalone file
Resolution of .hgtags filenodes values has historically been a
performance pain point for large repositories, where reading individual
manifests can take over 100ms. Multiplied by hundreds or even thousands
of heads and resolving .hgtags filenodes becomes a performance issue.
This patch establishes a standalone cache file holding the .hgtags
filenodes for each changeset. After this patch, the .hgtags filenode
for any particular changeset should only have to be computed once
during the lifetime of the repository.
The introduced hgtagsfnodes1 cache file is modeled after the rev branch
cache: the cache is effectively an array of entries consisting of a
changeset fragment and the filenode for a revision. The file grows in
proportion to the length of the repository (24 bytes per changeset) and
is truncated when the repository is stripped. The file is not written
unless tag info is requested and tags have changed since last time.
This patch partially addresses
issue4550. Future patches will split the
"tags" cache file into per-filter files and will refactor the cache
format to not capture the .hgtags fnodes, as these are now stored in
the hgtagsfnodes1 cache. This patch is capable of standing alone. We
should not have to wait on the tags cache filter split and format
refactor for this patch to land.
Eric Sumner <ericsumner@fb.com> [Wed, 15 Apr 2015 12:18:05 -0400] rev 24734
extensions: extract partial application into a bind() function
We use partial function application for wrapping existing Mercurial functions,
and it's implemented separately each time. This patch extracts the partial
application into a new bind() function that can be used on its own by extensions
when appropriate.
In particular, the evolve extension needs to wrap functions in the various
bundle2 processing dictionaries, which the pre-existing methods don't support.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 14 Apr 2015 11:44:04 -0400] rev 24733
obsolete: experimental flag to get debug about obsmarkers exchange
The obsolescence markers exchange is still experimental. We (developer) need
more information about what is going on. I'm adding an experimental flag to add
display the amount of data exchanged during bundle2 exchanges.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 14 Apr 2015 14:59:37 -0400] rev 24732
bundle2: add an 'idx' argument to the 'getbundle2partsgenerator'
This argument let extensions control in what order bundle2 part are generated
server side during a pull. This is useful to ensure the transaction is in a
proper state before some actions or hooks happens.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 14 Apr 2015 14:07:35 -0400] rev 24731
bundle2: add an 'idx' argument to the 'b2partsgenerator'
This argument let extensions control in what order bundle2 part are generated
client side during a push. This is useful to ensure the transaction is in a
proper state before some actions or hooks happens.
Mads Kiilerich <madski@unity3d.com> [Tue, 14 Apr 2015 23:51:02 -0400] rev 24730
rpms: create missing builds dir if it doesn't exist
Mads Kiilerich <madski@unity3d.com> [Tue, 14 Apr 2015 23:44:03 -0400] rev 24729
rpms: for packages with their own python, put it in /opt/python-hg
This is more compliant with the FHS and Fedora packaging guidelines.
Mads Kiilerich <madski@unity3d.com> [Wed, 14 Jan 2015 01:15:26 +0100] rev 24728
branchcache: stay silent if failing to read cache files
The warning has in some cases incorrectly attributed unrelated problems to rbc.
Instead, just do like the branch head cache does and stay quiet when reading
fails. The cache will be missing the first time a repo is used. It is a normal
situation and there is no reason to make a note of that.
Mads Kiilerich <mads@kiilerich.com> [Thu, 19 Mar 2015 22:22:50 +0100] rev 24727
merge: better debug messages before/after invoking external merge tool
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 23:00:04 +0900] rev 24726
subrepo: use vfs.walk instead of os.walk
"dirpath" in the tuple yielded by "vfs.walk()" is relative one from
the root of specified vfs, and absolute path in the warning message is
composed by "vfs.join()".
On the other hand, target file "f" exists in "dirpath", and
"reljoin()" is needed to unlink "f" by "vfs.unlink()".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 23:00:04 +0900] rev 24725
vfs: add walk
To eliminate "path prefix" (= "the root of vfs") part from "dirpath"
yielded by "os.walk()" correctly, "path prefix" should have "os.sep"
at the end of own string, but it isn't easy to ensure it, because:
- examination by "path.endswith(os.sep)" isn't portable
Some problematic encodings use 0x5c (= "os.sep" on Windows) as the
tail byte of some multi-byte characters.
- "os.path.join(path, '')" isn't portable
With Python 2.7.9, this invocation doesn't add "os.sep" at the end
of UNC path (see
issue4557 for detail).
Python 2.7.9 changed also behavior of "os.path.normpath()" (see *) and
"os.path.splitdrive()" for UNC path.
vfs root normpath splitdrive os.sep required
=============== ============== =================== ============
z:\ z:\ z: + \ no
z:\foo z:\foo z: + \foo yes
z:\foo\ z:\foo z: + \foo yes
[before Python 2.7.9]
\\foo\bar \\foo\bar '' + \\foo\bar yes
\\foo\bar\ \\foo\bar (*) '' + \\foo\bar yes
\\foo\bar\baz \\foo\bar\baz '' + \\foo\bar\baz yes
\\foo\bar\baz\ \\foo\bar\baz '' + \\foo\bar\baz yes
[Python 2.7.9]
\\foo\bar \\foo\bar \\foo\bar + '' yes
\\foo\bar\ \\foo\bar\ (*) \\foo\bar + \ no
\\foo\bar\baz \\foo\bar\baz \\foo\bar + \baz yes
\\foo\bar\baz\ \\foo\bar\baz \\foo\bar + \baz yes
If it is ensured that "normpath()"-ed vfs root is passed to
"splitdrive()", adding "os.sep" is required only when "path" part of
"splitdrive()" result isn't "os.sep" itself. This is just what
"pathutil.nameasprefix()" examines.
This patch applies "os.path.normpath()" on "self.join(None)"
explicitly, because it isn't ensured that vfs root is already
normalized: vfs itself is constructed with "realpath=False" (= avoid
normalizing in "vfs.__init__()") in many code paths.
This normalization should be much cheaper than subsequent file I/O for
directory traversal.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 23:00:04 +0900] rev 24724
subrepo: pass wvfs to _sanitize instead of absolute path to a subrepository
As a preparation for vfs migration of "_sanitize()", this patch passes
"wvfs" to "_sanitize()" and use "wvfs.base" instead of absolute path
to a subrepository.
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 01 Apr 2015 18:43:29 -0700] rev 24723
repoview: move function for computing filtered hash
An upcoming patch will establish per-filter tags caches. We'll want
to use the same cache validation logic as the branch cache. Prepare
for that by moving the logic for computing a filtered view hash
to somewhere central.
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 14 Apr 2015 12:54:16 -0400] rev 24722
revset: don't import discovery at module level
discovery.py imports a lot of the world. Pierre-Yves told me to move it
to a function-level import to avoid an import cycle in a future patch.
Michael O'Connor <moconnor@janestreet.com> [Tue, 14 Apr 2015 10:59:26 -0400] rev 24721
transaction: add missing newline to message
Add a missing newline to the "journal was created by a
different version of Mercurial" message.
Yuya Nishihara <yuya@tcha.org> [Sun, 05 Apr 2015 13:16:46 +0900] rev 24720
cat: disable optimization of single file case for workingctx
It crashes because workingctx has no manifest.
Yuya Nishihara <yuya@tcha.org> [Thu, 09 Apr 2015 22:18:55 +0900] rev 24719
committablectx: override manifestnode() to return None
wctx.manifestnode() crashed before because it has no _changeset. Instead of
crashing, just return None like wctx.node().
Yuya Nishihara <yuya@tcha.org> [Sat, 11 Apr 2015 16:01:42 +0900] rev 24718
cat: use ctx.manifestnode() in place of ctx._changeset[0]
Matt Harbison <matt_harbison@yahoo.com> [Fri, 10 Apr 2015 23:34:06 -0400] rev 24717
changegroup: flush the ui stdio buffers after adding a changegroup
This eliminates the following test failure on Windows, as well as a similar one
in evolve's test-wireproto.t. See the previous patch for details on the
problem.
--- e:/Projects/hg/tests/test-init.t
+++ e:/Projects/hg/tests/test-init.t.err
@@ -216,10 +216,10 @@
* test 0:
08b9e9f63b32
$ hg clone -e "python \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remote-bookmarks
searching for changes
+ exporting bookmark test
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
- exporting bookmark test
$ hg -R remote-bookmarks bookmarks
test 0:
08b9e9f63b32
Matt Harbison <matt_harbison@yahoo.com> [Fri, 10 Apr 2015 22:30:19 -0400] rev 24716
hook: forcibly flush stderr for Windows test stability
There are a handful of SSH related test failures on Windows.
--- c:/Users/Matt/Projects/hg/tests/test-bundle2-exchange.t
+++ c:/Users/Matt/Projects/hg/tests/test-bundle2-exchange.t.err
@@ -305,16 +305,16 @@
remote: added 1 changesets with 1 changes to 1 files
remote: 1 new obsolescence markers
updating bookmark book_5fdd
+ pre-close-tip:
02de42196ebe draft book_02de
+ postclose-tip:
02de42196ebe draft book_02de
+ txnclose hook: HG_SOURCE=push-response HG_TXNNAME=push-response
+ ssh://user@dummy/other HG_URL=ssh://user@dummy/other
remote: pre-close-tip:
5fddd98957c8 draft book_5fdd
remote: pushkey: lock state after "bookmarks"
remote: lock: free
remote: wlock: free
remote: postclose-tip:
5fddd98957c8 draft book_5fdd
remote: txnclose hook: (env vars truncated)
- pre-close-tip:
02de42196ebe draft book_02de
- postclose-tip:
02de42196ebe draft book_02de
- txnclose hook: HG_SOURCE=push-response HG_TXNNAME=push-response
- ssh://user@dummy/other HG_URL=ssh://user@dummy/other
$ hg -R other log -G
o 6:
5fddd98957c8 draft Nicolas Dumazet <...> book_5fdd C
|
--- c:/Users/Matt/Projects/hg/tests/test-ssh.t
+++ c:/Users/Matt/Projects/hg/tests/test-ssh.t.err
@@ -438,12 +438,12 @@
$ hg push
pushing to ssh://user@dummy/remote
searching for changes
+ local stdout
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
- remote: KABOOM
- local stdout
+ remote: KABOOM\r (esc)
$ cd ..
What is happening is that no data is available in 'sshpeer.pipee' while the
command is executing. As the command completes, local output is printed, and
then sshpeer.cleanup() is called. When it calls 'self.pipeo.close()', the child
process is shutdown, flushing stderr.
As an experiment, I printed a line to stdout and another to stderr instead this
flush(). The stdout data was immediately available to the hg client, and none
of the stderr data was until the child exited. At that point, pipee has all of
the buffered data, and it is read out and printed before the pipe is closed in
sshpeer.cleanup(). This is probably a known issue, since ui.write_err()
mentions that stderr may be buffered, and also flushes stderr.
It would be nice if there was a more general fix (there is one more test that
fails), but I'm not sure what it is. I've seen (ancient) references [1] to
setvbuf() "crashing spectacularly" on some systems if any I/O has been done
already, so it seems worth avoiding.
https://sourceware.org/ml/gdb-patches/2013-08/msg00422.html
[1] https://groups.google.com/forum/#!msg/comp.lang.python/JT8LiYzYDEY/Qg9d1HwyjScJ
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 10 Apr 2015 22:37:40 -0400] rev 24715
json: implement {fileannotate} template
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 10 Apr 2015 22:26:53 -0400] rev 24714
json: implement {comparison} template
Similar to {filediff}, we abbreviate some property names to cut down on
string bloat.
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 10 Apr 2015 22:39:22 -0400] rev 24713
json: implement {filediff} template
Single letter properties are used to keep payload size down, as diff
representation can be quite large and longer property names can create a
lot of extra work for parsers.
Rename is not yet captured. This can be done in a follow-up.
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 10 Apr 2015 22:34:12 -0400] rev 24712
hgweb: expose raw line numbers to templates
Surpringly, the templates didn't receive an unmodified version of the
line numbers. Expose it to make implementing the JSON templates easier.
In theory, we could post-process an existing template variable. But
extra string manipulation seems quite wasteful, especially on items that
could occur hundreds or even thousands of times in output.
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 11 Apr 2015 11:54:09 -0400] rev 24711
revert: stop marking files clean after interactive revert (
issue4592)
The goal of 'hg revert --interactive' is usually to keep some change in the
revert file, so the files -must-not- be marked as clean. We want the status
logic to do its usual job here.
For unclear reasons (probably timing related), I was unable to build an automated
test that reproduced
issue4592 but manual testing shows this is fixed.
Augie Fackler <augie@google.com> [Sat, 11 Apr 2015 11:56:21 -0400] rev 24710
lazymanifest: prevent leak when updating an entry more than once
__setitem__ on the lazymanifest C type wasn't checking to see if a
line had previously been malloced before replacing it, leading to
leaks if files got updated multiple times in the course of a task.
I was able to reproduce the leak with this change to test-manifest.py:
diff --git a/tests/test-manifest.py b/tests/test-manifest.py
--- a/tests/test-manifest.py
+++ b/tests/test-manifest.py
@@ -456,6 +456,16 @@ class basemanifesttests(object):
['a/b/c/bar.txt', 'a/b/c/foo.txt', 'a/b/d/ten.txt'],
m2.keys())
+ def testManifestSetItem(self):
+ m = self.parsemanifest('')
+ for x in range(3):
+ m['file%d' % x] = BIN_HASH_1
+ for x in range(3):
+ m['file%d' % x] = BIN_HASH_2
+ import time
+ time.sleep(4)
+
+
along with the commands:
$ make local
$ PYTHONPATH=. SILENT_BE_NOISY=1 python tests/test-manifest.py testmanifestdict.testManifestSetItem &
$ sleep 4
$ leaks $(jobs -p | tee /dev/stderr | awk '{print $3}')
$ wait
in an interactive shell on OS X. As far as I can tell, it had to be an
interactive shell so that I could get the pid of the test run using
the jobs builtin. Prior to this change, I was leaking several strings,
and after this change leaks reports no leaks.
I thought there was a bug filed for this in bugzilla, but I can't find
it either in bugzilla or by searching my email.
Matt Mackall <mpm@selenic.com> [Mon, 13 Apr 2015 07:42:25 -0500] rev 24709
strip: properly clear resolve state with --keep (
issue4593)
Normal updates automatically clean up the resolve state, but strip
--keep does a "manual" update that bypasses the normal machinery. This
adds a mergestate reset.
Ryan McElroy <rmcelroy@fb.com> [Mon, 13 Apr 2015 20:53:05 -0700] rev 24708
revsets: more informative syntax error message
I came across a case where an internal command was using a revset that I didn't
immediately pass in and it was difficult to debug what was going wrong with the
revset. This prints out the revset and informs the user that the error is with
a rebset so it should be more obvious what and where the error is.
Ryan McElroy <rmcelroy@fb.com> [Mon, 13 Apr 2015 21:06:21 -0700] rev 24707
revsets: show current revset abort behavior
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 13 Apr 2015 13:28:37 -0400] rev 24706
tests: move blackbox testing of tags to test-tags.t
We're going to refactor tags cache shortly. It is easier to test the
blackbox logging if these tests are in test-tags.t.
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 13 Apr 2015 09:36:33 -0400] rev 24705
tests: move mock blackbox extension into own file
Having all blackbox log testing in test-blackbox.t isn't scalable. Move
the mock blackbox extension into its own file so we can start to move
blackbox logging into other tests.
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 12 Apr 2015 14:59:31 -0400] rev 24704
shelve: acquire lock in the right order
Text book says that 'wlock' should be acquired before 'lock'.
Caught through developer warning.
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 12 Apr 2015 14:54:53 -0400] rev 24703
check-commit: be more picky about detection of wrong bug tag
The check-commit script search for "bug" withing bracket and ask people to use
(issueXXXX) instead. The test was too wide and matching any "(+b+u+g"sequence.
Michael O'Connor <moconnor@janestreet.com> [Mon, 13 Apr 2015 09:54:36 -0400] rev 24702
discovery: don't compute allfuturecommon when it won't be used
In repos with many changesets, the computation of allfuturecommon
can take a significant amount of time. Since it's only used if
there's an obsstore, don't compute it otherwise.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 10 Apr 2015 18:54:33 -0700] rev 24701
treemanifest: separate flags for trees in memory and trees on disk
When we start writing tree manifests with one manifest revlog per
directory, it will still be nice to be able to run tests using tree
manifests in memory but writing to a flat manifest to a single
revlog. Let's break the current '_usetreemanifest' flag on the revlog
into '_treeinmem' and '_treeondisk'. Both are populated from the same
config, but after this change, one can temporarily hard-code
_treeinmem=True to see that tests still pass.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 10 Apr 2015 18:13:01 -0700] rev 24700
manifestdict: drop empty-string argument when creating empty manifest
manifestdict() creates an empty manifestdict, so let's consistently
use that instead of explicitly parsing an empty string (which does
result in an empty manifest).
Mike Hommey <mh@glandium.org> [Sun, 12 Apr 2015 06:51:13 -0700] rev 24699
lazymanifest: fix memory leak in lmiter_iterentriesnext() after
3d485727e45e
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 11 Apr 2015 12:26:54 -0400] rev 24698
revert: do not requires '--all' if '--interative' is present
The '--all' option have been introduced in
890e285c52a1 (August 2006), most
probably to prevent user shooting themselves in the foot. As the record process
will let you, view and select the set of files and change you want to revert, I
feel like the '--all' flag is superfluous in the '--interactive' case.
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 09 Apr 2015 16:18:38 -0400] rev 24697
bundle2: drop the experimental hooks
The series at
e9ede9b4c2f8::
8e13cc0825f1 introduced generic transaction level
hooking. This makes the experimental bundle2 specific hooks redundant, we drop
them.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 10 Apr 2015 15:41:33 -0400] rev 24696
bundle2: advertise bundle2 by default
That way, any new server will be ready to accept bundle2 payload. The decision
for the client to use it is still off by default so this is not turning bundle2
everywhere.
We introduce a new kill switch for this in case stuff goes wrong.
Matt Harbison <matt_harbison@yahoo.com> [Sat, 07 Feb 2015 12:57:40 -0500] rev 24695
subrepo: convert the os.path references in git to vfs
There are a handful of os.path references in the free functions at the top of
the module that will be trickier to remove.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 00:47:09 +0900] rev 24694
subrepo: use vfs.removedirs instead of os.removedirs
This patch also removes useless composing absolute path by "repo.wjoin()".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 00:47:09 +0900] rev 24693
vfs: add removedirs
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 00:47:09 +0900] rev 24692
util: add removedirs as platform depending function
According to
fa901423ac23 introducing "windows._removedirs()":
If a hg repository including working directory is a reparse point
(directory symlinked or a junction point), then using
os.removedirs will remove the reparse point erroneously.
"windows._removedirs()" should be used instead of "os.removedirs()" on
Windows.
This patch adds "removedirs" as platform depending function to replace
"os.removedirs()" invocations for portability and safety
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 00:47:09 +0900] rev 24691
subrepo: use vfs.unlink instead of os.remove
This patch also removes useless composing absolute path by
"os.path.join()".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 00:47:09 +0900] rev 24690
subrepo: use vfs.rmtree instead of shutil.rmtree
This patch also removes useless "shutil" import.