Merge lp:~abentley/bzr/is_executable into lp:bzr/2.2
| Status: | Superseded |
|---|---|
| Proposed branch: | lp:~abentley/bzr/is_executable |
| Merge into: | lp:bzr/2.2 |
| Diff against target: |
122 lines (+46/-5) 6 files modified
NEWS (+3/-0) bzrlib/revisiontree.py (+1/-1) bzrlib/tests/per_tree/__init__.py (+1/-0) bzrlib/tests/per_tree/test_is_executable.py (+37/-0) bzrlib/tests/test_transform.py (+3/-3) bzrlib/workingtree_4.py (+1/-1) |
| To merge this branch: | bzr merge lp:~abentley/bzr/is_executable |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Martin Pool | Approve on 2010-12-01 | ||
| John A Meinel | Needs Information on 2010-11-30 | ||
| Andrew Bennetts | 2010-11-29 | Abstain on 2010-11-30 | |
|
Review via email:
|
|||
This proposal has been superseded by a proposal from 2010-11-30.
Description of the Change
Hi all,
This branch fixes RevisionTree.
the same way as other Tree implementations-- to return False rather than None.
The revised behaviour is also consistent with RevisionTree.
This problem filters up and affects Launchpad's incremental diffs for merge
proposals (which are disabled until this issue can be resolved), causing them
to erroneously report property changes on directories and symlinks
that have not changed.
Three tests have been affected, but FWICT, they were testing actual behaviour,
not desirable behaviour. Specifically, the ROOT_ENTRY should only be included
in iter_changes-style output when it has changed, when it has a new child, or
when include_unchanged is specified.
| John A Meinel (jameinel) wrote : | # |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/29/2010 5:50 PM, Aaron Bentley wrote:
> Aaron Bentley has proposed merging lp:~abentley/bzr/is_executable into lp:bzr/2.2.
>
> Requested reviews:
> bzr-core (bzr-core)
>
>
> Hi all,
>
> This branch fixes RevisionTree.
> the same way as other Tree implementations-- to return False rather than None.
> The revised behaviour is also consistent with RevisionTree.
>
> This problem filters up and affects Launchpad's incremental diffs for merge
> proposals (which are disabled until this issue can be resolved), causing them
> to erroneously report property changes on directories and symlinks
> that have not changed.
>
> Three tests have been affected, but FWICT, they were testing actual behaviour,
> not desirable behaviour. Specifically, the ROOT_ENTRY should only be included
> in iter_changes-style output when it has changed, when it has a new child, or
> when include_unchanged is specified.
I'm a little concerned about doing this in a stable series. I think the
patch is definitely worthy for trunk.
I'm guessing you did it this way because you want it in the launchpad
codebase?
review: needs_information
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkz
4jMAn2bc2xDxFQ0
=RuBa
-----END PGP SIGNATURE-----
| Aaron Bentley (abentley) wrote : | # |
I proposed for 2.2 because I want it for Launchpad, and because it seemed like a small change. I didn't imagine that clients would actually care about the executability of symlinks or directories, but I can think of at least one client (difftacular, used by Launchpad) that cares that the output of RevisionTree.
So on balance, it still seems like a reasonable change to make in a stable series. That said, I can propose a more conservative patch for 2.2 that will merely correct the output of RevisionTree.
| Martin Pool (mbp) wrote : | # |
Keeping 2.2 stable is very important. It's also desirable to keep Launchpad on the stable branch and to have them actually running that branch, not something diverged from it. This also seems at least plausibly like a bug that could be justified to fix in 2.2, assuming the fix is safe.
With regard to assessing safety, it would help to say in the cover letter and NEWS what the behaviour was before. If it crashes, then it seems unlikely that anyone was counting on that behaviour. But I see from the diff it's obviously None.
Consistency with other Trees is a pretty good reason to change it.
=== modified file 'bzrlib/
--- bzrlib/
+++ bzrlib/
@@ -2344,7 +2344,7 @@
ROOT_ENTRY = ('TREE_ROOT', ('', ''), False, (True, True), (None, None),
- ('', ''), ('directory', 'directory'), (False, None))
+ ('', ''), ('directory', 'directory'), (False, False))
class TestTransformPr
@@ -2437,13 +2437,13 @@
changes = preview_
- self.assertEqua
+ self.assertEqua
def test_want_
changes = preview_
- self.assertEqua
+ self.assertEqua
def test_ignore_
# extra_trees is harmless without specific_files, so we'll silently
So that's a consequence of the value now being the same in all trees, therefore it's not detected as changing?
It seems like if we do break any API clients, it might be through side effects of things like this, rather than because they directly care about the is_executable value.
We could try testing the 2.2-related branches or releases with this patch.
- 5114. By Aaron Bentley on 2010-12-01
-
Clarify NEWS entry.
| Martin Pool (mbp) wrote : | # |
Aaron told me on irc that he checked this against some core plugins, and found no new failures, so I think we should merge this to 2.2.

The fix itself seems good.
(I already said this on IRC, but for the benefit of people looking at this page) The change to behaviour seems in principle reasonable, but I'd be nervous about landing it in the stable branch. I'm not sure how likely this is, but it's at least plausible that a plugin might be depending on the root entry being emitted in that case. So my preference is to land this just on lp:bzr.
One extremely minor nit is that the preferred way to do locking and addCleanup is now as a one-liner:
self. addCleanup( tree.lock_ read(). unlock)
So if you wish, you could make that tweak, but it's not a big deal at all.
I'm going to vote "Abstain" because the key decision about whether to land this on 2.2 is up to the RM rather than a reviewer, I think.