util.abort typo fixes

richhguard-temp at yahoo.co.uk richhguard-temp at yahoo.co.uk
Thu Nov 11 19:40:26 UTC 2010


Hi Greg and Martin,
Thanks for reviewing my change, and especially pointing out the contribution tips page. 
I didn't see that before, it was my fault not looking hard enough - but I will make sure any
future patches follow it. 
 
For completeness I have attached the actual exception I got with gpg.
 
gpg: signing failed: bad passphrase
** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]
** Mercurial Distributed SCM (version 1.7)
** Extensions loaded: children, color, graphlog, gpg, hgshelve, record, progress
Traceback (most recent call last):
  File "hg", line 38, in <module>
  File "mercurial\dispatch.pyc", line 16, in run
  File "mercurial\dispatch.pyc", line 36, in dispatch
  File "mercurial\dispatch.pyc", line 58, in _runcatch
  File "mercurial\dispatch.pyc", line 590, in _dispatch
  File "mercurial\dispatch.pyc", line 401, in runcommand
  File "mercurial\extensions.pyc", line 175, in wrap
  File "hgext\color.pyc", line 223, in colorcmd
  File "mercurial\dispatch.pyc", line 641, in _runcommand
  File "mercurial\dispatch.pyc", line 595, in checkargs
  File "mercurial\dispatch.pyc", line 588, in <lambda>
  File "mercurial\util.pyc", line 427, in check
  File "C:\Documents and Settings\Rich/.hgext/gpg.py", line 230, in sign
    raise util.abort(_("error while signing"))
AttributeError: 'module' object has no attribute 'abort'
 
This is after "hg sign" then typing the wrong password 3 times.
 
Have a good night
Richard
 
 

--- On Thu, 11/11/10, Martin Geisler <mg at lazybytes.net> wrote:


From: Martin Geisler <mg at lazybytes.net>
Subject: Re: util.abort typo fixes
To: richhguard-temp at yahoo.co.uk
Cc: mercurial at selenic.com
Date: Thursday, 11 November, 2010, 6:28


richhguard-temp at yahoo.co.uk writes:

> Hi,
> I got an exception when using the gpg extension and entering the wrong password.
>  
> Here is a patch which fixes the util.abort typo's - one change in gpg.py, and another in commands.py.
>  
> Thanks for Mercurial - it helps me so much.
> Richard
>
> # HG changeset patch
> # User Richard Hopkins
> # Date 1289334356 0
> # Node ID a1fe9c79beb5c907fb36b830e72d90c802a2e9e1
> # Parent  7a2bca0b1e70cccf0edf0a15dcf45088551daeb3
> Fixed util.abort to util.Abort typo.

Nicely spotted -- and great job looking through the rest of the code for
this. I have pushed the change on the stable branch (0d4fb319974b) so
that it will be part of the 1.7.1 release.

Greg is right that it would be good to have tests for this so that we
make sure to get into all corners of the code. Alternatively you could
add a new pattern to contrib/check-code.py -- that is our little code
checked that looks for bad/wrong patterns in the code.

I pushed the fix now to get that out the door -- we can then push a
followup changeset later with tests.

-- 
Martin Geisler

Mercurial links: http://mercurial.ch/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20101111/89ef65bd/attachment.html>


More information about the Mercurial mailing list