Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7901664

jcheck.py causes warnings with latest version of mercurial

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • None
    • tools
    • None

      The current version of Mercurial for download on MacOS is 3.8, but unfortunately, it complains about the way that jcheck.py registers the jcheck command. The warning is:

      devel-warn: missing attribute 'norepo', use @command decorator to register 'jcheck'

      I was able to hack the jcheck.py script to get around this by deleting the code that registered it in cmdtable at the end and inserting this code right before the @def jcheck line:

      @command("jcheck",
          [("", "lax", False, "Check comments, tags and whitespace laxly"),
           ("r", "rev", [], "check the specified revision or range (default: tip)"),
           ("s", "strict", False, "check everything")],
           "hg jcheck [-r rev] [-s]")
      def jcheck(ui, repo, **opts):

      That seems to work fine. (I got rid of the "opts" and "help" variables used at the bottom of the file since I wasn't sure what their scope was if I defined them just before "def jcheck" so I just inlined their values instead.

            Unassigned Unassigned
            flar Jim Graham
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: