Commit Graph

15 Commits

Author SHA1 Message Date
Alexis S. L. Carvalho
35d879891a bundlerepo: avoid exception in __del__ when the bundle doesn't exist
$ hg -R bundle://foo.hg
abort: No such file or directory: foo.hg
Exception exceptions.AttributeError: "'bundlerepository' object has no attribute 'bundlefile'" in <bound method bundlerepository.__del__ of <mercurial.bundlerepo.bundlerepository object at 0xa7ab9fac>> ignored
2006-10-16 20:38:04 -03: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
Benoit Boissinot
600d0a563c add support for compressed bundle repositories
we simply create a uncompressed bundle in a tempfile
in .hg
2006-05-12 18:38:56 +02:00
Benoit Boissinot
137780258f indent: fix alignment 2006-05-11 11:24:28 +02:00
Benoit Boissinot
45eac475a5 fix errors spotted by pychecker (mostly scope problems) 2006-05-11 11:15:23 +02:00
Vadim Gelfer
fad839fb0b fix file handling bugs on windows.
add util.posixfile class that has posix semantics on windows.
fix util.rename so it works with stupid windows delete semantics.
2006-05-02 14:30:00 -07:00
Benoit Boissinot
b5423b8015 cached data was wrong: rev is different from self.rev(node) in bundlerepo.py 2006-04-25 23:28:40 +02:00
Chris Mason
19f27664d2 Make bundlerepo use proper index format for revlogng
bundlerepo just appends index entries from the bundle onto the index for the
current repo.  This patch makes sure it appends the correct format.
2006-04-20 13:08:16 -04:00
mason@suse.com
f12a5d7469 Fix bundle repos to use an index tuple consistent with revlogng
The bundle repo code was adding a field to the index tuple, which
confused the revlogng changes.  This creates a new dict instead
to maintain the extra bundle info.
2006-04-04 16:38:43 -04:00
Thomas Arendsen Hein
b246223f51 make incoming work via ssh (issue139); move chunk code into separate module.
Incoming ssh needs to detect the end of the changegroup, otherwise it would
block trying to read from the ssh pipe. This is done by parsing the
changegroup chunks.

bundlerepo.getchunk() already is identical to
localrepo.addchangegroup.getchunk(), which is followed by getgroup which
looks much like what you can re-use in bundlerepository.__init__() and in
write_bundle(). bundlerevlog.__init__.genchunk() looks very similar, too,
as do some while loops in localrepo.py.

Applied patch from Benoit Boissinot to move duplicate/related code
to mercurial/changegroup.py and use this to fix incoming ssh.
2006-03-21 11:47:21 +01:00
Benoit Boissinot
716b941d75 use HG10UN header for uncompressed bundle
- use HG10UN instead of HG11 for uncompressed bundles header
- check HG10BZ for compressed bundle
- better error handling for invalid header

some notes:
- people who created uncompressed bundle will no longer be
  able to use them (it could be fixed with hand-editing)
- older hg cannot detect an uncompressed bundle
  (bzip2 decompression will fail).
2006-03-21 06:03:33 +01:00
Thomas Arendsen Hein
8dceca25c4 imported patch /home/thomas/fix-incoming-abortion4.patch 2006-03-18 09:13:27 +01:00
Benoit Boissinot
979ec0cfd3 bundlerepo: remove relative import, fix a comment 2006-03-13 06:58:31 +01:00
Benoit Boissinot
dcc6cfca90 add bundlerepo.py: a read-only repo that can use uncompressed bundles
The idea is to create a repo consisting of a normal local repository
plus all the changesets contained in a bundle.

The bundle needs to be uncompressed. A futur version could implement
the seeking through a compressed bundle.
2006-03-13 03:54:23 +01:00