[PATCH 1 of 4] hgmerge: add new hgmerge package under mercurial

Steve Borho steve at borho.org
Tue Jan 8 12:14:44 CST 2008


Most of these comments are for Arve, so I'll prune my response to just
the ones I'm responsible for.

On Tue, 2008-01-08 at 11:49 -0600, Matt Mackall wrote:
> On Mon, 2008-01-07 at 15:20 -0600, Steve Borho wrote:
> > +
> > +def _ask_unmergeable(ui, local, other, output):
> > +    ''' File is not mergeable, ask user which version to keep.
> > +    @return: Success?
> > +    '''
> > +    def _describe(fdesc):
> > +        '''Describe a file to the user'''
> > +        if not fdesc.islink:
> > +            eoltp = fdesc.eoltype
> > +            if eoltp in ('dos', 'unix', 'mac'):
> > +                return 'is a %s style text file browsable here\n%s' % (
> 
> Browsable?

That's historical.  At one point I was considering a PyGtk app that
would use DND and MIME to allow browsing of the two file versions.
Obviously no longer applicable.  What's a better verb?  viewable?

> > +def eoltype(name):
> > +    ''' Get the EOL type for a file.
> > +    '''
> 
> util.py
> 
> > +def lookup_reg(path):
> > +    ''' Look up a path in the Windows registry.
> > +    @return: The value for the path if found, else None.
> > +    '''
> 
> util_win32.py

Thought so.

> > +# -*- coding: utf-8 -*-s
> 
> No thanks.

The ecmerge registry key has a non-ascii character in it.  Using utf-8
was the easiest solution.  Is there a more generic work around for this?

> > diff --git a/contrib/simplemerge b/mercurial/hgmerge/_simplemerge.py
> > old mode 100755
> > new mode 100644
> > copy from contrib/simplemerge
> > copy to mercurial/hgmerge/_simplemerge.py
> 
> I think we have tests that want to use this.

Noted.  We should be able to simply patch those tests with the new
location.  Our changes to it were mostly cosmetic, forcing it to use
ui.ui() where applicable.

-- 
Steve Borho (steve at borho.org)
http://www.borho.org/~steve/steve.asc
Key fingerprint = 2D08 E7CF B624 624C DE1F  E2E4 B0C2 5292 F2C6 2C8C



More information about the Mercurial-devel mailing list