> If you enable eol extension on a per-repository basis, it may lead
> inconsistent behavior. TortoiseHg loads more than one repositories in a single
> process but Mercurial extension affects globally.
> 
> https://bitbucket.org/tortoisehg/thg/issue/984/
> 
> It also happens when pulling from / pushing to a local repository.
> 
> http://thread.gmane.org/gmane.comp.version-control.mercurial.devel/50212
> 
> Still you want to use per-repository extension, try to disable "Show Subrepos
> on Registry" (View -> Repository Registry Options), which currently loads all
> repositories listed, and avoid to open more than one repositories in the same
> window.

Thank you, that was very useful information.

My colleague found the problem today... and it was definitely at our end, and 
not TortoiseHg.

I'm posting the info here in case it helps out anyone else in future...

"To implement end-of-line checking in checkfiles.py I borrow some code from the 
eol extension itself.

eol = load(self.ui, 'eol', '')

I assumed that 'load' would be a local thing but apparently it causes the 
extensions to be activated for the duration of the process. Oops!"

The fix was to change some code in our pre-commit hook from:

    from mercurial.extensions import load
    eol = load(self.ui, 'eol', '')

    eolfile = eol.parseeol(self.ui, self.repo, [self.repo.dirstate.p1()])

to:

    from hgext.eol import parseeol

    eolfile = parseeol(self.ui, self.repo, [self.repo.dirstate.p1()])

Clare


LEGAL NOTICE
Unless expressly stated otherwise, information contained in this
message is confidential. If this message is not intended for you,
please inform [email protected] and delete the message.
The Cambridge Crystallographic Data Centre is a company Limited
by Guarantee and a Registered Charity.
Registered in England No. 2155347 Registered Charity No. 800579
Registered office 12 Union Road, Cambridge CB2 1EZ.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Tortoisehg-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-discuss

Reply via email to