Merge lp:~vila/bzr/525571-minimal-atomic-write-bazaar-conf-files-2.1 into lp:bzr/2.1
Proposed by
Vincent Ladeuil
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | John A Meinel | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 4849 | ||||
Proposed branch: | lp:~vila/bzr/525571-minimal-atomic-write-bazaar-conf-files-2.1 | ||||
Merge into: | lp:bzr/2.1 | ||||
Diff against target: |
52 lines (+13/-4) 2 files modified
NEWS (+4/-0) bzrlib/config.py (+9/-4) |
||||
To merge this branch: | bzr merge lp:~vila/bzr/525571-minimal-atomic-write-bazaar-conf-files-2.1 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
John A Meinel | Needs Fixing | ||
Review via email: mp+29086@code.launchpad.net |
Commit message
Minimal fix for bug #525571 to ease backport to launchpad.
Description of the change
This is a minimal patch to address bug #525571 (concurrent config writers) without any attempt to cleanup anything ;)
To post a comment you must log in.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vincent Ladeuil wrote:
> Vincent Ladeuil has proposed merging lp:~vila/bzr/525571-minimal-lock-bazaar-conf-files-2.1 into lp:bzr/2.1.
>
> Requested reviews:
> bzr-core (bzr-core)
>
>
> This is a minimal patch to address bug #525571 (concurrent config writers) without any attempt to cleanup anything ;)
>
>
1) If we know we are accessing a local file (since you are using open()
directly), then we could just use AtomicFile directly.
2) I'm a bit concerned about the need for self._get_ filename( )).
safe_unicode(
3) You can do
dirname, basename = osutils. split(fname)
rather than doing it 2x.
Personally, I'd really rather see AtomicFile than Transport for this.
Specifically, if fname was ever Unicode, this would break. As Transport
expects the 'relpath' to be a URL, and you are handing it a Unicode
string. Oh, and it would probably break if fname had any funny
characters like % in it.
review: needsfixing
John
=:->
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org/
t9DoACgkQJdeBCY SNAAOE7ACgzcbdL qynPzKMStWmEZkV gOtA Cecwo/NHh2x7+ jOCG
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkw
2jYAn0BNItWLFxQ
=EmU/
-----END PGP SIGNATURE-----