/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/bundle/serializer/v4.py

MergeĀ upstream.

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
from cStringIO import StringIO
18
18
import bz2
270
270
        self.repository = repository
271
271
        bundle = BundleWriter(fileobj)
272
272
        self.bundle = bundle
273
 
        self.base_ancestry = set(repository.get_ancestry(base,
274
 
                                                         topo_sorted=False))
275
273
        if revision_ids is not None:
276
274
            self.revision_ids = revision_ids
277
275
        else:
278
 
            revision_ids = set(repository.get_ancestry(target,
279
 
                                                       topo_sorted=False))
280
 
            self.revision_ids = revision_ids.difference(self.base_ancestry)
 
276
            graph = repository.get_graph()
 
277
            revision_ids = graph.find_unique_ancestors(target, [base])
 
278
            # Strip ghosts
 
279
            parents = graph.get_parent_map(revision_ids)
 
280
            self.revision_ids = [r for r in revision_ids if r in parents]
281
281
        self.revision_keys = set([(revid,) for revid in self.revision_ids])
282
282
 
283
283
    def do_write(self):