Rev 2858: (robertc) Reconcile tweaks from the packs branch. (Robert Collins) in http://people.ubuntu.com/~robertc/baz2.0/reconcile

Robert Collins robertc at robertcollins.net
Tue Sep 25 04:57:31 BST 2007


At http://people.ubuntu.com/~robertc/baz2.0/reconcile

------------------------------------------------------------
revno: 2858
revision-id: robertc at robertcollins.net-20070925035721-wjyn9fjd4vxy5n7f
parent: pqm at pqm.ubuntu.com-20070925032108-y6nxt0xmghqldn4g
committer: Robert Collins <robertc at robertcollins.net>
branch nick: reconcile
timestamp: Tue 2007-09-25 13:57:21 +1000
message:
  (robertc) Reconcile tweaks from the packs branch. (Robert Collins)
modified:
  bzrlib/reconcile.py            reweave_inventory.py-20051108164726-1e5e0934febac06e
  bzrlib/tests/blackbox/test_reconcile.py test_fix.py-20060223013051-9a188e15a5ee9451
=== modified file 'bzrlib/reconcile.py'
--- a/bzrlib/reconcile.py	2007-09-12 04:21:51 +0000
+++ b/bzrlib/reconcile.py	2007-09-25 03:57:21 +0000
@@ -17,7 +17,12 @@
 """Reconcilers are able to fix some potential data errors in a branch."""
 
 
-__all__ = ['reconcile', 'Reconciler', 'RepoReconciler', 'KnitReconciler']
+__all__ = [
+    'KnitReconciler',
+    'reconcile',
+    'Reconciler',
+    'RepoReconciler',
+    ]
 
 
 from bzrlib import ui
@@ -77,6 +82,11 @@
 class RepoReconciler(object):
     """Reconciler that reconciles a repository.
 
+    The goal of repository reconciliation is to make any derived daata
+    consistent with the core data committed by a user. This can involve 
+    reindexing, or removing unreferenced data if that can interfere with
+    queries in a given repository.
+
     Currently this consists of an inventory reweave with revision cross-checks.
     """
 
@@ -267,9 +277,7 @@
 class KnitReconciler(RepoReconciler):
     """Reconciler that reconciles a knit format repository.
 
-    This will detect garbage inventories and remove them.
-
-    Inconsistent parentage is checked for in the revision weave.
+    This will detect garbage inventories and remove them in thorough mode.
     """
 
     def _reconcile_steps(self):

=== modified file 'bzrlib/tests/blackbox/test_reconcile.py'
--- a/bzrlib/tests/blackbox/test_reconcile.py	2007-06-27 19:13:50 +0000
+++ b/bzrlib/tests/blackbox/test_reconcile.py	2007-09-25 03:57:21 +0000
@@ -54,7 +54,11 @@
         repo = t.branch.repository
         inv = Inventory(revision_id='missing')
         inv.root.revision='missing'
+        repo.lock_write()
+        repo.start_write_group()
         repo.add_inventory('missing', inv, [])
+        repo.commit_write_group()
+        repo.unlock()
         (out, err) = self.run_bzr('reconcile')
         self.assertEqualDiff(out, "Reconciling repository %s\n"
                                   "Backup Inventory created.\n"



More information about the bazaar-commits mailing list