Bug 3578 - Exception on clone with update
Summary: Exception on clone with update
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: earlier
Hardware: PC Linux
: normal bug
Assignee: Bugzilla
URL:
Keywords:
: 3579 3615 3690 3856 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-08-07 19:03 UTC by Ivan
Modified: 2017-11-01 18:05 UTC (History)
12 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan 2012-08-07 19:03 UTC
$ hg clone http://server/repo qqq -u "v4.1.1_RC2"
requesting all changes
adding changesets
adding manifests
adding file changes
added 64 changesets with 2835 changes to 1978 files
** Unknown exception encountered with possibly-broken third-party extension mercurial_keyring
** which supports versions unknown of Mercurial.
** Please disable mercurial_keyring and try your action again.
** If that fixes the bug please report it to the extension author.
** Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC 4.4.3]
** Mercurial Distributed SCM (version 2.3)
** Extensions loaded: mercurial_keyring
Traceback (most recent call last):
  File "/usr/bin/hg", line 38, in <module>
    mercurial.dispatch.run()
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 28, in run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 65, in dispatch
    return _runcatch(req)
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 88, in _runcatch
    return _dispatch(req)
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 740, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 514, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 830, in _runcommand
    return checkargs()
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 801, in checkargs
    return cmdfunc()
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 737, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 472, in check
    return func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/mercurial/commands.py", line 1206, in clone
    branch=opts.get('branch'))
  File "/usr/lib/pymodules/python2.6/mercurial/hg.py", line 401, in clone
    checkout = srcrepo.lookup(update)
AttributeError: 'NoneType' object has no attribute 'lookup'

On windows the issue isn't reproducible
Comment 1 Augie Fackler 2012-08-07 20:40 UTC
Does the bug persist if you disable mercurial_keyring?
Comment 2 Ivan 2012-08-07 20:45 UTC
(In reply to comment #1)

Oh, sorry, forgot to mention - yes, I tried with and without mercurial_keyring
Comment 3 Augie Fackler 2012-08-07 20:59 UTC
I can reproduce. I'll get a patch drafted.

$ HGRCPATH=/dev/null hg clone http://code.google.com/p/hgsubversion --update 0
Comment 4 Thomas Arendsen Hein 2012-08-08 06:11 UTC
*** Bug 3579 has been marked as a duplicate of this bug. ***
Comment 5 kiilerix 2012-08-08 06:18 UTC
Introduced by http://selenic.com/repo/hg/rev/5884812686f7 .
Comment 6 Augie Fackler 2012-08-08 11:17 UTC
Patch mailed to devel.
Comment 7 niknyby 2012-08-09 02:56 UTC
I ran into this problem doing a simple clone on OS X 10.8:

$ hg clone -u SDL-1.2 http://hg.libsdl.org/SDL SDL-1.2
requesting all changes
adding changesets
adding manifests
adding file changes
added 6389 changesets with 28879 changes to 3359 files (+1 heads)
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.7.3 (default, Jul 28 2012, 10:45:54) [GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.57))]
** Mercurial Distributed SCM (version 2.3)
** Extensions loaded: 
Traceback (most recent call last):
  File "/opt/local/bin/hg", line 38, in <module>
    mercurial.dispatch.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 28, in run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 65, in dispatch
    return _runcatch(req)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 88, in _runcatch
    return _dispatch(req)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 740, in _dispatch
    cmdpats, cmdoptions)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 514, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 830, in _runcommand
    return checkargs()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 801, in checkargs
    return cmdfunc()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 737, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/util.py", line 472, in check
    return func(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/commands.py", line 1206, in clone
    branch=opts.get('branch'))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/hg.py", line 401, in clone
    checkout = srcrepo.lookup(update)
AttributeError: 'NoneType' object has no attribute 'lookup'
Comment 8 niknyby 2012-08-09 03:02 UTC
(In reply to comment #7)

Woops, I meant, mine was a clone with update as well.
Comment 9 Augie Fackler 2012-08-09 09:37 UTC
I've mailed a patch for this which will go out in the next bugfix release.
Comment 10 HG Bot 2012-08-11 14:01 UTC
Fixed by http://selenic.com/repo/hg/rev/471f30d360ea
Augie Fackler <raf@durin42.com>
clone: don't fail with --update for non-local clones (issue3578)

This was broken by 5884812686f7 due to lack of test coverage. This
adds a test and fixes the defect.

(please test the fix)
Comment 11 Jan-Jaap Driessen 2012-08-15 18:58 UTC
(In reply to comment #10)

I confirm that this bug was fixed. I successfully tested a similar scenario on the stable branch (rev c6f88e7f95b7) after Augie's fix.

I am not an active participant in this community, therefore I wouldn't dare to change the status of this bug report from <testing> to <resolved>.
Comment 12 Matt Mackall 2012-09-07 14:13 UTC
*** Bug 3615 has been marked as a duplicate of this bug. ***
Comment 13 kiilerix 2012-11-02 09:26 UTC
*** Bug 3690 has been marked as a duplicate of this bug. ***
Comment 14 Matt Mackall 2013-03-15 18:11 UTC
*** Bug 3856 has been marked as a duplicate of this bug. ***