Permalink
Commits on Oct 15, 2013
  1. #11147: fixed an `IntegrityError` while syncing ticket fields and tag…

    …s table on concurrent access
    committed Oct 15, 2013
Commits on Sep 18, 2013
  1. TagsPlugin: Provider map construction in class init should make it th…

    …read-safe.
    
    This would have created a circular load depencency without transforming
    `split_into_tags` into a function, what it is indeed == a good move anyway.
    More small changes are bundled, mostly for code cleaning.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@13393 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed Sep 18, 2013
  2. TagsPlugin: Provide faster tag counter implementations by a `Counter`…

    … class, refs #4503.
    
    Handling of tag collections in `Counter` objects is more efficient,
    because we skip creation of associated resources and permission checks.
    We use a feature-stripped, more PEP8-conform version of the original recipe.
    
    Other Trac plugins, that ask !TagsPlugin for existing tags frequency or need
    just all tags, should avoid all methods beside `TagSystem.get_all_tags` too.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@13392 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed Sep 18, 2013
Commits on Sep 6, 2013
  1. TagsPlugin: Fix an issue with `TicketTagProvider`'s `get_tagged_resou…

    …rces` method, refs #11302.
    
    This flaw, introduced in [13166], hits only for configurations that require
    fine-grained permission checks. Another unit test reproduces the issue too
    for all affected revisions before this one.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@13379 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed Sep 6, 2013
Commits on Jun 23, 2013
  1. TagsPlugin: Add realm filter to tag administration, refs #9061.

    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@13304 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed Jun 23, 2013
Commits on Jun 8, 2013
  1. TagsPlugin: Provide a more thread-safe map of taggable realms, refs #…

    …11152.
    
    This change has been kindly contributed by Jun Omae.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@13278 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed Jun 8, 2013
Commits on May 25, 2013
  1. TagsPlugin: Prevent `TypeError` for `ListTagged` macros without argum…

    …ents, refs #9059.
    
    Only `[[ListTagged()]]` worked before, now `[[ListTagged]]` does as well.
    This regression was introduced in [10681].
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@13235 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed May 25, 2013
Commits on May 20, 2013
  1. TagsPlugin: Replace configuration option by simple configuration chec…

    …k, refs #4503.
    
    Finding any non-standard/default permission policy, fine-grained permission
    checking will be enforced, intentionally removing the opt-out for safety.
    Thanks to Odd Simon Simonsen for bringing-up the idea in the first place.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@13173 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed May 20, 2013
Commits on May 19, 2013
  1. TagsPlugin: Cache a configuration value for performance, refs #4503.

    Impact and effect of this change are amazing, verified by request-profiling.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@13172 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed May 19, 2013
  2. TagsPlugin: Fix db setup for ticket tags unit tests, just like done f…

    …or upgrade code before.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@13171 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed May 19, 2013
  3. TagsPlugin: Tap into the potential of permission check short-cuts, re…

    …fs #4503.
    
    This has been based on the three years old  `lazy_permission_check.patch` by
    otaku42, thanks a lot anyway.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@13168 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed May 19, 2013
  4. TagsPlugin: Some clean-up regarding usage of `set()` and set objects.

    Part of this have been done and collected while reviewing surronding code.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@13167 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed May 19, 2013
  5. TagsPlugin: Cache `get_tagged_resources` for tickets, refs #4503.

    Current implementation is for Trac >= 0.12, but likely a ''wontfix'' for 0.11,
    if no code is contributed for getting it there, sorry.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@13166 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed May 19, 2013
  6. TagsPlugin: Mirror ticket tags into normalized `tags` db table, refs …

    …#4503, #9194 and #11096.
    
    Parsing ticket fields per request has been a known performance hog, that's why
    using the `tags` db table for regular access yields a considerable speed-up.
    
    As a side-effect 'ticket' is the pilot for fixing a recently announced issue
    with `get_tagged_resources` in the default tag provider implementation.
    Nicely polished by stretching unit test coverage to this part of the code.
    
    '''ToDo:''' `DefaultTagProvider` must be fixed as well, and other tag
    providers should be reviewed too as a precaution.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@13165 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed May 19, 2013
Commits on May 14, 2013
  1. TagsPlugin: Remove query string for simple single-tag URLs, refs #9057.

    As I noticed some time ago, this is actually work to remove a regression,
    because it has actually been the standard behavior before `tags-0.6` too.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@13134 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed May 14, 2013
  2. TagsPlugin: Allow short notation of bracketed `tags:` TracLinks, refs…

    … #9630.
    
    Applying Ryan J Ollos's fix suggested in his patch attached to #10612, making
    the corresponding one of the previously failing tests pass now.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@13131 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed May 14, 2013
  3. TagsPlugin: Add unit testing for the `tag:` TracWiki link resolver, r…

    …efs #3624, #5523 and #9630.
    
    Currently failing two of the tests due to known issues.
    
    Ryan's proposed patch in #10612 has been helpful to get this done too.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@13129 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed May 14, 2013
Commits on Nov 27, 2012
  1. TagsPlugin: Make query without arguments a valid query expression, re…

    …fs #7856 and #7857.
    
    Fixes `NotImplementedError` meaning a regression, because it has been parsed
    gracefully before, even got used as valid 'all tags' expression in former
    plugin versions, and i.e. `KeywordSuggestPlugin` even relied on this behavior.
    
    Thanks to Itamar Ostricher for contributing the key changes of this changeset.
    
    Some code and template clean-up is done as well.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@12392 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed Nov 27, 2012
  2. TagsPlugin: Make realm configuration for `ListTagged` more effective,…

    … refs #7857 and #9063.
    
    Settings for 'listtagged_exclude_realms' had no effect without a query.
    Itamar Ostricher discovered this issue in the initial implementation of the
    feature and suggested this change.  Thanks for taking care.
    
    Additionally the broken 'test_empty_content' test in
    `tractags.tests.macros.ListTaggedMacroTestCase` is fixed, and a regression test
    for the pending 'empty query' issue (#7857) has been introduced as well.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@12391 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed Nov 27, 2012
Commits on Nov 26, 2012
  1. TagsPlugin: Don't use tags on wiki templates for anything else than c…

    …opying tags, refs #3753 and #9636.
    
    Once again this has been reported by Itamar Ostricher.  Thank you very much
    for nudging me to fix it.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@12390 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed Nov 26, 2012
Commits on Nov 24, 2012
  1. TagsPlugin: Replace a tab white-space, that slipped in unintentionall…

    …y, refs #9521.
    
    Thanks to Ryan for change review and notification on the issue.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@12388 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed Nov 24, 2012
Commits on Oct 14, 2012
  1. TagsPlugin: Test for proper registration of standard `ITagProvider` i…

    …mplementations, refs #3864.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@12165 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed Oct 14, 2012
  2. TagsPlugin: Prevent provider duplication for `TicketTagProvider`, ref…

    …s #3864.
    
    This must have haunted TagsPlugin applications on Trac-0.11 since [10789], but
    without a bug report only attempts to add more unit tests revealed this flaw.
    
    Turned out that in Trac-0.11 its possible to register a Trac Component twice
    for the same `ExtensionPoint` interface by class inheritance, where
    `trac.core.implements` is explicitely written in both, class and base class.
    My bad to change `TicketTagProvider` to inherit from `DefaultTagProvider`
    without actually checking for side-effects, especially against any Trac
    revision before Trac-0.13dev at that time.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@12164 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed Oct 14, 2012
Commits on Oct 10, 2012
  1. Fixed incorrect source code encoding (http://www.python.org/dev/peps/…

    …pep-0263/).
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@12139 7322e99d-02ea-0310-aa39-e9a107903beb
    rjollos committed Oct 10, 2012
Commits on Oct 7, 2012
  1. TagsPlugin: In unit tests always revert db changes done on `TagSetup`…

    … init, refs #9521.
    
    Found out, that with PostgreSQL db backend neither schema version nor default
    permission actions have been inserted after component initialization.
    There might be a hidden issue with the test environment setup here, that once
    again requires a suspiciously looking workaround, but I'm unable to find it
    yet, even more since db code and SQL statements have been straightened a lot
    by now, therefor I'm gradually running out of ideas.
    
    Anyway, all unit tests pass with PostgreSQL on Trac-1.0 now, while issues with
    older Trac versions remain, as outlined in #9521 before.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@12128 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed Oct 7, 2012
  2. TagsPlugin: PostgreSQL cursor dislikes early access to results, refs …

    …#9521.
    
    I've seen this before, so `AttributeError: 'NoneType' object has no attribute
    'fetchall'` was an instant reminder - done better now, squeezing 5 out of 7
    issues with PostgreSQL unit tests in Trac-1.0 .
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@12125 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed Oct 7, 2012
Commits on Oct 6, 2012
  1. TagsPlugin: Don't call `rollback()` from `environment_needs_upgrade()…

    …`, refs #9521.
    
    Table existence is tested using backend-specific db system catalogs like
    Jun Omae pointed out by contributing code from his `TracMigratePlugin`.
    
    With default SQLite db backend all unit tests pass now, so workaround in tests
    was obviously needed only due to `TagSetup.__init__` and `_db_table_exists`.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@12124 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed Oct 6, 2012
Commits on Oct 5, 2012
  1. TagsPlugin: Correct SQL statement and test logic for PostgreSQL, refs…

    … #9521.
    
    First own tests with PostgreSQL backend revealed these silly little mistakes,
    that slipped in when rewriting the code from [11984] for [12069].
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@12115 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed Oct 5, 2012
Commits on Sep 30, 2012
  1. TagsPlugin: (i18n) Update catalogs, pulling new translations from Tra…

    …nsifex too, refs #7787.
    
    We've got translations for
     * Dutch
     * Italian
     * Russian
    and even the start for a Telugu translation.
    
    Many thanks to all contributors, and please go on for completing your work.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@12079 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed Sep 30, 2012
  2. TagsPlugin: Continuing clean-up of code related to plugin's db schema.

    Start to improve code structure, following good Trac coding style by
    totally separating db access from the rest of the code.
    This will help with upgrading to the new db API for Trac>0.12 later on as well.
    
    And some very old compatibility code for Python<2.4 is removed now.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@12078 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed Sep 30, 2012
  3. TagsPlugin: Fixing some errors introduced in[12069].

    Had a hard time continuing to increase unit test coverage, until I recognized,
    that i.e. I added a wrong permission action `TAGS_EDIT` - fixed now.
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@12077 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed Sep 30, 2012
Commits on Sep 27, 2012
  1. TagsPlugin: Re-write db schema setup procedures, refs #9521.

    Since early schema change before `tags-0.2` in 2006 (see [1750]) this plugins
    schema check relied on a SELECT raising an exeption for non-existing db table.
    This has been discussed lately and found to be a flawed approach, that even
    breaks installations for Trac 0.13dev and ultimately 1.0 too.
    
    Now we introduce the common, recommended approach of tracking plugin db schema
    versions in Trac db table `system`, so the table existence test is called one
    last time, current schema version set, and only this gets checked further on.
    
    '''This changeset requires a database upgrade.'''
    
    Old checks could even be finally dropped after the next stable release,
    because there's likely no pre-`tags-0.2` installation left out there, isn't it?
    
    git-svn-id: http://trac-hacks.org/svn/tagsplugin/trunk@12069 7322e99d-02ea-0310-aa39-e9a107903beb
    hasienda committed Sep 27, 2012