Merge lp://staging/~vila/bzr-loom/595584-lazy-load-remote into lp://staging/bzr-loom

Proposed by Vincent Ladeuil
Status: Rejected
Rejected by: Robert Collins
Proposed branch: lp://staging/~vila/bzr-loom/595584-lazy-load-remote
Merge into: lp://staging/bzr-loom
Prerequisite: lp://staging/~vila/bzr-loom/595563-switch-directory
Diff against target: 56 lines (+8/-4)
2 files modified
NEWS (+2/-0)
branch.py (+6/-4)
To merge this branch: bzr merge lp://staging/~vila/bzr-loom/595584-lazy-load-remote
Reviewer Review Type Date Requested Status
Robert Collins (community) Needs Fixing
Review via email: mp+27857@code.staging.launchpad.net

Description of the change

Fix the test failure. I'm not super convinced that's the right approach but I was blocked and this works.

To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Vincent Ladeuil wrote:
> Vincent Ladeuil has proposed merging lp:~vila/bzr-loom/595584-lazy-load-remote into lp:bzr-loom with lp:~vila/bzr-loom/595563-switch-directory as a prerequisite.
>
> Requested reviews:
> Loom Developers (bzr-loom-devs)
> Related bugs:
> #595584 test failure: AssertionError: command ['st'] loaded forbidden modules ['bzrlib.remote', 'bzrlib.smart']
> https://bugs.launchpad.net/bugs/595584
>
>
> Fix the test failure. I'm not super convinced that's the right approach but I was blocked and this works.
>

This seems correct, but unrelated:
@@ -743,11 +744,11 @@
             branch_transport, 'lock', bzrlib.lockdir.LockDir)
         control_files.lock_write()
         try:
- - for name, stream in files:
- - branch_transport.put_file(name, stream)
+ for file_name, stream in files:
+ branch_transport.put_file(file_name, stream)
         finally:
             control_files.unlock()
- - return self.open(a_bzrdir, _found=True, )
+ return self.open(a_bzrdir, _found=True, name=name)

Otherwise, why not use lazy import up at the top, rather than multiple
local imports later?

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwaWvMACgkQJdeBCYSNAAPMKwCfeCk8Ba/aGtGt4hLgd6NEgFbl
bmcAoKIYOHLScNXfpBwgI+XmYfAweR5e
=pdaK
-----END PGP SIGNATURE-----

Revision history for this message
Robert Collins (lifeless) wrote :

I think that a better fix would be not to load the loom branch code for the tariff workflow. I'll see about getting that done today.

review: Needs Fixing
Revision history for this message
Vincent Ladeuil (vila) wrote :

> -----BEGIN PGP SIGNED MESSAGE-----

>
> This seems correct, but unrelated:
> @@ -743,11 +744,11 @@
> branch_transport, 'lock', bzrlib.lockdir.LockDir)
> control_files.lock_write()
> try:
> - - for name, stream in files:
> - - branch_transport.put_file(name, stream)
> + for file_name, stream in files:
> + branch_transport.put_file(file_name, stream)
> finally:
> control_files.unlock()
> - - return self.open(a_bzrdir, _found=True, )
> + return self.open(a_bzrdir, _found=True, name=name)
>

Wow, where is that coming from ???? Probably a forgotten attempt to address the API changes related to colo-branches, sorry about that.

> Otherwise, why not use lazy import up at the top, rather than multiple
> local imports later?

Yeah, why not ? One wonders...

Revision history for this message
Vincent Ladeuil (vila) wrote :

> I think that a better fix would be not to load the loom branch code for the
> tariff workflow. I'll see about getting that done today.

Ok.

Revision history for this message
Robert Collins (lifeless) wrote :

Alternate approach landed.

Unmerged revisions

116. By Vincent Ladeuil

Fix bzr test_import_tariff failure

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches