Rev 4732: pass the to-be-obsoleted packs into _save_pack_names for 2a repos. in http://bazaar.launchpad.net/~jameinel/bzr/2.0.4-autopack-rename-507557
John Arbash Meinel
john at arbash-meinel.com
Thu Jan 21 16:59:45 GMT 2010
At http://bazaar.launchpad.net/~jameinel/bzr/2.0.4-autopack-rename-507557
------------------------------------------------------------
revno: 4732
revision-id: john at arbash-meinel.com-20100121165921-rcie6mtki4a1i4j3
parent: john at arbash-meinel.com-20100120194525-eqir8ml4nohdbezk
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.0.4-autopack-rename-507557
timestamp: Thu 2010-01-21 10:59:21 -0600
message:
pass the to-be-obsoleted packs into _save_pack_names for 2a repos.
remove some debugging code.
-------------- next part --------------
=== modified file 'bzrlib/repofmt/groupcompress_repo.py'
--- a/bzrlib/repofmt/groupcompress_repo.py 2009-12-16 20:20:04 +0000
+++ b/bzrlib/repofmt/groupcompress_repo.py 2010-01-21 16:59:21 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2008, 2009 Canonical Ltd
+# Copyright (C) 2008, 2009, 2010 Canonical Ltd
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -704,10 +704,11 @@
self._remove_pack_from_memory(pack)
# record the newly available packs and stop advertising the old
# packs
- result = self._save_pack_names(clear_obsolete_packs=True)
- # Move the old packs out of the way now they are no longer referenced.
- for revision_count, packs in pack_operations:
- self._obsolete_packs(packs)
+ to_be_obsoleted = []
+ for _, packs in pack_operations:
+ to_be_obsoleted.extend(packs)
+ result = self._save_pack_names(clear_obsolete_packs=True,
+ obsolete_packs=to_be_obsoleted)
return result
=== modified file 'bzrlib/repofmt/pack_repo.py'
--- a/bzrlib/repofmt/pack_repo.py 2010-01-20 19:45:25 +0000
+++ b/bzrlib/repofmt/pack_repo.py 2010-01-21 16:59:21 +0000
@@ -2015,10 +2015,6 @@
# _packs_at_load is meant to be the explicit list of names in
# 'pack-names' at then start. As such, it should not contain any
# pending names that haven't been written out yet.
- pack_names_nodes = disk_nodes.difference(new_nodes)
- pack_names_nodes.update(deleted_nodes)
- if pack_names_nodes != orig_disk_nodes:
- import pdb; pdb.set_trace()
self._packs_at_load = orig_disk_nodes
(removed, added,
modified) = self._syncronize_pack_names_from_disk_nodes(disk_nodes)
More information about the bazaar-commits
mailing list