bzr move duplicates content of binary files until repacked

Bug #704340 reported by Leonardo Montecchi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

Hello,
I have tried to add to a bzr reository a directory containing 10-20 binary files of about 2 MB each (photos).
Whenever trying to move (i.e. rename) the files it seems that the whole content of the files is duplicated in the repository, instead of just storing the new name.

Steps to reproduce:

bzr init
--copy into the repository a binary file--
cp /home/user/Pictures/test.jpg
bzr add test.jpg
bzr commit
--check the size of the repository (it should be about the size of the binary file)--
du -sh .bzr/
--rename the file--
bzr mv test.jpg bug.jpg
bzr commit
--check the size of the repository--
du -sh .bzr/

You will notice that the size of the repository has doubled.
Is this an intended behavior?

Revision history for this message
Leonardo Montecchi (lmontecchi) wrote :

Bazaar (bzr) 2.2.1
  Python interpreter: /usr/bin/python 2.6.6
  Python standard library: /usr/lib/python2.6
  Platform: Linux-2.6.35-23-generic-x86_64-with-Ubuntu-10.10-maverick
  bzrlib: /usr/lib/python2.6/dist-packages/bzrlib
  Bazaar configuration: /home/montex/.bazaar
  Bazaar log file: /home/montex/.bzr.log

Revision history for this message
Max Bowsher (maxb) wrote :

Following on from the previous commands, try:

bzr pack --clean-obsolete-packs
du -sh .bzr/

The duplicated storage is, in my experience, reclaimed.

Granted, ideally it would never be duplicated even temporarily, but this is better than it being duplicated permanently.

Revision history for this message
John A Meinel (jameinel) wrote :

We record a new entry in the per-file graph for the object, because it "changed" somehow (in this case, a new parent directory). At the moment this requires writing a text. Commit always stores unpacked texts (without delta compression against existing content).

When autopack/'bzr pack' decides to combine the contents, it will see that they are identical and then the duplication will be removed.

summary: - bzr move duplicates content of binary files
+ bzr move duplicates content of binary files until repacked
Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.