Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6835061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:11:15+00:00 2026-05-26T23:11:15+00:00

I just installed this checkfiles plugin and it has a syntax error. I don’t

  • 0

I just installed this “checkfiles” plugin and it has a syntax error. I don’t know Python, but I’ve tried a few things and can’t figure it out. I’m wondering if someone else could take a peek and see if anything stands out. It’s the very last line of the code below:

   if self.opt_all:
        self.check_diffs = False

    if self.checked_exts == '""':
        self.ui.debug('checkfiles: checked extensions: (all text files)\n')
    else:
        self.ui.debug('checkfiles: checked extensions: %s\n' % ' '.join(self.checked_exts))

    self.ui.debug('checkfiles: ignored extensions: %s\n' % ' '.join(self.ignored_exts))
    self.ui.debug('checkfiles: ignored files: %s\n' % ' '.join(self.ignored_files))
    self.ui.debug('checkfiles: check diffs only: %r\n' % self.check_diffs)
    self.ui.debug('checkfiles: use spaces: %r\n' % self.use_spaces)

    if ctx:
        self.set_changectx(ctx)

def set_changectx(self, ctx):
    self.ctx = ctx

    if self.opt_all:
        modified, added, removed, deleted, unknown, ignored, clean = self.repo.status(clean=True)
        self.files = modified + added + clean # we can't get filecontext for unknown files
    else:
        self.files = ctx.files() if ctx else []  #THIS IS LINE 120

* failed to import extension checkfiles from /scripts/mercurial-extensions/checkfiles/checkfiles.py: invalid syntax (checkfiles.py, line 120)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:11:15+00:00Added an answer on May 26, 2026 at 11:11 pm

    The last line is correct modern Python.
    It contains a conditional expression which was added in Python 2.5.
    So, I think your Hg must be running Python 2.4 or earlier.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just installed the first release candidate of Python 3.0 and got this error
I do not know what is the reason of this but I just installed
I have just installed Eclipse PDT 3.0.2 (I don't know what Eclipse base this
I just installed an application on a win2003 server and I'm getting this error:
I've just installed this plugin, created the migrations, added everything I needed to make
i just installed MAMP on this iMac and the rubygems but when i run:
i just installed python i am trying to run this script: import csv reader
I just installed the apache 2.2 http server and I get this error message
Not sure why I'm getting this, but I just installed RVM, the new Ruby
I just installed the restful authentication using this plugin and when I go to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.