~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/pack_repo.py

(jam) Fix bug #507566 for correctness w/ concurrent autopacks

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007, 2008 Canonical Ltd
 
1
# Copyright (C) 2007-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
1987
1987
        if first_read:
1988
1988
            return True
1989
1989
        # out the new value.
1990
 
        disk_nodes, _, _ = self._diff_pack_names()
1991
 
        self._packs_at_load = disk_nodes
 
1990
        disk_nodes, deleted_nodes, new_nodes = self._diff_pack_names()
 
1991
        # _packs_at_load is meant to be the explicit list of names in
 
1992
        # 'pack-names' at then start. As such, it should not contain any
 
1993
        # pending names that haven't been written out yet.
 
1994
        pack_names_nodes = disk_nodes.difference(new_nodes)
 
1995
        pack_names_nodes.update(deleted_nodes)
 
1996
        self._packs_at_load = pack_names_nodes
1992
1997
        (removed, added,
1993
1998
         modified) = self._syncronize_pack_names_from_disk_nodes(disk_nodes)
1994
1999
        if removed or added or modified: