Commit Graph

25 Commits

Author SHA1 Message Date
Benoit Boissinot
ea7fe6dacc remove unused variables 2008-10-28 19:25:26 +01:00
Martin Geisler
28fb695e9a i18n: mark strings for translation in Mercurial 2008-08-31 16:12:02 +02:00
Dirkjan Ochtman
ecc1ada3d6 make streamclone.stream_out() a generator 2008-08-15 13:25:57 +02:00
Matt Mackall
3a7193d270 streamclone: fold in localrepo.storefiles 2008-08-13 20:18:44 -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
Dirkjan Ochtman
8450fe59e5 Backed out changeset 1a3d3840a7eb (doesn't work on Python 2.3/2.4) 2008-07-02 10:58:27 +02:00
Dirkjan Ochtman
abdd89596c streamclone yields chunks instead of accepting a file-like object 2008-06-29 14:20:01 +02:00
Matt Mackall
a65ef7bc5d util: add sort helper 2008-06-27 18:28:45 -05:00
Joel Rosdahl
4f8012378a Remove unused imports 2008-03-06 22:23:41 +01:00
Benoit Boissinot
30e763291b fix typo 2007-10-11 16:28:30 +02:00
Bryan O'Sullivan
e317f81ab3 Add osutil module, containing a listdir function.
This is similar to os.listdir, only it returns a sorted list of tuples.
2007-10-05 15:01:06 -07:00
Matt Mackall
3e13c68628 Use try/finally pattern to cleanup locks and transactions 2007-07-21 16:02:10 -05:00
Edouard Gomez
52552f6c05 Fix inconsistency for the stream_out capability in hgweb
During some experiments of mine, the uncompressed cloning could not
be enabled for hgweb.cgi nor hgwebdir.cgi though the server claimed
to be stream_out capable.

The only solution was to enable it using the user's .hgrc file.
This solution is not acceptable when publishing the repos through
an HTTP server because the CGI runs as a www dedicated user whose's
home hgrc file may not be accessible to users publishing their repos
through their userdir.

For such cases we could end up with this typical debug output:
hg --debug clone --uncompressed http://server/hg/project
destination directory: project
sending capabilities command
capabilities: lookup changegroupsubset stream=1
unbundle=HG10GZ,HG10BZ,HG10UN
sending stream_out command
abort: operation forbidden by server

The error lies in the fact the hgweb object defines new accessors
to the repo configuration that trust things by default (untrusted=True)
but the streamclone:stream_out function uses the usual accessors to the
repo.ui object, which do not trust by default (untrusted=False)

Fix this inconsistency, adding a new parameter to the stream_out function.
hgweb then forces a "trust by default" behavior.
2007-05-12 00:41:30 +02:00
Alexis S. L. Carvalho
93eb041452 Merge with crew-stable 2007-03-04 09:03:21 -03:00
Patrick Mezard
c2f72d8974 streamclone: stream_out tried to decodefilename non-normalized paths 2007-02-19 09:59:37 +01: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
f4cac82bde streamclone: remove unnecessary test, pconvert names 2006-12-10 14:39:51 +01:00
Benoit Boissinot
e005ffc8c4 switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
Benoit Boissinot
84f8507dc8 introduce localrepo.spath for the store path, sopener fixes 2006-12-05 11:28:23 +01:00
Thomas Arendsen Hein
f3d842aee0 Handle locking exceptions if streaming clone can't lock the repo. (Issue324) 2006-11-20 19:41:49 +01:00
Vadim Gelfer
1cb83d1991 fix problem with uncompressed clone and python 2.3. 2006-07-17 07:43:15 -07:00
Vadim Gelfer
a7bbf7d88f rename stream hgrc option to compressed. 2006-07-16 10:04:16 -07:00
Vadim Gelfer
f7b6882acb clone: disable stream support on server side by default.
enable in hgrc like this:
[server]
stream=True
2006-07-15 16:06:35 -07:00
Vadim Gelfer
9ea4436262 add support for streaming clone.
existing clone code uses pull to get changes from remote repo.  is very
slow, uses lots of memory and cpu.

new clone code has server write file data straight to client, client
writes file data straight to disk.  memory and cpu used are very low,
clone is much faster over lan.

new client can still clone with pull, can still clone from older servers.
new server can still serve older clients.
2006-07-14 11:17:22 -07:00