Loading ...
Sorry, an error occurred while loading the content.

Broken Highlighting in latest from Git

Expand Messages
  • andrw_mc
    Hi all, I recently pulled the latest from upstream master and have noticed that highlighting of prioritized tasks seems to be broken. I ran the tests and a
    Message 1 of 7 , Feb 19, 2012
    View Source
    • 0 Attachment
      Hi all,
      I recently pulled the latest from upstream master and have noticed that highlighting of prioritized tasks seems to be broken.

      I ran the tests and a bunch related to highlighting failed.

      I'm not entirely sure, but I think the issue crept in with commit: 7742d3c115b01bfcec6cc27b17f28757f56f41da on Sept 30, as if I grab todo.sh from prior to that, it all works fine.

      I'm fairly new to todo.txt and git, so I could easily be wrong on all of this. If there was some change to configs for colours that I haven't applied or something like that, please let me know.

      Thanks!
      Andrew
    • Ingo Karkat
      ... Please capture and post the test output and some information about your environment (operating system, Bash version, etc.); it s hard to troubleshoot
      Message 2 of 7 , Feb 20, 2012
      View Source
      • 0 Attachment
        On 19-Feb-2012 21:21:10 -0000, andrw_mc wrote:

        > Hi all,
        > I recently pulled the latest from upstream master and have noticed
        > that highlighting of prioritized tasks seems to be broken.
        >
        > I ran the tests and a bunch related to highlighting failed.

        Please capture and post the test output and some information about your
        environment (operating system, Bash version, etc.); it's hard to troubleshoot
        without this information.

        > I'm not entirely sure, but I think the issue crept in with commit:
        > 7742d3c115b01bfcec6cc27b17f28757f56f41da on Sept 30, as if I grab
        > todo.sh from prior to that, it all works fine.

        Hm, that commit just changed stuff in the help action.

        > I'm fairly new to todo.txt and git, so I could easily be wrong on all
        > of this.

        You could use "git bisect" to locate the commit that introduced the problem.

        > If there was some change to configs for colours that I haven't applied
        > or something like that, please let me know.

        The tests bring along their own (mostly default) config, and we take care to
        maintain backwards compatibility as much as possible.

        -- regards, ingo
      • andrw_mc
        Hey there. Thanks for the response! So, I m using bash on Ubuntu 11.10. Thanks for the advice on git bisect. I m new to git and that is so much easier than the
        Message 3 of 7 , Feb 20, 2012
        View Source
        • 0 Attachment
          Hey there.
          Thanks for the response!

          So, I'm using bash on Ubuntu 11.10.

          Thanks for the advice on git bisect. I'm new to git and that is so much easier than the manual brute-force I was doing. Anyhow, running bisect from the v2.8 tag to master confirmed for me the commit:
          7742d3c115b01bfcec6cc27b17f28757f56f41da on Sept 30

          So, looking at the diff, I believe this is the culprit:

          ........
          if (match($0, /^[0-9]+ x /)) {
          print highlight("COLOR_DONE") $0 highlight("DEFAULT")
          - } else if (match($0, /^[0-9]+ \([A-Z]\) /)) {
          + } else if (match($0, /^[0-9]+ \([A-Z]\)[[:space:]]/)) {
          clr = highlight("PRI_" substr($0, RSTART + RLENGTH - 3, 1))
          ........


          If I take the latest from master and replace the '[[:space:]]' with just a space, then highlighting works again.

          I'm not sure however why the change was made in the first place, and what other bug I might be reopening by making that change. Any ideas?

          Thanks!
          Andrew



          --- In todotxt@yahoogroups.com, Ingo Karkat <swdev@...> wrote:
          >
          > On 19-Feb-2012 21:21:10 -0000, andrw_mc wrote:
          >
          > > Hi all,
          > > I recently pulled the latest from upstream master and have noticed
          > > that highlighting of prioritized tasks seems to be broken.
          > >
          > > I ran the tests and a bunch related to highlighting failed.
          >
          > Please capture and post the test output and some information about your
          > environment (operating system, Bash version, etc.); it's hard to troubleshoot
          > without this information.
          >
          > > I'm not entirely sure, but I think the issue crept in with commit:
          > > 7742d3c115b01bfcec6cc27b17f28757f56f41da on Sept 30, as if I grab
          > > todo.sh from prior to that, it all works fine.
          >
          > Hm, that commit just changed stuff in the help action.
          >
          > > I'm fairly new to todo.txt and git, so I could easily be wrong on all
          > > of this.
          >
          > You could use "git bisect" to locate the commit that introduced the problem.
          >
          > > If there was some change to configs for colours that I haven't applied
          > > or something like that, please let me know.
          >
          > The tests bring along their own (mostly default) config, and we take care to
          > maintain backwards compatibility as much as possible.
          >
          > -- regards, ingo
          >
        • Ed Blackman
          ... On Gina s master branch, commit 7742d3c115b01bfcec6cc27b17f28757f56f41da from Sep 30 was the last one to change that line. The change doesn t seem to have
          Message 4 of 7 , Feb 20, 2012
          View Source
          • 0 Attachment
            On Mon, Feb 20, 2012 at 06:55:16PM -0000, andrw_mc wrote:
            >If I take the latest from master and replace the '[[:space:]]' with just a space, then highlighting works again.
            >
            >I'm not sure however why the change was made in the first place, and what other bug I might be reopening by making that change. Any ideas?

            On Gina's master branch, commit 7742d3c115b01bfcec6cc27b17f28757f56f41da
            from Sep 30 was the last one to change that line. The change doesn't
            seem to have much to do with the rest of the commit.

            Confusingly, there's a Nov 3 commit
            e3fce6f12b324483fb2f5e3ab9bcb660897a44f3 that says it fixes it for a
            non-gawk version of awk that doesn't support [[:space:]] (mawk). I'm
            not sure how a Sep 30 commit came after a Nov 3 one.

            You have mawk or some other non-gawk version of awk, correct? Ubuntu
            prefers gawk if they're both installed.

            --
            Ed Blackman
          • andrw_mc
            Hi Ed, You are correct. I checked and I do indeed have mawk (appears to still be default in 11.10), though gawk is available. I guess ideally the Nov. 3 change
            Message 5 of 7 , Feb 20, 2012
            View Source
            • 0 Attachment
              Hi Ed,

              You are correct. I checked and I do indeed have mawk (appears to still be default in 11.10), though gawk is available.

              I guess ideally the Nov. 3 change should be put back in as it seems the reasoning for putting it in the first place still applies.

              Thanks!
              Andrew


              --- In todotxt@yahoogroups.com, Ed Blackman <ed@...> wrote:
              >
              > On Mon, Feb 20, 2012 at 06:55:16PM -0000, andrw_mc wrote:
              > >If I take the latest from master and replace the '[[:space:]]' with just a space, then highlighting works again.
              > >
              > >I'm not sure however why the change was made in the first place, and what other bug I might be reopening by making that change. Any ideas?
              >
              > On Gina's master branch, commit 7742d3c115b01bfcec6cc27b17f28757f56f41da
              > from Sep 30 was the last one to change that line. The change doesn't
              > seem to have much to do with the rest of the commit.
              >
              > Confusingly, there's a Nov 3 commit
              > e3fce6f12b324483fb2f5e3ab9bcb660897a44f3 that says it fixes it for a
              > non-gawk version of awk that doesn't support [[:space:]] (mawk). I'm
              > not sure how a Sep 30 commit came after a Nov 3 one.
              >
              > You have mawk or some other non-gawk version of awk, correct? Ubuntu
              > prefers gawk if they're both installed.
              >
              > --
              > Ed Blackman
              >
            • Ingo Karkat
              ... Ah, I remember that stuff. Seems like that change wasn t correctly merged into upstream. Thanks for investigating, Ed and Andrew. I have resubmitted the
              Message 6 of 7 , Feb 21, 2012
              View Source
              • 0 Attachment
                On 21-Feb-2012 04:10:31 -0000, andrw_mc wrote:

                > Hi Ed,
                >
                > You are correct. I checked and I do indeed have mawk (appears to still be default in 11.10), though gawk is available.
                >
                > I guess ideally the Nov. 3 change should be put back in as it seems the reasoning for putting it in the first place still applies.
                >
                > --- In todotxt@yahoogroups.com, Ed Blackman <ed@...> wrote:
                >>
                >> On Mon, Feb 20, 2012 at 06:55:16PM -0000, andrw_mc wrote:
                >>> If I take the latest from master and replace the '[[:space:]]' with just a space, then highlighting works again.
                >>>
                >>> I'm not sure however why the change was made in the first place, and what other bug I might be reopening by making that change. Any ideas?
                >>
                >> On Gina's master branch, commit 7742d3c115b01bfcec6cc27b17f28757f56f41da
                >> from Sep 30 was the last one to change that line. The change doesn't
                >> seem to have much to do with the rest of the commit.
                >>
                >> Confusingly, there's a Nov 3 commit
                >> e3fce6f12b324483fb2f5e3ab9bcb660897a44f3 that says it fixes it for a
                >> non-gawk version of awk that doesn't support [[:space:]] (mawk). I'm
                >> not sure how a Sep 30 commit came after a Nov 3 one.
                >>
                >> You have mawk or some other non-gawk version of awk, correct? Ubuntu
                >> prefers gawk if they're both installed.

                Ah, I remember that stuff. Seems like that change wasn't correctly merged into
                upstream. Thanks for investigating, Ed and Andrew. I have resubmitted the
                commit: https://github.com/ginatrapani/todo.txt-cli/pull/76

                -- regards, ingo
              • Gina Trapani
                ... My apologies for the bad merge. I just merged Ingo s fix to my master branch. Thanks Andrew, Ingo, and Ed for the help getting this sorted out. --
                Message 7 of 7 , Feb 21, 2012
                View Source
                • 0 Attachment
                  On Tue, Feb 21, 2012 at 12:31 AM, Ingo Karkat <swdev@...> wrote:
                  Ah, I remember that stuff. Seems like that change wasn't correctly merged into
                  upstream. Thanks for investigating, Ed and Andrew. I have resubmitted the
                  commit: https://github.com/ginatrapani/todo.txt-cli/pull/76

                  My apologies for the bad merge. I just merged Ingo's fix to my master branch.

                  Thanks Andrew, Ingo, and Ed for the help getting this sorted out. 
                Your message has been successfully submitted and would be delivered to recipients shortly.