Merge lp://staging/~mbp/bzr/427773-empty-limbo into lp://staging/bzr/2.4

Proposed by Martin Pool
Status: Merged
Approved by: Martin Pool
Approved revision: no longer in the source branch.
Merged at revision: 6062
Proposed branch: lp://staging/~mbp/bzr/427773-empty-limbo
Merge into: lp://staging/bzr/2.4
Diff against target: 114 lines (+51/-18)
4 files modified
bzrlib/osutils.py (+15/-0)
bzrlib/tests/per_merger.py (+24/-8)
bzrlib/transform.py (+6/-10)
doc/en/release-notes/bzr-2.4.txt (+6/-0)
To merge this branch: bzr merge lp://staging/~mbp/bzr/427773-empty-limbo
Reviewer Review Type Date Requested Status
Jelmer Vernooij Pending
Review via email: mp+83857@code.staging.launchpad.net

This proposal supersedes a proposal from 2011-11-29.

Commit message

tolerate empty limbo and pending-deletion directories (bug 427773)

Description of the change

fix up niggling bug 427773 by tolerating empty limbo dirs.

also, I saw we were actually squashing any exception raised while creating them, so this fixes that.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote : Posted in a previous version of this proposal

I guess FAT is another filesystem on Unix where this occurs?

102 +class _PosixPermissionsFeature(Feature):
103 +
104 + def _probe(self):
105 + def has_perms():
106 + # create temporary file and check if specified perms are maintained.
107 + import tempfile
108 +
109 + write_perms = stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR
110 + f = tempfile.mkstemp(prefix='bzr_perms_chk_')
Should this be using self.test_dir ? I'm not sure how to get at that variable from within a Feature though. I'm not sure how many people have /tmp mounted over SMB though. :-)

review: Approve
Revision history for this message
Martin Pool (mbp) wrote : Posted in a previous version of this proposal

ah, this is orignially off 2.4 so the diff is a bit weird...

Revision history for this message
Martin Pool (mbp) wrote :

+class _PosixPermissionsFeature(Feature):

That's in 2.4 and I guess not yet merged up to trunk.

I think it is probably harmless enough not to be worth chasing: it's possible that tempfile creates things in a different place to what our TestCase does but not all that likely.

It would be kind of nice to move the tests's own tempdir into a feature that could somehow be depended upon by this. It seems like you want almost a concept of a dynamic scope environment for the tests, or perhaps just a pointer back to the test object is enough.

Anyhow, I will merge the limbo related bits, thanks for the review.

Revision history for this message
Martin Pool (mbp) wrote :

sent to pqm by email

Revision history for this message
Martin Pool (mbp) wrote :

sent to pqm by email

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