2.3 upgrade notes: remote repository API

Arne Babenhauserheide arne_bab at web.de
Mon Sep 17 16:17:06 CDT 2012


Am Montag, 17. September 2012, 10:10:39 schrieb Dirkjan Ochtman:
> - Perhaps add an UpgradeNote about this issue?
> - Would it make sense to unprefix _peerorrepo() in 2.4?
> - Some docstring about what opts should be would help.
> - I shouldn't use hg.repository() but use this other API.

I’d like to second that. 
Just 2 weeks ago I showed a friend the site extension which can solve one of 
his problems in his game project source hosting. It broke with the error can’t 
import module repo. I thought it a Windows error.

Yesterday my mail-fetcher stopped to work due to the same error, so I realized 
that the bug was an incompatibility with hg 2.3, but nothing in the news 
prepared me for that.

I’m currently trying to fix it, but I can’t get it to work again in the time I 
have at hand.

I guide how to get the extension working with old and new versions of 
Mercurial would also be quite useful.

One major advantage of hg is that I can create my own repository types - for 
example to push to FTP or to Freenet. This change just made that a lot harder.

Best wishes,
Arne

PS: After disabling extensions, I traced my personal problem down to this. I 
don’t know how to go forward after this:

$ LC_ALL=C hg push ftp
pulling from /home/arne/Dokumente/eigenes/Programme/Mercurial/static/static
searching for changes
no changes found
** Unknown exception encountered with possibly-broken third-party extension 
site
** which supports versions unknown of Mercurial.
** Please disable site and try your action again.
** If that fixes the bug please report it to the extension author.
** Python 2.7.3 (default, Aug 18 2012, 16:06:45) [GCC 4.5.3]
** Mercurial Distributed SCM (version 2.3.1)
** Extensions loaded: hgk, gpg, churn, graphlog, transplant, convert, color, 
rebase, mq, extdiff, share, record, site, schemes, patchbomb, hgview
Traceback (most recent call last):
  File "/usr/bin/hg-2.7", line 38, in <module>
    mercurial.dispatch.run()
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 28, in 
run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 65, in 
dispatch
    return _runcatch(req)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 88, in 
_runcatch
    return _dispatch(req)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 740, 
in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 514, 
in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib64/python2.7/site-packages/mercurial/extensions.py", line 189, 
in wrap
    return wrapper(origfn, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/hgext/color.py", line 364, in 
colorcmd
    return orig(ui_, opts, cmd, cmdfunc)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 830, 
in _runcommand
    return checkargs()
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 801, 
in checkargs
    return cmdfunc()
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 737, 
in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 471, in 
check
    return func(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/mercurial/extensions.py", line 144, 
in wrap
    util.checksignature(origfn), *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 471, in 
check
    return func(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/hgext/mq.py", line 3528, in 
mqcommand
    return orig(ui, repo, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 471, in 
check
    return func(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/mercurial/extensions.py", line 144, 
in wrap
    util.checksignature(origfn), *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 471, in 
check
    return func(*args, **kwargs)
  File "/home/arne/Quell/Programme/Mercurial/static/staticsite.py", line 803, 
in ftppush
    staticsite(ui, repo, target, **opts)
  File "/home/arne/Quell/Programme/Mercurial/static/staticsite.py", line 739, 
in staticsite
    parsesite(ui, repo, target, **opts)
  File "/home/arne/Quell/Programme/Mercurial/static/staticsite.py", line 590, 
in parsesite
    writeoverview(ui, repo, target, name)
  File "/home/arne/Quell/Programme/Mercurial/static/staticsite.py", line 144, 
in writeoverview
    outgoing, fn, localother = getoutgoing(ui, repo, otheruri=forkuri, 
othername=forkname)
  File "/home/arne/Quell/Programme/Mercurial/static/staticsite.py", line 341, 
in getoutgoing
    revs, False, False)
  File "/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.py", line 342, 
in getremotechanges
    force=force)
  File "/usr/lib64/python2.7/site-packages/mercurial/discovery.py", line 31, 
in findcommonincoming
    if not remote.capable('getbundle'):
AttributeError: 'mqrepo' object has no attribute 'capable'

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 316 bytes
Desc: This is a digitally signed message part.
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120917/be510cca/attachment.pgp>


More information about the Mercurial-devel mailing list