[PATCH 1 of 2] discovery: diet discovery.prepush from non-discovery code

Christian Ebert blacktrash at gmx.net
Tue Jan 24 10:36:07 CST 2012


* Christian Ebert on Tuesday, January 24, 2012 at 07:41:02 +0000
> * Christian Ebert on Monday, January 23, 2012 at 18:01:52 +0100
>> * pierre-yves.david at logilab.fr on Thursday, January 19, 2012 at 16:10:02 +0100
>>> # HG changeset patch
>>> # User Pierre-Yves David <pierre-yves.david at logilab.fr>
>>> # Date 1326984655 -3600
>>> # Node ID 65167145e2d3658699e881a936f2da4f718fb205
>>> # Parent  917d914e5a9232cac95b99687841448f68758ec2
>>> discovery: diet discovery.prepush from non-discovery code
> 
> [...]
> 
>> This yields a name error here:
>> 
>> $ hg push
>> pushing to ssh://<some repo>
>> searching for changes
>> ** unknown exception encountered, please report by visiting
>> **  http://mercurial.selenic.com/wiki/BugTracker
>> ** Python 2.7.2 (default, Dec 30 2011, 19:40:58) [GCC 4.0.1 (Apple Inc. build 5493)]
>> ** Mercurial Distributed SCM (version 2.1-rc+7-610c4434973b)
>> ** Extensions loaded:
>> Traceback (most recent call last):
>> File "/usr/local/bin/hg", line 38, in <module>
>>   mercurial.dispatch.run()
>> File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 27, in run
>>   sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
>> File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 64, in dispatch
>>   return _runcatch(req)
>> File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 87, in _runcatch
>>   return _dispatch(req)
>> File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 683, in _dispatch
>>   cmdpats, cmdoptions)
>> File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 465, in runcommand
>>   ret = _runcommand(ui, options, cmd, d)
>> File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 737, in _runcommand
>>   return checkargs()
>> File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 691, in checkargs
>>   return cmdfunc()
>> File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 680, in <lambda>
>>   d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
>> File "/usr/local/lib/python2.7/site-packages/mercurial/util.py", line 456, in check
>>   return func(*args, **kwargs)
>> File "/usr/local/lib/python2.7/site-packages/mercurial/commands.py", line 4417, in push
>>   newbranch=opts.get('new_branch'))
>> File "/usr/local/lib/python2.7/site-packages/mercurial/localrepo.py", line 1638, in push
>>   remoteheads, newbranch)
>> File "/usr/local/lib/python2.7/site-packages/mercurial/discovery.py", line 193, in checkheads
>>   newheads = oldheads.union(outg)
>> NameError: global name 'outg' is not defined
> 
> $ pyflakes mercurial/discovery.py
> mercurial/discovery.py:193: undefined name 'outg'
> mercurial/discovery.py:195: undefined name 'outg'
> mercurial/discovery.py:205: undefined name 'inc'

Looks like this becomes relevant when the remote hg is old:
http://mercurial.selenic.com/bts/issue3218

c
-- 
theatre - books - texts - movies
Black Trash Productions at home: http://www.blacktrash.org
Black Trash Productions on Facebook:
http://www.facebook.com/blacktrashproductions


More information about the Mercurial-devel mailing list