[merge] Make merge internals private

Martin Pool mbp at sourcefrog.net
Fri Jan 20 04:41:29 GMT 2006


On 18 Jan 2006, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> Martin Pool wrote:
> > In the version I have
> > <aaron.bentley at utoronto.ca-20060118015458-ba73c07352e1af17>
> > only MergeConflictHandler is in _merge.py.  
> 
> Oh, heh.  I started by moving *everything* to _merge.py, and then moving
> back the things that I thought should be public.
> 
> > Perhaps if this is meant to
> > be a bzrlib-internal class it would be better called
> > _MergeConflictHandler.  (In which case it could go back in merge.py if
> > you wanted :-)
> 
> Oh, I thought we could make entire files private by prefixing them with
> an underscore.  _merge._MergeConflictHandler seems like overkill, but I
> can put it back in merge, instead.

I think it's fine to either make them both private or just the class.
I think there is some advantage to having the classname flagged, so
people get the clue if they see it used elsewhere.

> > I shared John's surprise that it would become private, thinking that
> > this would mean it wasn't possible to customize conflict handling.  So
> > perhaps a comment explaining the right (or new) way to do it would help.
> 
> I'm not sure that, for a given operation, it's useful to customize
> conflict handling.  To date, real code only uses MergeConflictHandler,
> and testing code uses ExceptionConflictHandler.  So I think this is an
> API in search of a problem.
> 
> Reverting a tree and performing a merge have different conflict handling
> needs, but there's no reason I can see to vary the conflict handling of
> merge, per se. So each operation does its own conflict handling.

That makes sense - so no need to make it public for the moment then.

-- 
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060120/e8ca9321/attachment.pgp 


More information about the bazaar mailing list