Commit Graph

18469 Commits

Author SHA1 Message Date
Siddharth Agarwal
d7fd97bac5 manifest: use a size 3 LRU cache to store parsed manifests
Previously, the manifest cache would store the last manifest parsed. We could
run into situations with operations like update where we would try parsing the
manifest for a revision r1, then r2, then r1 again. This increases the cache
size to 3 to avoid that bit of performance fragility.
2013-02-09 15:43:02 +00:00
Siddharth Agarwal
b13982495e util: add an LRU cache dict
In certain cases we would like to have a cache of the last N results of a
given computation, where N is small. This will be used in an upcoming patch to
increase the size of the manifest cache from 1 to 3.
2013-02-09 15:41:46 +00:00
Na'Tosha Bard
3d65ebe9c1 largefiles: make caching largefiles message more explicit
In some cases, caching largefiles may take a long time (if the user has
pulled a lot of new heads).  This patch makes it more clear what is happening,
by showing the number of heads we are caching largefiles for.
2013-02-09 15:08:21 +00:00
Na'Tosha Bard
5cbae337c9 largefiles: document behavior of caching largefiles for new heads 2013-02-09 15:25:46 +00:00
Benoit Boissinot
957d1fe448 check-code: add Makefile target to run check-code 2013-02-09 15:57:04 +01:00
Augie Fackler
010dfef31a byterange: remove now-unused sys import 2013-02-09 07:44:22 -06:00
Augie Fackler
b2f57ecfe9 test-obsolete.t: migrate to killdaemons from kill cat pidfile 2013-02-09 05:37:36 -06:00
Augie Fackler
74aee9b680 test-inotify.t: migrate to killdaemons from kill cat pidfile 2013-02-09 05:36:19 -06:00
Augie Fackler
bddb04dfb4 test-inotify-lookup.t: migrate to killdaemons from kill cat pidfile 2013-02-09 05:35:20 -06:00
Augie Fackler
ff3429d228 test-inotify-issue1556.t: migrate to killdaemons from kill cat pidfile 2013-02-09 05:34:22 -06:00
Augie Fackler
63cc9c8e29 test-inotify-issue1542.t: migrate to killdaemons from kill cat pidfile 2013-02-09 05:33:39 -06:00
Augie Fackler
5030070b2b test-inotify-issue1371.t: switch to killdaemons from kill cat pidfile 2013-02-09 05:32:00 -06:00
Augie Fackler
6ca6df22df test-inotify-debuginotify.t: migrate to killdaemons from kill cat pidfile 2013-02-09 05:30:40 -06:00
Augie Fackler
99be2eecf2 test-hgweb-raw.t: use killdaemons instead of kill cat pidfile 2013-02-09 05:29:10 -06:00
Augie Fackler
35b5aef714 test-https.t: stop using kill cat $pidfile 2013-02-09 05:26:16 -06:00
Augie Fackler
f03df466e2 changelog: hexlify node when throwing a LookupError on a filtered node
The non-hexlified node was leaking all the way out to the web
interface, and wasn't consistent with the behavior for nonexistent
nodes.
2013-02-09 06:07:32 -06:00
Augie Fackler
bdb75bb2c5 byterange: remove old two-arg raise trick
We don't care about the original traceback, and this was frustrating
any efforts to make the code work on Python 3.3.
2013-02-08 17:14:12 -06:00
Benoit Boissinot
41300c28e0 revlog: document v0 format 2013-02-09 12:08:02 +01:00
Kevin Bullock
39e322507e merge crew heads 2013-02-09 10:40:26 +00:00
Kevin Bullock
6404b2f5c3 merge with mpm stable 2013-02-09 10:36:31 +00:00
Matt Mackall
d78b426c36 Added signature for changeset 5c74aaae6be4 2013-02-08 23:13:47 +00:00
Matt Mackall
c9e95d654a merge with i18n 2013-02-08 22:58:58 +00:00
Benoit Boissinot
077bafacf4 templater: add get() function to access dict element (e.g. extra) 2013-02-08 23:49:14 +01:00
Kevin Bullock
7974778403 check-code: fix platform-specific error code variance
test-check-code-hg.t uses xargs to invoke check-code.py on every file in
'hg manifest'. The return code from xargs varies between BSD xargs and
GNU xargs: BSD will return 1 if any invocation exits with an error code;
GNU xargs will return 123 in this case. This normalizes the exit code
back to 1.
2013-02-08 22:42:07 +00:00
Benoit Boissinot
b38415dcd7 templates: export extra as a dict to templates
Currently only useful with the json filter.
2013-02-08 21:55:46 +01:00
Kevin Bullock
72b1fbb751 check-code: warn to use killdaemons instead of kill cat PIDFILE
We have a bunch of tests that still use

    kill `cat hg.pid`

or worse,

    kill `cat hg.pid`; while kill -0 `cat hg.pid`; sleep 0; done

Cleaning these up to use tests/killdaemons.py is non-trivial, so for now
we just add a warning.
2013-02-08 19:32:56 +00:00
Mads Kiilerich
1f565a1b35 largefiles: docstrings for verify methods 2013-02-08 13:08:25 +01:00
Mads Kiilerich
e9a72ba5f1 largefiles: fold oddly named _verify into remotestore.exists 2013-02-08 13:00:08 +01:00
Augie Fackler
5c8acaf5b4 git convert: some versions of git use fatal: instead of error:
I saw this behavior with git 1.7.12 on my Mac.
2013-02-08 07:09:48 -06:00
Ross Lagerwall
9d98fbde66 test-convert-git: stabilize corruption of test git repo
This error would show up only intermittently since the
test depended on the order of the directories returned by os.walk.

The damage repository test would delete the first object file it came
across. However, the order of the directory listing is arbitrary (it
seems to depend on the filesystem). This meant that sometimes a commit
object was deleted, sometimes a blob object and sometimes a tree
object.

So, fix by hardcoding which object to delete. Delete a commit object,
a blob object and a tree object in three separate tests.
2013-02-08 07:57:32 -06:00
Ross Lagerwall
cb8603510f convert/git: catch errors from modern git-ls-remote (issue3428)
Since git v1.7.8.2-327-g926f1dd (the change was first released in git
1.7.10), git does not return non-zero when "git ls-remote --tags ..."
is run and the repository is damaged. This causes the "damaged
repository with missing commit" test in test-convert-git.t to
unexpectedly succeed.

Fix by aborting if git outputs any lines beginning with "error:",
which required adding some subprocess use in convert/git.py.
2013-02-08 08:02:57 -06:00
Kevin Bullock
a386213f4a merge with stable 2013-02-08 14:26:00 +00:00
Pierre-Yves David
79b2b905b4 incoming: fix incoming when a local head is remotely filtered (issue3805)
In its current state discovery may return (remotely) filtered elements
in "common". This has usually no impact as "missing" is kept clear of
filtered elements. However when the "remote" repo is a local repo (disk
accessible, and directly created in memory) the incoming code takes a
shortcut and directly uses the "remote" repo to generate the incoming
output. When some common elements are filtered this led to a crash. We
now ensure we use an unfiltered repository to generate the incoming
output. This does not change the behavior as missing is clear of
filtered revision.

Now that we have proper low level filtering, incoming code needs a
deeper cleanup but it is already planned.
2013-02-06 07:55:29 +00:00
Arne Babenhauserheide
1d791d3cc6 i18n-de: fix duplicated shortcut key b for record (edit and quit)
Use e for edit instead.
2013-02-05 22:02:11 +01:00
Kevin Bullock
eb96ccda75 hgweb: make 'summary' work with hidden changesets (issue3810)
Since the 'summary' view used by e.g. gitweb and monoblue shows both a
changelog and a bookmarks list, the same changes are needed here as were
made to the 'changelog' and 'bookmarks' web commands (2be8fa4eef83 and
70f6745775fa, respectively).
2013-02-05 11:31:43 -06:00
Andrew Shadura
ee874dbc29 hgk: support the old way of getting the current Ttk theme (issue3808)
It seems like the API has changed somewhere around 8.5.7, so the preferred way
of getting the current theme is now [ttk::style theme use], while the
deprecated (but still working) is $::ttk::currentTheme.
2013-02-05 12:58:21 +01:00
Mads Kiilerich
59596219f0 tests: fix windows test failure in test-subrepo.t 2013-02-04 23:41:11 +01:00
Mads Kiilerich
b80d68316e largefiles: don't crash when trying to find default dest for url without path
79f69be29aed introduced a crash when cloning a url without path - where
util.url().path would be None.

This None will now be handled as ''. clone will thus abort with 'repository /
not found' as before.
2013-02-04 23:26:44 +01:00
Mads Kiilerich
33daab8991 hgweb.cgi: fix internal WSGI emulation (issue3804)
The internal WSGI emulation in wsgicgi.py was not fully WSGI compliant and
assumed that all responses sent a body. With a9df76d7ca1f that caused a real
bug when using hgweb.cgi.

wsgicgi.py will now make sure headers always are sent, using the pattern from
PEP 333 and similar to how it is done in 38e07483cc16.
2013-02-04 23:25:25 +01:00
Siddharth Agarwal
afbf9327e6 rebase: derive node from target rev (issue3802)
dest.rev() is the same as target when a new rebase is run, but dest
isn't set when rebase --continue is run. Bug introduced in 97aaac321ced,
which fixed issue3685.
2013-02-03 14:26:39 -08:00
Matt Mackall
864c1a6a4b Added signature for changeset f7a78f4b1e24 2013-02-01 15:32:05 -06:00
Matt Mackall
e9b043669f test-obsolete: now gets 404 for hidden change 2013-02-01 15:21:47 -06:00
Matt Mackall
57ef18c167 merge with i18n 2013-02-01 15:23:37 -06:00
Wagner Bruna
d44ceb0fca i18n-pt_BR: added message from crew dd76c32468da 2013-02-01 17:59:56 -02:00
Thomas Arendsen Hein
6ca8967a44 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Without this, repository paths or names containing e.g. & characters or html
tags yielded strange results, possibly allowing cross-site scripting attacks.
2013-02-01 20:43:35 +01:00
Matt Mackall
a1152e87ba merge with crew 2013-02-01 15:14:05 -06:00
Kevin Bullock
21ba139cdc hgweb: rename 'currentbaseline' template keyword to 'basenode'
Shorter and clearer. This keyword represents the node we're currently
diffing against.
2013-02-01 10:12:41 -06:00
Kevin Bullock
3cf3843b51 hgweb: rename 'changesetbaseline' template to 'difffrom'
More accurately reflects what it will be used for, and is also shorter.
This template is used to change which rev the current rev is diff'd
against. For example, if you're at '/rev/P1:REV', this would link to a
path like '/rev/P2:REV'.

Example usage in a template:

    {parent%difffrom}
2013-02-01 09:58:25 -06:00
Wagner Bruna
4ac90b302c i18n-pt_BR: added message from crew 988dc3549f2a 2013-02-01 11:01:39 -02:00
Pierre-Yves David
5b37f126e0 rebase: mention --rev in the help
This changeset adds a small mention of it in the help to prevent
confusion. This small addition references online help that is easier to
update and improve at release time.

Following Wagner Bruna's advice, this is added in a plain new paragraph
to not invalidate current translation this close to the release.
2013-02-01 02:01:11 +01:00