Mercurial > hg
comparison mercurial/hg.py @ 2612:ffb895f16925
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.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 14 Jul 2006 11:17:22 -0700 |
parents | c4325f0a9b91 |
children | 479e26afa10f |
comparison
equal
deleted
inserted
replaced
2611:1b4eb1f92433 | 2612:ffb895f16925 |
---|---|
177 raise util.Abort(_("clone by revision not supported yet " | 177 raise util.Abort(_("clone by revision not supported yet " |
178 "for remote repositories")) | 178 "for remote repositories")) |
179 revs = [src_repo.lookup(r) for r in rev] | 179 revs = [src_repo.lookup(r) for r in rev] |
180 | 180 |
181 if dest_repo.local(): | 181 if dest_repo.local(): |
182 dest_repo.pull(src_repo, heads=revs) | 182 dest_repo.clone(src_repo, heads=revs, pull=pull) |
183 elif src_repo.local(): | 183 elif src_repo.local(): |
184 src_repo.push(dest_repo, revs=revs) | 184 src_repo.push(dest_repo, revs=revs) |
185 else: | 185 else: |
186 raise util.Abort(_("clone from remote to remote not supported")) | 186 raise util.Abort(_("clone from remote to remote not supported")) |
187 | 187 |