Commit Graph

18113 Commits

Author SHA1 Message Date
Pierre-Yves David
237773b354 perftest: allow selection of volatile set to benchmark
This helps when you focus on a subset of the volatile chain.
2013-01-04 19:24:32 +01:00
Pierre-Yves David
7e392315df perftest: add a command to benchmark construction of volatile cache
Obsolescence and filtering related caches are critical. Having a handy way to
check them is valuable.
2013-01-04 19:23:26 +01:00
Pierre-Yves David
0df9cd0af7 perftest: add an option to invalidate volatile cache
Some revsets are sensitive to such initialization. Being able to
test the impact is great.
2013-01-04 19:22:40 +01:00
Pierre-Yves David
c91dd4609f perftest: document the perfrevset command
I'll add an argument to it.
2013-01-04 19:22:15 +01:00
Pierre-Yves David
220ee90898 perftest: migrate to new style command declaration
Declaring synopsis and argument on the function site is much clearer.
2013-01-04 19:20:51 +01:00
Pierre-Yves David
e7d6dfdf0a perftest: drop duplicated codes
The `perfnodelookup` lookup commands is duplicated. We drop the first version,
overwritten by the seconds.
2013-01-04 19:18:12 +01:00
Pierre-Yves David
d66193718e cmdutil: make options argument optional
There is not reason to force passing of an empty options list.
2013-01-04 13:48:07 +01:00
Pierre-Yves David
01b68ae973 branchmap: allow to use cache of subset
Filtered repository are *subset* of unfiltered repository. This means that a
filtered branchmap could be use to compute the unfiltered version.

And filtered version happen to be subset of each other:
- "all() - unserved()" is a subset of "all() - hidden()"
- "all() - hidden()" is a subset of "all()"

This means that branchmap with "unfiltered" filter can be used as a base for
"hidden" branchmap that itself could be used as a base for unfiltered
branchmap.

   unserved < hidden < None

This changeset implements this mechanism. If the on disk branchcache is not valid
we use the branchcache of the nearest subset as base instead of computing it from
scratch. Such fallback can be cascaded multiple time is necessary.

Note that both "hidden" and "unserved" set are a bit volatile. We will add more
stable filtering in next changesets.

This changeset enables collaboration between no filtering and "unserved"
filtering. Fixing performance regression introduced by 7bff5f37cb97
2013-01-07 17:23:25 +01:00
Pierre-Yves David
fadd8efa6b repoview: add a subset table
This will be used by branchmap collaboration. See inline documentation for more
details
2013-01-07 17:16:24 +01:00
Pierre-Yves David
7b8d884b29 branchmap: add a copy method
If we want branchcache of different filter to collaborate, they need a simple
way to copy each other. This will ensure that each filtered have no side effect
on other filter level cache.
2013-01-02 01:40:42 +01:00
Pierre-Yves David
842d7e9f52 clfilter: use empty frozenset intead of empty tuple
This will allows set operation needed for cache collaboration.
2013-01-02 01:40:06 +01:00
Mads Kiilerich
6298fa2cbc run-tests.py: don't use console for stdin when running in debug mode
Tests would wait for input instead of using non-interactive mode.
2013-01-07 02:00:43 +01:00
Mads Kiilerich
d68f8e1916 tests: make hghave and run-tests exit on unknown feature requirements 2013-01-07 02:00:43 +01:00
Mads Kiilerich
67cf7d986d test-largefiles.t: fix wrong '#if hgweb' - it should be '#if serve'
A bug introduced in d7cb817a38e5 did that a part of the test never was run.
2013-01-07 02:00:43 +01:00
Mads Kiilerich
5584e7ca16 dispatch: show empty filename in OSError aborts
Mercurial would sometimes exit with:
  abort: No such file or directory
where str of the actual OSError exception was the more helpful:
  [Errno 2] No such file or directory: ''

The exception will now always show the filename and quote it:
  abort: No such file or directory: ''
2013-01-07 02:00:29 +01:00
Mads Kiilerich
33fe5e6036 test-dispatch.t: remove incorrect "cd $dir"
A line that should have been removed in 8041254f9d0f.
2013-01-06 04:04:44 +01:00
Kevin Bullock
16ea878bf5 merge with crew-stable 2013-01-04 13:03:44 -06:00
Pierre-Yves David
ed7bbaa14c dispatch: handle empty testedwith value in extension
When extensions had an empty `testedwith` attribute the code tried to parse it
and failed. As a result the actual error were shallowed by a This crash.

We now treat empty strip as 'unknown'
2013-01-04 19:06:42 +01:00
Pierre-Yves David
9f5750c56a destroyed: filter unknown before computing branchcache
Branchcache of filtered version need up to date phase data.
2013-01-04 19:05:20 +01:00
Benoit Boissinot
487f5cb58d test-command-template.t: make "age" filter test work on Feb 29th
reported by Julien Cristau.
2013-01-02 13:59:07 +01:00
Matt Mackall
56ee5e8df3 Added signature for changeset 9d7e53f4560e 2013-01-02 00:07:43 -06:00
Matt Mackall
b65fcfe7e4 merge with i18n 2013-01-02 00:03:31 -06:00
Matt Mackall
4ba8b9bde7 merge i18n heads 2013-01-02 00:02:22 -06:00
Pierre-Yves David
dd98ce8d6f branchmap: disable fallback to unfiltered branchcache
Disables this simple optimisation to allow coming more powerfull approach: cache
collaboration.

Our goal is to have branchcache collaborate. This means that unfiltered
branchcache will fallback to some filtered branchcache if invalid. We can't have
the filtered branchcache to use the unfiltered one. That would loop.
2013-01-02 01:36:57 +01:00
Augie Fackler
f909cd2da7 test-command-template.t: fix test so it all year
This test started failing for me after midnight UTC on December
31st. Fixed it by specifying a date 7 years in the future more
precisely (rather than just adding 8 to the year and specifying
January 1st), which allows the test to pass both now and on 2012-12-01
at the same time.
2012-12-31 21:50:35 -06:00
Pierre-Yves David
b6d4017a84 amend: prevent loss of bookmark on failed amend
The active bookmark were moved to the temporary commit. When the transaction
were rollbacked, the bookmark were lost.

We now temporarly disable the bookmark to prevent this effect.
2012-12-30 03:49:15 +01:00
Pierre-Yves David
6a1ec255bb amend: invalidate dirstate in case of failure (issue3670)
The temporary commit created by amend update the dirstate. If the final commit
fails, we need to invalidate the change made to the dirstate, otherwise the
release of the wlock will write the dirstate created after the rollbacked
temporary commit.

This dirstate writing logic should probably be handled in the same object than
the transaction one. However such change are too big for stable.
2012-12-29 18:00:18 +01:00
Alexander Sauta
39c2e8f8fe i18n-ru: synchonized with ce5a796b8950 2012-12-27 07:32:51 +00:00
Idan Kamara
92fd1426f3 localrepo: filter unknown nodes from the phasecache on destroyed
When commit is followed by strip (qrefresh), phasecache contains nodes that were
removed from the changelog. Since phasecache is filecached with .hg/store/phaseroots
which doesn't change as a result of stripping, we have to filter it manually.

If we don't write it immediately, the next time it is read from disk the nodes
will be filtered again. That's what happened before, but there's no reason not
to write it immediately.

The change in test-keyword.t is caused by the above.
2012-12-21 17:19:52 +01:00
Idan Kamara
e3cd3c1a91 phases: make _filterunknown a member function of phasecache
We'd like the ability to call filterunknown on an existing phasecache
instance after nodes are destroyed.
2013-01-04 06:11:29 +01:00
Pierre-Yves David
458159ba53 localrepo: drop _cacheabletip method
It iss dead code now.
2013-01-04 01:37:38 +01:00
Pierre-Yves David
ea8f599221 branchmap: drop _cacheabletip usage in updatecache
Nobody overwrite the `_cacheabletip` any more. We always update the cache for
the whole repo and write it to disk (or at list try to). The `updatecache` code
is simplied to remove the double phase logic associated with _cacheabletip.
2013-01-04 01:25:55 +01:00
Pierre-Yves David
4dda0af56b mq: drop _cacheabletip usage
Strip have dedicated work around to solve the same problem, strip is even a
fraction faster without that thanks to simpler update process of the branchcache.
2012-12-28 03:42:21 +01:00
Pierre-Yves David
b52ac2ca01 bundlerepo: drop use of _cacheabletip
Now that bundlerepo use a read only VFS, we do not worry about what part of the
branchmap is written back to disk. Nothing is written at all.
2012-12-28 02:34:32 +01:00
Pierre-Yves David
eccc0c88c9 bundlerepo: enforce reading from core repo only
We do not want anything computed with the bundle overlay to be written back in
the repo. Such write will likely contains invalid data.

The short terms goal of this change is to drop use of `_cacheabletip` in bundle
repo.
2012-12-28 02:32:47 +01:00
Pierre-Yves David
e5d81232c2 branchmap: ignore Abort error while writing cache
Read only vfs can now raise Abort exception. Note that encoding.local are also a
possible raiser.
2013-01-04 04:52:57 +01:00
Pierre-Yves David
ecb9a9d217 vfs: add a read only vfs
This read only wrapper is intended to be used bundle repo. See follow up commit
for details.
2013-01-04 01:07:25 +01:00
Pierre-Yves David
f01949c09e branchmap: read return None in case of failure
This makes a clear distinction between having read a valid cache on disk or not.
This will help caches of various filtering level to collaborate.
2012-12-22 19:41:11 +01:00
Pierre-Yves David
704a17970c clfilter: fallback to unfiltered version when linkrev point to filtered history
On `filectx`, linkrev may point to any revision in the repository. When the
repository is filtered this may lead to `filectx` trying to build `changectx`
for filtered revision. In such case we fallback to creating `changectx` on the
unfiltered version of the reposition. This fallback should not be an issue
because `changectx` from `filectx` are not used in complex operation that
care about filtering. It is complicated to work around the issue in a
clearer way as code raising such `filectx` rarely have access to the
repository directly.

Linkrevs create a lot of issue with filtering. It is stored in revlog entry at
creation time and never changed. Nothing prevent the changeset revision pointed
to become filtered. Several bogus behavior emerge from such situation. Those
bugs are complex to solve and not part of the current effort to install
filtering. This changeset is simple hack that prevent plain crash in favor on
minor misbehavior without visible effect.

This "hack" is longly documented in to code itself to help people that would
look at it in the future.
2012-12-29 00:40:18 +01:00
Pierre-Yves David
8e3d4ef15b phases: prepare phase command for filtering
The phase command have some logic to report change made. We ensure this logic
run unfiltered.

With --force the command can change phase of a changeset for public to draft.
Such change can lead to obsolescence marker to apply again and the changeset to
be "hidden". If we do not run the logic unfiltered it could failed to fetch the
phase of a newly filtered changeset.
2012-12-24 11:58:40 +01:00
Pierre-Yves David
18a17fb6be phases: avoid changectx creation while checking command result
This minor changesets saves the creation of a `changectx` ctx object only used to
fetch the revision number.
2012-12-24 11:57:48 +01:00
Matt Mackall
bad4a7148f paper: sanity-check page feed links
filelog has feeds in header, but not in menu bar
help has header feeds pointing to tags
2012-12-20 16:36:45 -06:00
Benoit Boissinot
12b2b140f5 zeroconf: use port from server instead of picking port from config (issue3746)
In order to get the port, wrap create server instead of
hgweb_mod/hgwebdir_mod.
2012-12-30 19:19:52 +01:00
Matt Mackall
567c0ff1dc scmutil: don't try to match modes on filesystems without modes (issue3740) 2012-12-20 15:52:23 -06:00
Matt Mackall
6f6ef90fe2 hgwebdir: honor web.templates and web.static for static files (issue3734) 2012-12-22 18:11:51 -06:00
Mads Kiilerich
24be691647 tests: fix windows test failures 2012-12-28 14:10:35 +01:00
Mads Kiilerich
82c7e260df largefiles: don't walk through all ignored files
Problem: 'hg status' with largefiles enabled would walk through all the files
that .hgignore said should be ignored. That made it slow if a lot of files were
.hgignored or the cache was cold.

It seems like there was a reason to this, but other improvements has rendered
this unnecessary.

Solution: .hgignore is now only ignored when that is requested (--ignore).

This is a minimal 'stable' change. There is room for other improvement.
2012-12-13 19:19:06 +01:00
Mads Kiilerich
96d2cbf93b largefiles revert: update lfdirstate with result from first cleanliness check
Largefiles revert do for some reason have two lfdirstates and lfdirstatestatus
invocations in one function. The result from the first lfdirstate check was
however not written back to the lfdirstate, and some files was thus checked
twice.
2012-12-13 19:19:06 +01:00
Mads Kiilerich
f9eedbbdd4 largefiles status: update lfdirstate with result from cleanliness check
Problem: 'hg status' kept checking largefiles with an unknown state until some
other command wrote the updated dirstate.

Solution: Add missing lfdirstate.write().
2012-12-13 19:19:06 +01:00
Mads Kiilerich
861c915f14 bundlerepo: don't return the peer without bundlerepo from getremotechanges
Problem:
getremotechanges would return the 'other' repo if nothing was incoming and
there thus wasn't any bundle to base the repo on. The 'other' could be a http
peer which only implement the functionality available over the http protocol.
Transplant could thus fail with
  TypeError: argument of type 'httppeer' is not iterable

Solution:
Return the local repo instead of the remote peer if there is no reason to place
a bundlerepo on top of the local repo.
2012-12-28 11:16:01 +01:00