im trying to write an extension, that adds some Text at the end of the 
But my example gives me an TypeError: expected a 20-byte hash error on commit. 
Where is my failure?
Here is my extension code:

import re
import mercurial, sys, os

def reposetup(ui, repo):

            #Create a derived class that actually does what you want.
            class megarepo(repo.__class__):

                        def commitctx(self, ctx, *args, **kwargs):
                                   org_text = ctx._text
                                   ctx._text += ' [Version]'

    #Make sure to actually use the new subclass.
            repo.__class__ = megarepo

# We aren't adding any commands to hg.
cmdtables = {}

#List of known compatible versions of hg.
testedwith = '2.5.1'
Mercurial-devel mailing list

Reply via email to