Merge lp://staging/~parthm/bzr/376388-dot-bazaar-ownership into lp://staging/bzr
Proposed by
Parth Malwankar
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | not available | ||||
Proposed branch: | lp://staging/~parthm/bzr/376388-dot-bazaar-ownership | ||||
Merge into: | lp://staging/bzr | ||||
Diff against target: |
221 lines (+112/-3) 7 files modified
NEWS (+5/-0) bzrlib/config.py (+3/-2) bzrlib/osutils.py (+47/-0) bzrlib/tests/features.py (+10/-0) bzrlib/tests/test_osutils.py (+41/-0) bzrlib/trace.py (+4/-1) doc/developers/testing.txt (+2/-0) |
||||
To merge this branch: | bzr merge lp://staging/~parthm/bzr/376388-dot-bazaar-ownership | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Pool | Approve | ||
Vincent Ladeuil | Needs Fixing | ||
Martin Packman (community) | Needs Fixing | ||
Review via email: mp+19691@code.staging.launchpad.net |
To post a comment you must log in.
This patch fixes bug #376388 by ensuring the .bazaar,
.bazaar/bazaar.conf and .bzr.log inherit usr and grp ownership
from the containing folder.
Following functions are added to osutils:
* copy_ownership: copies usr/grp ownership from src file/dir to dst file/dir
* mkdir: wraps os.mkdir and adds an optional arg ownership_src. When provided,
the newly created dir is given ownership based on ownership_src.
* open: wraps __builtin__.open and adds an optional arg ownership_src. When provided,
the newly created file is given ownership based on ownership_src.
* parent_dir: wraps os.path.dirname handling the special case of dirname returning ''
by returning '.' instead.
config.py and trace.py are updated to use osutils. {mkdir, open} rather than the
base functions during creation of above mentioned files.
Whitebox tests are added to test_osutils.py to verify mkdir, open and parent_dir.
Manual testing for done using "sudo bzr whoami a@b".
ChmodFeature was added to tests/__init__.py to ensure os.chmod support for test
cases.
This proposal was originally based of 2.0: /code.launchpad .net/~parthm/ bzr/2.0_ 376388_ dot_bazaar_ ownership/ +merge/ 19593/
https:/
but is resubmitted now as it is meant to go into trunk and testing requires
overrideAttr support that is not available in 2.0 branch.