[merge] Transport.*_{bytes,file}
Martin Pool
mbp at canonical.com
Wed Sep 6 06:18:10 BST 2006
On 6 Sep 2006, Robert Collins <robertc at robertcollins.net> wrote:
> On Tue, 2006-09-05 at 17:56 -0500, John Arbash Meinel wrote:
> > The attached patch changes the Transport api, such that append() and
> > put() are deprecated, and meant to be replaced by
> > append_bytes/append_file, put_bytes/put_file. This is mostly for api
> > clarity. (It also helps that you can now grep for append_{file,bytes}
> > rather than getting false positives on all of the list.append() calls).
> > The patch also changes all of bzrlib to use these new functions.
> >
> > I implement 'get_bytes()', as well as tests for it, though I chose not
> > to change get => get_bytes just yet. It has always returned a file-like
> > object, and it would be a lot of churn to change it to get_file. I can
> > do that upon request, though.
> >
> > It also implements Transport.non_atomic_put_{bytes,file}. Which has 2
> > differences from just calling append_*.
+1 on the concept, sounds like a nice cleanup. I didn't read it in
detail as robert already approved it.
> rather than non_atomic_put_*, how about put_*_non_atomic - this will
> make searches for ('\.put_') and the like more useful. Also, alpha
> sorting of the methods will keep them together.
Agree.
--
Martin
More information about the bazaar
mailing list