[issue3218] push NameError when remote hg is old

Christian Ebert bugs at mercurial.selenic.com
Tue Jan 24 10:35:15 CST 2012


New submission from Christian Ebert <blacktrash at gmx.net>:

4154338f0bc0 causes a NameError when pushing to an old remote hg:

$ hg --version
Mercurial Distributed SCM (version 1.0.2)

Copyright (C) 2005-2008 Matt Mackall <mpm at selenic.com> and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ logout
Connection to <remote host> closed.
$ hg-local --debug push ssh://user@remotehost/mercurial-priv/test/
pushing to ssh://user@remotehost/mercurial-priv/test/
running ssh user at remotehost 'hg -R mercurial-priv/test/ serve --stdio'
sending hello command
sending between command
remote: 48
remote: capabilities: unbundle lookup changegroupsubset
remote: 1
sending heads command
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+13-341c58282b25)
** Extensions loaded:
Traceback (most recent call last):
  File "/Users/chris/bin/hg-local", line 38, in <module>
    mercurial.dispatch.run()
  File "/Users/chris/hgworkspace/hg-crew-mq/mercurial/dispatch.py", line 27,
in run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File "/Users/chris/hgworkspace/hg-crew-mq/mercurial/dispatch.py", line 64,
in dispatch
    return _runcatch(req)
  File "/Users/chris/hgworkspace/hg-crew-mq/mercurial/dispatch.py", line 87,
in _runcatch
    return _dispatch(req)
  File "/Users/chris/hgworkspace/hg-crew-mq/mercurial/dispatch.py", line
683, in _dispatch
    cmdpats, cmdoptions)
  File "/Users/chris/hgworkspace/hg-crew-mq/mercurial/dispatch.py", line
465, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/Users/chris/hgworkspace/hg-crew-mq/mercurial/dispatch.py", line
737, in _runcommand
    return checkargs()
  File "/Users/chris/hgworkspace/hg-crew-mq/mercurial/dispatch.py", line
691, in checkargs
    return cmdfunc()
  File "/Users/chris/hgworkspace/hg-crew-mq/mercurial/dispatch.py", line
680, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/Users/chris/hgworkspace/hg-crew-mq/mercurial/util.py", line 456, in
check
    return func(*args, **kwargs)
  File "/Users/chris/hgworkspace/hg-crew-mq/mercurial/commands.py", line
4417, in push
    newbranch=opts.get('new_branch'))
  File "/Users/chris/hgworkspace/hg-crew-mq/mercurial/localrepo.py", line
1638, in push
    remoteheads, newbranch)
  File "/Users/chris/hgworkspace/hg-crew-mq/mercurial/discovery.py", line
193, in checkheads
    newheads = oldheads.union(outg)
NameError: global name 'outg' is not defined
$ hg-local --version
Mercurial Distributed SCM (version 2.1-rc+13-341c58282b25)
(see http://mercurial.selenic.com for more information)

Copyright (C) 2005-2012 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This looks suspicious:

$ 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'

----------
messages: 18725
nosy: blacktrash
priority: bug
status: unread
title: push NameError when remote hg is old

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3218>
____________________________________________________


More information about the Mercurial-devel mailing list