Commit Graph

18102 Commits

Author SHA1 Message Date
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
Mads Kiilerich
a17080a566 bookmarks: fix head selection for merge with two bookmarked heads
A type mismatch caused the search for the other head to fail. The code is
fragile, and instead it ended up using the 'first' bookmark head, but the
ordering is undefined and it could thus randomly use the wrong bookmarkhead
and fail with:

  $ hg up -q -C e@diverged
  $ hg merge
  abort: merging with a working directory ancestor has no effect
2012-12-24 13:26:13 +01:00
Pierre-Yves David
e30cc15ae0 test: use obsolescence marker to test hidden
Instead of using a custom dedicated extension.
2012-12-04 15:25:22 +01:00
Matt Mackall
fe2cbf4904 merge with stable 2013-01-02 00:24:28 -06:00
Angel Ezquerra
b072cb14e8 hgweb, paper: add (Atom) subscribe links to the repository index
This is similar to the subscribe links that already exist in other templates.
Rather than the usual RSS and Atom links a single feed icon linking to the
atom-log is shown.
2012-12-20 19:22:12 +01:00
Angel Ezquerra
4108217b64 hgweb: add (Atom) subscribe link to the main paper template pages
The subscribe link is found at the bottom of the navigation sidebar.
This uses a free icon from http://feedicons.com.
2012-12-04 00:41:29 +01:00
Benoit Boissinot
e1a55dc93c 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
Pierre-Yves David
0cd9115520 branchmap: enable caching for filtered version too
The `_branchcache` attribute is turned into a dictionary. Key are filter name and
value is a `branchcache` object. Unfiltered version is cached as `None` filter.

The attribute is renamed to `_branchcaches` to avoid confusion with the previous
one. Both old and new contents are dictionary even if their contents are
different. I prefer possible extension code to crash right away instead of just
messing the wrong dictionary.

As all different caches work isolated to each other, this code keeps the
previous behavior of using the unfiltered cache  we nothing is filtered.  This
is a cheap way to have cache collaborate and nullify potential impact in the
default case.
2012-12-24 03:21:15 +01:00
Pierre-Yves David
daf9851247 branchmap: report filtername when read fails
Now that we can have multiple one, we need to know which filecache failed to be
read from disk.
2013-01-01 21:27:13 +01:00
Pierre-Yves David
256c2dfbf0 branchmap: use a different file name for filtered view of repo 2012-12-24 03:06:03 +01:00
Pierre-Yves David
c957b56f86 clfilter: ensure unfiltered repo have a filtername attribute too
That will allows to use `repo.filtername` for dispatch purpose.
2012-12-24 03:05:02 +01:00
Pierre-Yves David
4ad32b10f3 branchmap: move the cache file name into a dedicated function
Filtered view of the repo will want to write they file name in a different file.
2012-12-24 03:04:12 +01:00