Rev 324: Remove unused code. in http://people.samba.org/bzr/jelmer/bzr-svn/bzr.dev

Jelmer Vernooij jelmer at samba.org
Fri Dec 29 02:50:36 GMT 2006


------------------------------------------------------------
revno: 324
revision-id: jelmer at samba.org-20061229025004-qped8lkugogltskd
parent: jelmer at samba.org-20061229020414-tqbmu19p0fup7sdg
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: main
timestamp: Fri 2006-12-29 03:50:04 +0100
message:
  Remove unused code.
modified:
  fetch.py                       fetch.py-20060625004942-x2lfaib8ra707a8p-1
  fileids.py                     fileids.py-20060714013623-u5iiyqqnko11grcf-1
  tests/test_repos.py            test_repos.py-20060508151940-ddc49a59257ca712
=== modified file 'fetch.py'
--- a/fetch.py	2006-12-29 02:04:14 +0000
+++ b/fetch.py	2006-12-29 02:50:04 +0000
@@ -63,8 +63,6 @@
 
         self.pool = Pool()
 
-        mutter('q %r' % self.id_map)
-
     def _get_revision(self, revid):
         if self._parent_ids is None:
             self._parent_ids = ""

=== modified file 'fileids.py'
--- a/fileids.py	2006-12-29 02:04:14 +0000
+++ b/fileids.py	2006-12-29 02:50:04 +0000
@@ -185,14 +185,6 @@
         for p in sorted_paths:
             data = changes[p]
 
-            if data[0] in ('D', 'R'):
-                assert map.has_key(p), "No map entry %s to delete/replace" % p
-                del map[p]
-                # Delete all children of p as well
-                for c in map.keys():
-                    if c.startswith(p+"/"):
-                        del map[c]
-
             if data[0] in ('A', 'R'):
                 map[p] = generate_file_id(revid, p), revid
 

=== modified file 'tests/test_repos.py'
--- a/tests/test_repos.py	2006-12-28 04:46:50 +0000
+++ b/tests/test_repos.py	2006-12-29 02:50:04 +0000
@@ -454,6 +454,21 @@
         repository = Repository.open("svn+%s" % repos_url)
         self.assertTrue(repository.is_shared())
 
+    def test_fetch_delete(self):
+        repos_url = self.make_client('d', 'dc')
+        self.build_tree({'dc/foo/bla': "data"})
+        self.client_add("dc/foo")
+        self.client_commit("dc", "My Message")
+        oldrepos = Repository.open("dc")
+        dir = BzrDir.create("f")
+        newrepos = dir.create_repository()
+        oldrepos.copy_content_into(newrepos)
+        self.client_delete("dc/foo/bla")
+        self.client_commit("dc", "Second Message")
+        newrepos = Repository.open("f")
+        oldrepos.copy_content_into(newrepos)
+        self.assertTrue(oldrepos.has_revision("svn-v%d:2@%s-" % (MAPPING_VERSION, oldrepos.uuid)))
+
     def test_fetch_local(self):
         repos_url = self.make_client('d', 'dc')
         self.build_tree({'dc/foo/bla': "data"})




More information about the bazaar-commits mailing list