Rev 2005: Allow optimization if target repository is empty. in file:///data/jelmer/bzr-svn/0.5/
Jelmer Vernooij
jelmer at samba.org
Mon Nov 17 16:58:46 GMT 2008
At file:///data/jelmer/bzr-svn/0.5/
------------------------------------------------------------
revno: 2005
revision-id: jelmer at samba.org-20081117165841-v1aydefy0gtuccf6
parent: jelmer at samba.org-20081117164030-tow1eb74fackq98g
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.5
timestamp: Mon 2008-11-17 17:58:41 +0100
message:
Allow optimization if target repository is empty.
modified:
fetch.py fetch.py-20060625004942-x2lfaib8ra707a8p-1
=== modified file 'fetch.py'
--- a/fetch.py 2008-11-17 16:40:30 +0000
+++ b/fetch.py 2008-11-17 16:58:41 +0000
@@ -594,7 +594,7 @@
return [(meta_map[revid], mapping) for revid in needed]
def _find_until(self, foreign_revid, mapping, find_ghosts=False, pb=None,
- checked=None, project=None):
+ checked=None, project=None, target_is_empty=False):
"""Find all missing revisions until revision_id
:param revision_id: Stop revision
@@ -619,7 +619,7 @@
break
if revmeta.is_hidden(mapping):
continue
- if not self.target.has_revision(revmeta.get_revision_id(mapping)):
+ if target_is_empty or not self.target.has_revision(revmeta.get_revision_id(mapping)):
revmetas.append(revmeta)
for p in revmeta.get_rhs_parents(mapping):
try:
@@ -774,6 +774,7 @@
needed = self._find_all(self.source.get_mapping(), pb=nested_pb)
else:
foreign_revid, mapping = self.source.lookup_revision_id(revision_id)
+ # FIXME: Specify target_is_empty
needed = self._find_until(foreign_revid, mapping, find_ghosts, pb=nested_pb)
finally:
nested_pb.finished()
More information about the bazaar-commits
mailing list