mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
Send all available data during a pull
This commit is contained in:
parent
3667c253fd
commit
efdfcc1502
@ -109,7 +109,6 @@ class shallowbundle(changegroup.bundle10):
|
||||
if filestosend == NoFiles:
|
||||
return iter([])
|
||||
else:
|
||||
phase = repo._phasecache.phase
|
||||
files = []
|
||||
# Prefetch the revisions being bundled
|
||||
for i, fname in enumerate(sorted(changedfiles)):
|
||||
@ -118,10 +117,11 @@ class shallowbundle(changegroup.bundle10):
|
||||
# Normally we'd prune the linkrevnodes first,
|
||||
# but that would perform the server fetches one by one.
|
||||
for fnode, cnode in list(linkrevnodes.iteritems()):
|
||||
# Adjust linknodes so public file revisions aren't sent
|
||||
# Adjust linknodes so remote file revisions aren't sent
|
||||
if filestosend == LocalFiles:
|
||||
rev = repo.changelog.rev(cnode)
|
||||
if phase(repo, rev) == phases.public:
|
||||
localkey = fileserverclient.getlocalkey(fname, hex(fnode))
|
||||
localpath = repo.sjoin(os.path.join("data", localkey))
|
||||
if not os.path.exists(localpath):
|
||||
del linkrevnodes[fnode]
|
||||
else:
|
||||
files.append((fname, hex(fnode)))
|
||||
|
@ -27,7 +27,7 @@
|
||||
M x
|
||||
M y
|
||||
? a
|
||||
3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob)
|
||||
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
|
||||
$ hg add a
|
||||
$ hg status
|
||||
M x
|
||||
@ -59,7 +59,7 @@
|
||||
$ echo xxx > x
|
||||
$ echo yyy > y
|
||||
$ hg commit -m a
|
||||
2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob)
|
||||
2 files fetched over 2 fetches - (2 misses, 0.00% hit ratio) over *s (glob)
|
||||
|
||||
# rebase
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
||||
adding changesets
|
||||
adding manifests
|
||||
adding file changes
|
||||
added 2 changesets with 2 changes to 2 files
|
||||
added 2 changesets with 1 changes to 1 files
|
||||
(run 'hg update' to get a working copy)
|
||||
|
||||
# pull from shallow to shallow (ssh)
|
||||
@ -65,7 +65,7 @@
|
||||
adding changesets
|
||||
adding manifests
|
||||
adding file changes
|
||||
added 2 changesets with 2 changes to 2 files
|
||||
added 2 changesets with 1 changes to 1 files
|
||||
(run 'hg update' to get a working copy)
|
||||
|
||||
$ hg up
|
||||
@ -116,3 +116,22 @@
|
||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ cat a
|
||||
a
|
||||
|
||||
# push public commits
|
||||
|
||||
$ cd ../shallow
|
||||
$ echo p > p
|
||||
$ hg commit -qAm p
|
||||
$ hg phase -f -p -r .
|
||||
$ echo d > d
|
||||
$ hg commit -qAm d
|
||||
|
||||
$ cd ../shallow2
|
||||
$ hg pull ../shallow
|
||||
pulling from ../shallow
|
||||
searching for changes
|
||||
adding changesets
|
||||
adding manifests
|
||||
adding file changes
|
||||
added 2 changesets with 2 changes to 2 files
|
||||
(run 'hg update' to get a working copy)
|
||||
|
Loading…
Reference in New Issue
Block a user