Hello,

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

#!/usr/bin/python
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
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to