At file:///data/jelmer/bzr-svn/0.5/

------------------------------------------------------------
revno: 2005
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
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()


-- 
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits

Reply via email to