1. Augie Fackler
  2. hg-git
  3. Issues
Issue #14 resolved

"hg outgoing" crashes

Anonymous created an issue

After committing two changesets locally, and before pushing, I ran "hg outgoing", which crashed:

{{{

!

jarvis-2:Pype david$ hg outgoing comparing with git+ssh://git@github.com/dalexander/Pype.git importing Hg objects into Git unknown exception encountered, details follow report bug details to http://mercurial.selenic.com/bts/ or mercurial@selenic.com Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] Mercurial Distributed SCM (version 1.6.3+20100826) Extensions loaded: churn, color, hgsubversion, graphlog, record, bookmarks, hggit, extdiff Traceback (most recent call last): File "/usr/local/bin/hg", line 27, in <module> mercurial.dispatch.run() File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 16, in run sys.exit(dispatch(sys.argv[1:])) File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 34, in dispatch return _runcatch(u, args) File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 54, in _runcatch return _dispatch(ui, args) File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 494, in _dispatch cmdpats, cmdoptions) File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 355, in runcommand ret = _runcommand(ui, options, cmd, d) File "/Library/Python/2.6/site-packages/mercurial/extensions.py", line 174, in wrap return wrapper(origfn, args, kwargs) File "/Library/Python/2.6/site-packages/hgext/color.py", line 211, in colorcmd return orig(ui_, opts, cmd, cmdfunc) File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 545, in _runcommand return checkargs() File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 499, in checkargs return cmdfunc() File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 492, in <lambda> d = lambda: util.checksignature(func)(ui, *args, cmdoptions) File "/Library/Python/2.6/site-packages/mercurial/util.py", line 420, in check return func(args, kwargs) File "/Library/Python/2.6/site-packages/mercurial/extensions.py", line 129, in wrap util.checksignature(origfn), *args, kwargs) File "/Library/Python/2.6/site-packages/mercurial/util.py", line 420, in check return func(args, kwargs) File "/Library/Python/2.6/site-packages/hgext/bookmarks.py", line 497, in outgoing return oldoutgoing(ui, repo, dest, opts) File "/Library/Python/2.6/site-packages/mercurial/util.py", line 420, in check return func(args, kwargs) File "/Library/Python/2.6/site-packages/mercurial/extensions.py", line 129, in wrap util.checksignature(origfn), *args, kwargs) File "/Library/Python/2.6/site-packages/mercurial/util.py", line 420, in check return func(args, kwargs) File "/Library/Python/2.6/site-packages/hgext/graphlog.py", line 368, in graph return orig(*args, kwargs) File "/Library/Python/2.6/site-packages/mercurial/util.py", line 420, in check return func(args, kwargs) File "/Library/Python/2.6/site-packages/mercurial/commands.py", line 2662, in outgoing o = discovery.findoutgoing(repo, other, force=opts.get('force')) File "/Library/Python/2.6/site-packages/mercurial/extensions.py", line 174, in wrap return wrapper(origfn, *args, kwargs) File "/Users/david/Sources/hg-git/hggit/init.py", line 127, in findoutgoing return [x[0] for x in r] IndexError: list index out of range jarvis-2:Pype david$

Otherwise, I have not had any trouble pushing/pulling.

}}}

Comments (2)

  1. abderrahim

    try this patch:

    diff --git a/hggit/__init__.py b/hggit/__init__.py
    --- a/hggit/__init__.py
    +++ b/hggit/__init__.py
    @@ -129,7 +129,7 @@ try:
                 kw = newkw
                 if kwname == 'heads':
                     r = orig(local, remote, **kw)
    -                return [x[0] for x in r]
    +                return [x[0] for x in r if x]
             return orig(local, remote, **kw)
         extensions.wrapfunction(discovery, 'findoutgoing', findoutgoing)
     except ImportError:
    
  2. Log in to comment