Issue #2 wontfix

failed to import extension autosync

travisn
created an issue

Greetings,

I created: {{{

[extensions] autosync = ~/hgautosync/autosync.py

in both ~/.hgrc and /repo/.hg/hgrc (and tried either or). I always get this error:

*** failed to import extension autosync from ~/hgautosync/autosync.py: invalid syntax (autosync.py, line 147) }}}

I am using mercurial 1.8.1 on CentOS 5.4 and newest release of autosync.

Any suggestions would be appreciated.

Thanks.

-Travis N

Comments (5)

  1. Oben Sonne repo owner
    • changed status to open

    The reason is that around line 147 there is a try/except/finally construct which requires Python >= 2.5 -- probably you're are using Python 2.4, AFAIK this is the default on CentOS 5.x.

    There two choices for you:

    • Update to Python >= 2.
    • Edit autosync.py: delete line 147 and dedent line 148 by 4 spaces (I'm thinking about apllying this change to the official version too since the finally construct technically isn't absolutely necessary).

    Regards, Oben

  2. Log in to comment