Commit Graph

41 Commits

Author SHA1 Message Date
Matt Mackall
94c9deabbe static-http: disable lazy parsing
This only hits if you're crazy enough to use static-http on a
repository with revlogs larger than 1M. Don't do it.
2010-05-11 16:28:09 -05:00
Nicolas Dumazet
09283d5a0c static-http: mimic more closely localrepo (issue2164: allow clone -r )
* httprangereader: name, __iter__ and close are needed to mimic file object
* static-http opener:
    - disallow write/append modes
    - add (unused) atomictemp parameter
* static-http repo:
    - root attribute is needed for localrepo.dirstate()
    - _branch* attributes are required for commitctx and branchmap calls
* tags: force repo.opener.__iter__ call earlier to force httprangereader
  to try to read the cache early, to avoid raising IOError later.
2010-04-26 20:13:14 +09:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Greg Ward
37b1525e95 localrepo: rename in-memory tag cache instance attributes (issue548).
- self.tagscache to self._tags
- self._tagstypecache to self._tagtypes
- this is for consistency, readability, privacy, and to subtly hint
  that "caching" is something else
2009-07-16 10:39:41 -04:00
Patrick Mezard
945857d352 statichttprepo: handle remote not supporting Range headers
- If remote does not support Range header, 200 is answered instead of 206. The
  HTTPRangeHandler left these responses unchanged, so the data has to be sliced
  by the receiver.
- httprangereader file pointer was not updated.
2009-05-24 18:31:01 +02:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Peter Arrenbrecht
bc21361ed2 cleanup: drop unused imports 2009-03-23 13:12:07 +01:00
Matt Mackall
e0735a1762 error: move repo errors
rename NoCapability to CapabilityError
2009-01-12 10:42:31 -06:00
Benoit Boissinot
15ec41ce13 statichttprepo: cleanups, use url.py (proxy, password support)
- unify httprangereader.py and statichttprepo.py:rangegreader()
- build the opener from url.py, that allows use to puse username and password
  in the url, to follow the proxy settings from hgrc, etc.
2008-10-28 08:26:18 +01:00
Matt Mackall
e617903e64 Autodetect static-http 2008-10-22 15:41:32 -05:00
Thomas Arendsen Hein
28f8d4bb8e merge with crew-stable 2008-10-19 22:07:43 +02:00
Thomas Arendsen Hein
94f908042c Fix Debian bug #494889 (fetching from static-http://... broken)
Changeset 055df4ac4b13 which fixed issue965 (hg clone static-http
does not work for empty repos) broke cloning of repos with old layout
(without store) via static-http.

This fix makes cloning from old-style repositories possible again,
but will not allow cloning of empty old-style repositories as this
can not be detected reliably.
2008-10-19 19:49:56 +02:00
Martin Geisler
ca8bba4890 do not pretend to lock static-http repositories (issue994) 2008-09-08 11:32:53 +02:00
Adrian Buehlmann
d71509e706 Fix for Issue1260 2008-08-31 00:22:20 +02:00
Matt Mackall
eac969c591 statichttp: use store class
This lets us nix store.encodefn.
2008-08-13 20:18:43 -05:00
Adrian Buehlmann
904617b7d8 introduce store classes
move store walking from streamclone.py into store.py
2008-07-24 16:32:52 +02:00
Adrian Buehlmann
34afc460b4 move filename encoding functions from util.py to new store.py 2008-07-24 16:32:51 +02:00
Matt Mackall
cfa4e83bd1 repo classes: remove unused dev() method 2008-03-20 11:12:35 -05:00
Joel Rosdahl
4f8012378a Remove unused imports 2008-03-06 22:23:41 +01:00
Dirkjan Ochtman
3539f58d90 make static-http work with empty repos (issue965) 2008-02-08 11:50:37 +01:00
Patrick Mezard
f770ac70cd Merge with crew-stable 2007-09-22 18:56:36 +02:00
Paul Bx
ab0ccce138 statichttprepo: fix calls on '/' URI (issue 747) 2007-09-22 18:37:35 +02:00
Thomas Arendsen Hein
d486a44410 Removed deprecated hg:// and old-http:// protocols (issue406) 2007-07-08 09:54:42 +02:00
Thomas Arendsen Hein
4d29c6dc8e Updated copyright notices and add "and others" to "hg version" 2007-06-19 08:51:34 +02:00
Matt Mackall
04561e556e revlog: simplify revlog version handling
- pass the default version as an attribute on the opener
- eliminate config option mess
2007-03-22 19:52:38 -05:00
Matt Mackall
296d6a7cb8 Simplify i18n imports 2006-12-14 20:25:19 -06:00
Matt Mackall
f17a4e1934 Replace demandload with new demandimport 2006-12-13 13:27:09 -06:00
Benoit Boissinot
e5024feef0 fix errors spotted by pychecker 2006-12-10 19:41:57 +01:00
Benoit Boissinot
e005ffc8c4 switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
Benoit Boissinot
69d31c9562 add "requires" file to the repo, specifying the requirements 2006-12-10 00:06:59 +01:00
Benoit Boissinot
0fba88fde3 use forward "/" for internal path and static http, fix issue437 2006-12-05 16:33:40 +01:00
Benoit Boissinot
84f8507dc8 introduce localrepo.spath for the store path, sopener fixes 2006-12-05 11:28:23 +01:00
Matt Mackall
862620d6bf localrepo: add separate methods for manipulating repository data
This change adds new methods sjoin and sopener for accessing the
following elements:

 - changelog
 - manifest
 - data/
 - journal and undo log
 - repo lock

This will simplify sharing this data and escaping paths
2006-10-23 17:12:20 -05:00
Vadim Gelfer
dc377b58c1 update copyrights. 2006-08-12 12:30:02 -07:00
Vadim Gelfer
b7a96d1742 clean up hg.py: move repo constructor code into each repo module 2006-07-31 07:11:12 -07:00
Vadim Gelfer
0778999161 hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
all repository classes now have url() method that returns url of repo.
2006-07-25 13:50:32 -07:00
mason@suse.com
ed26ff0cae Implement revlogng.
revlogng results in smaller indexes, can address larger data files, and
supports flags and version numbers.

By default the original revlog format is used.  To use the new format,
use the following .hgrc field:

[revlog]
# format choices are 0 (classic revlog format) and 1 revlogng
format=1
2006-04-04 16:38:43 -04:00
Thomas Arendsen Hein
b0d4fa70db Catch urllib errors for old-http in a nicer way. 2006-03-01 15:29:13 +01:00
Benoit Boissinot
32f8c6a746 cleanup of revlog.group when repository is local
revlog.group cached every chunk from the revlog, the behaviour was
needed to minimize the roundtrip with old-http.

We now cache the revlog data ~4MB at a time.

The memory used server side when pulling goes down to 35Mo maximum
whereas without the patch more than 160Mo was used when cloning the linux kernel
repository.
The time used by cloning is higher mainly because of the check in revlog.revision.
before
110.25user 20.90system 2:52.00elapsed 76%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+708707minor)pagefaults 0swaps
after
117.56user 18.86system 2:50.43elapsed 80%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+748366minor)pagefaults 0swaps
2005-12-27 13:09:49 -06:00
Bryan O'Sullivan
2b2effba47 Move urllib error handling from revlog into statichttprepo, where it belongs. 2005-09-23 00:05:16 -07:00
mpm@selenic.com
f1273ca2af Separate out old-http support
- create new statichttprepo class
- pull remote bits out of localrepo
- pull remote bits out of util.opener
- switch hg.repository to use statichttprepo
2005-08-27 16:28:53 -07:00