/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/reconcile.py

  • Committer: Martin Pool
  • Date: 2009-06-10 02:51:23 UTC
  • mfrom: (4423 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4464.
  • Revision ID: mbp@sourcefrog.net-20090610025123-2u0c0ng5jcezjzqh
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
"""Reconcilers are able to fix some potential data errors in a branch."""
18
18
 
137
137
    def _reconcile_revision_history(self):
138
138
        repo = self.branch.repository
139
139
        last_revno, last_revision_id = self.branch.last_revision_info()
140
 
        real_history = list(repo.iter_reverse_revision_history(
141
 
                                last_revision_id))
 
140
        real_history = []
 
141
        try:
 
142
            for revid in repo.iter_reverse_revision_history(
 
143
                    last_revision_id):
 
144
                real_history.append(revid)
 
145
        except errors.RevisionNotPresent:
 
146
            pass # Hit a ghost left hand parent
142
147
        real_history.reverse()
143
148
        if last_revno != len(real_history):
144
149
            self.fixed_history = True
505
510
            total_inventories = len(list(
506
511
                collection.inventory_index.combined_index.iter_all_entries()))
507
512
            if len(all_revisions):
508
 
                self._packer = repofmt.pack_repo.ReconcilePacker(
509
 
                    collection, packs, ".reconcile", all_revisions)
510
 
                new_pack = self._packer.pack(pb=self.pb)
 
513
                new_pack =  self.repo._reconcile_pack(collection, packs,
 
514
                    ".reconcile", all_revisions, self.pb)
511
515
                if new_pack is not None:
512
516
                    self._discard_and_save(packs)
513
517
            else: