#322 Patch for failing test text-31.11

closed-fixed
18. [text] (26)
7
2012-01-25
2012-01-20
No

The attached patch fixes item 3475627:

https://sourceforge.net/tracker/index.php?func=detail&aid=3475627&group_id=12997&atid=112997

The patch is against the latest core-8-5-branch.

Discussion

  • Francois VOGEL

    Francois VOGEL - 2012-01-20
     
  • Francois VOGEL

    Francois VOGEL - 2012-01-20
    • priority: 5 --> 7
    • assigned_to: hobbs --> nijtmans
     
  • Francois VOGEL

    Francois VOGEL - 2012-01-20

    Jan, could you help with this one again?

     
  • Jan Nijtmans

    Jan Nijtmans - 2012-01-22

    I cannot extract text-31.11-fix_V1.patch, but from you
    description I tried to get the idea and applied that.

    Committed to branch bug-3475627. It helps: text-31.11
    succeeds now, but I have some questions:

    - Is this the right place to increment the epoch?
    - Is is really necessary to update the epoch on
    EVERY configure? If it is possitlbe to update the
    epoch only on certain configure options, that
    would be preferable. I don't have any clue
    on how this could affect preformance.

    François, any ideas on this. Jeff, Vince, how do
    you think about that?

     
  • Francois VOGEL

    Francois VOGEL - 2012-01-22

    You're right, it's not needed for every configure.
    Indeed in my patch I had added the epoch increase at the very end of the
    if (mask & TK_TEXT_LINE_RANGE) {
    so that it is only executed when changing -startline and/or -endline, and not for any other configuration of the text widget since it's not needed in the latter case.
    Besides I had added comments for tkText.h in the patch.

    Strange that you could not download the patch, I have just downloaded it successfully again.
    Here it is in textual copy/paste form, if it makes sense. I guess it will be awfully wrapped when published, but anyway:

    Index: generic/tkText.c

    --- generic/tkText.c
    +++ generic/tkText.c
    @@ -2096,10 +2096,11 @@

    TkTextSelectionEvent(textPtr);
    textPtr->abortSelections = 1;
    }
    }
    + textPtr->sharedTextPtr->stateEpoch++;
    }

    /*
    * Don't allow negative spacings.
    */

    Index: generic/tkText.h

    --- generic/tkText.h
    +++ generic/tkText.h
    @@ -559,13 +559,14 @@
    * this widget. NULL means that no bindings
    * exist, so the table hasn't been created.
    * Each "object" used for this table is the
    * name of a tag. */
    int stateEpoch; /* This is incremented each time the B-tree's
    - * contents change structurally, and means
    - * that any cached TkTextIndex objects are no
    - * longer valid. */
    + * contents change structurally, or when the
    + * start/end limits change, and means that any
    + * cached TkTextIndex objects are no longer
    + * valid. */

    /*
    * Information related to the undo/redo functionality.
    */

     
  • Jan Nijtmans

    Jan Nijtmans - 2012-01-23

    > Strange that you could not download the patch, I have just downloaded it
    > successfully again.
    If I try to download it directly from the link, it doesn't work, but if I first save
    it to a directory then it works. Those patch files contain CR-LF line endings,
    maybe that's causing the trouble that firefox doesn't recognize them
    as text files and refuses to open gedit (Ubuntu 11.11). I didn't have
    that problem with other patches before.

    Patch 3477449 fixes test text-31.11 as well, does that make
    patch 3476698 unnecessary?

     
  • Francois VOGEL

    Francois VOGEL - 2012-01-23

    >Those patch files contain CR-LF line endings,
    >I didn't have that problem with other patches before.

    I have created all my patches using fossil diff > xxx.patch and then uploaded the xxx.patch file to SF. All patches were generated on Windows. It is possible that some patches were created on Vista and some on Seven, but should that make any difference?
    Is there any other recommended method for producing patch files?

    > Patch 3477449 fixes test text-31.11 as well, does that make
    > patch 3476698 unnecessary?

    I have answered that one here:
    https://sourceforge.net/tracker/?func=detail&aid=1630271&group_id=12997&atid=112997

     
  • Francois VOGEL

    Francois VOGEL - 2012-01-25

    Patch has been applied today to core-8-5-branch and trunk.
    Closing now.

     
  • Francois VOGEL

    Francois VOGEL - 2012-01-25
    • assigned_to: nijtmans --> fvogelnew1
    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks