-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
merge approve
All but fine now...
Paul Hummer wrote:
> === modified file 'lib/lp/code/model/branchjob.py' > --- lib/lp/code/model/branchjob.py 2009-10-21 23:34:08 +0000 > +++ lib/lp/code/model/branchjob.py 2009-10-22 04:22:18 +0000 > @@ -257,28 +257,32 @@ > """See `IBranchUpgradeJob`.""" > # Set up the new branch structure > upgrade_branch_path = tempfile.mkdtemp() > - upgrade_transport = get_transport(upgrade_branch_path) > - source_branch = self.branch.getBzrBranch() > - source_branch_transport = source_branch.bzrdir.root_transport > - source_branch_transport.copy_tree_to_transport(upgrade_transport) > - upgrade_branch = BzrBranch.open(upgrade_transport.base) > - > - # Perform the upgrade. > - upgrade(upgrade_branch.base, self.upgrade_format) > - > - # Re-open the branch, since its format has changed. > - upgrade_branch = BzrBranch.open(upgrade_transport.base) > - upgrade_branch.pull(source_branch) > - upgrade_branch.fetch(source_branch) > - > - # Move the branch in the old format to backup.bzr > - source_branch_transport.rename('.bzr', 'backup.bzr') > - upgrade_transport.delete_tree('backup.bzr') > - upgrade_transport.copy_tree_to_transport(source_branch_transport) > - > - # Clean up the temporary directory. > - upgrade_transport.delete_tree('.bzr') > - os.rmdir(upgrade_branch_path) > + try: > + upgrade_transport = get_transport(upgrade_branch_path) > + source_branch_transport = get_transport(self.branch.getPullURL()) > + source_branch_transport.copy_tree_to_transport(upgrade_transport) > + upgrade_branch = BzrBranch.open(upgrade_transport.base) > + > + # Perform the upgrade. > + upgrade(upgrade_branch.base, self.upgrade_format) > + > + # Re-open the branch, since its format has changed. > + upgrade_branch = BzrBranch.open_from_transport( > + upgrade_transport) > + source_branch = BzrBranch.open_from_transport( > + source_branch_transport) > + > + source_branch.lock_write() > + upgrade_branch.pull(source_branch) > + upgrade_branch.fetch(source_branch) > + source_branch.unlock() > + > + # Move the branch in the old format to backup.bzr > + source_branch_transport.rename('.bzr', 'backup.bzr') > + upgrade_transport.delete_tree('backup.bzr')
You don't need this line.
> + upgrade_transport.copy_tree_to_transport(source_branch_transport) > + finally: > + shutil.rmtree(upgrade_branch_path) > > @property > def upgrade_format(self):
Cheers, mwh -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkrf4tAACgkQeTTOPm7A7kjE3gCfcqpSHwpQHkYyUFe6nBycGfSb gdAAoILC14HcnXFuSv0kbBRrhRDD9StK =zuVZ -----END PGP SIGNATURE-----
« Back to merge proposal
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
merge approve
All but fine now...
Paul Hummer wrote:
> === modified file 'lib/lp/ code/model/ branchjob. py' code/model/ branchjob. py 2009-10-21 23:34:08 +0000 code/model/ branchjob. py 2009-10-22 04:22:18 +0000 Job`."" " upgrade_ branch_ path) getBzrBranch( ) branch_ transport = source_ branch. bzrdir. root_transport branch_ transport. copy_tree_ to_transport( upgrade_ transport) open(upgrade_ transport. base) upgrade_ branch. base, self.upgrade_ format) open(upgrade_ transport. base) branch. pull(source_ branch) branch. fetch(source_ branch) branch_ transport. rename( '.bzr', 'backup.bzr') transport. delete_ tree('backup. bzr') transport. copy_tree_ to_transport( source_ branch_ transport) transport. delete_ tree('. bzr') upgrade_ branch_ path) upgrade_ branch_ path) branch_ transport = get_transport( self.branch. getPullURL( )) branch_ transport. copy_tree_ to_transport( upgrade_ transport) open(upgrade_ transport. base) upgrade_ branch. base, self.upgrade_ format) open_from_ transport( open_from_ transport( branch_ transport) branch. lock_write( ) branch. pull(source_ branch) branch. fetch(source_ branch) branch. unlock( ) branch_ transport. rename( '.bzr', 'backup.bzr') transport. delete_ tree('backup. bzr')
> --- lib/lp/
> +++ lib/lp/
> @@ -257,28 +257,32 @@
> """See `IBranchUpgrade
> # Set up the new branch structure
> upgrade_branch_path = tempfile.mkdtemp()
> - upgrade_transport = get_transport(
> - source_branch = self.branch.
> - source_
> - source_
> - upgrade_branch = BzrBranch.
> -
> - # Perform the upgrade.
> - upgrade(
> -
> - # Re-open the branch, since its format has changed.
> - upgrade_branch = BzrBranch.
> - upgrade_
> - upgrade_
> -
> - # Move the branch in the old format to backup.bzr
> - source_
> - upgrade_
> - upgrade_
> -
> - # Clean up the temporary directory.
> - upgrade_
> - os.rmdir(
> + try:
> + upgrade_transport = get_transport(
> + source_
> + source_
> + upgrade_branch = BzrBranch.
> +
> + # Perform the upgrade.
> + upgrade(
> +
> + # Re-open the branch, since its format has changed.
> + upgrade_branch = BzrBranch.
> + upgrade_transport)
> + source_branch = BzrBranch.
> + source_
> +
> + source_
> + upgrade_
> + upgrade_
> + source_
> +
> + # Move the branch in the old format to backup.bzr
> + source_
> + upgrade_
You don't need this line.
> + upgrade_ transport. copy_tree_ to_transport( source_ branch_ transport) rmtree( upgrade_ branch_ path) format( self):
> + finally:
> + shutil.
>
> @property
> def upgrade_
Cheers, enigmail. mozdev. org
mwh
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkr f4tAACgkQeTTOPm 7A7kjE3gCfcqpSH wpQHkYyUFe6nByc GfSb uSv0kbBRrhRDD9S tK
gdAAoILC14HcnXF
=zuVZ
-----END PGP SIGNATURE-----