~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/upgrade.py

  • Committer: Aaron Bentley
  • Date: 2005-09-12 13:48:32 UTC
  • mfrom: (1185.3.4)
  • mto: (1185.1.16)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: abentley@panoramicfeedback.com-20050912134832-c23db11dc63170b6
Merged from mpool

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# along with this program; if not, write to the Free Software
16
16
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
17
 
 
18
import tempfile, os, errno
 
19
                
18
20
import bzrlib.errors
19
21
import bzrlib.progress
 
22
from bzrlib.xml import serializer_v4
20
23
 
21
24
 
22
25
def upgrade(branch):
96
99
                # revision entry. I'm not supremely happy about it, but
97
100
                # there should be *some* way of making old entries have
98
101
                # the full meta information.
99
 
                import tempfile, os, errno
100
 
                from bzrlib.xml import pack_xml
101
 
                
102
102
                rev_tmp = tempfile.TemporaryFile()
103
 
                pack_xml(rev, rev_tmp)
 
103
                serializer_v4.write_revision(rev, rev_tmp)
104
104
                rev_tmp.seek(0)
105
105
 
106
106
                tmpfd, tmp_path = tempfile.mkstemp(prefix=rev_id, suffix='.gz',