Jonas Borgström | 19 May 2013 21:57
Picon
Gravatar

[Trac-dev] t.e.o maintenance

Hi all,

the t.e.o server will soon be offline for some maintenance work. I 
expect the server to be back online in around 1-3 hours if things go 
according to plan.

Cheers,
Jonas

--

-- 
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-dev+unsubscribe <at> googlegroups.com.
To post to this group, send email to trac-dev <at> googlegroups.com.
Visit this group at http://groups.google.com/group/trac-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Olemis Lang | 7 May 2013 20:40
Picon
Gravatar

[Trac-dev] Trac l10n not available after setup.py develop

After installing Trac with setup.py develop translations are not
available . Nevertheless I noticed that there are some l10n distribute
commands at hand ...

{{{
#!sh

$ /srv/venv/python/trac/trac-mq/bin/python setup.py --help-commands
[...]

Extra commands:
  update_catalog_tracini    update message catalogs from a POT file
  setopt                    set an option in setup.cfg or another config file
  check_catalog_tracini     check message catalog files, like `msgfmt --check`
  saveopts                  save supplied options to setup.cfg or
other config file
  update_catalog_js         update message catalogs from a POT file
  compile_catalog_js        compile message catalogs to binary MO files
  init_catalog_tracini      create a new catalog based on a POT file
  rotate                    delete older distributions, keeping N newest files
  check_catalog             check message catalog files, like `msgfmt --check`
  install_egg_info          Install an .egg-info directory for the package
  compile_catalog           compile message catalogs to binary MO files
  generate_messages_js      generate message javascript files from
binary MO files
  extract_messages_tracini  extract localizable strings from the project code
  extract_messages_js       extract localizable strings from the project code
  develop                   install package in 'development mode'
  egg_info                  create a distribution's .egg-info directory
  upload_docs               Upload documentation to PyPI
(Continue reading)

Olemis Lang | 2 May 2013 00:37
Picon
Gravatar

[Trac-dev] Error building Trac API docs in PDF format

How could I generate API docs in PDF format . At present I noticed the
following error . Is this possible at all ? Do I need to install
something else ? ... Or is it that api apidoc-pdf make target is not
working ?

{{{
#!sh

$ make apidoc-pdf
 It looks like you don't have a Makefile.cfg file yet.
 You can get started by doing `cp Makefile.cfg.sample Makefile.cfg'
 and then adapt it to your environment.
Running Sphinx v1.0.1
loading pickled environment... done
loading intersphinx inventory from http://docs.python.org/2.7/objects.inv...
building [pdf]: targets for 34 source files that are out of date
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
processing trac_dev... index api/index api/trac_attachment
api/trac_cache api/trac_core api/trac_db_api api/trac_db_util
api/trac_env api/trac_mimeview api/trac_ticket_roadmap api/trac_util
api/trac_util_datefmt api/trac_util_html api/trac_util_presentation
api/trac_util_text api/trac_util_datefmt api/trac_util_html
api/trac_util_presentation api/trac_util_text
api/trac_versioncontrol_api api/trac_versioncontrol_diff
api/trac_versioncontrol_svn_fs api/trac_web_api api/trac_web_auth
api/trac_web_chrome api/trac_web_href api/trac_web_main
api/trac_wiki_api api/trac_wiki_macros api/tracopt_mimeview
dev/testing dev/testing-intro dev/testing-core dev/testing-environment
dev/testing-database dev/testing-plugins glossary todo <string>::
(Continue reading)

Olemis Lang | 26 Apr 2013 02:54
Picon
Gravatar

[Trac-dev] Debugging functional tests using Eclipse PyDev

Hi !

I'm running the Trac XmlRpcPlugin test suite (i.e. functional tests)
using Eclipse PyDev . I'm able to intercept execution by setting
breakpoints in test code itself . Nevertheless they will not work
neither in plugin code nor in Trac core because it's executed in
another (tracd) process .

Q:

  - Is there any way to hook into tracd server process
    to enable the Eclipse PyDev debugger so as to intercept
    and debug RPC calls inside Eclipse IDE ?

Thanks in advance for your help . I look forward to your replies .

-- 
Regards,

Olemis.

Apache™ Bloodhound contributor
http://issues.apache.org/bloodhound

Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:

--

-- 
(Continue reading)

Olemis Lang | 22 Apr 2013 19:20
Picon
Gravatar

Internal errors <at> t.e.o WAS: [Trac-dev] Re: IResourceChangeListener listener interface

JFTR , while posting messages to trac:ticket:11148 I've received a
substantial number of ''Internal Server Error'' responses . Perhaps
something valuable is discovered in that instance if logging is turned
on .

-- 
Regards,

Olemis.

Apache™ Bloodhound contributor
http://issues.apache.org/bloodhound

Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:

--

-- 
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-dev+unsubscribe <at> googlegroups.com.
To post to this group, send email to trac-dev <at> googlegroups.com.
Visit this group at http://groups.google.com/group/trac-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Andrej Golcov | 10 Apr 2013 14:36
Picon

[Trac-dev] IResourceChangeListener listener interface

Hi everyone,


We are implementing a free-text search plugin as a part of  Apache™ Bloodhound. The approach we use is based on AdvancedSearch [1] and uses similar approach as TracAdvancedSearchPlugin [2] and FullTextSearchPlugin [3] plugins. In short: listening for ITicketChangeListener events and updating nonDb free-text-search index.

However,  there is a problem common for such plugins - renaming of a ticket related entity such as Version, Component Type, Severity etc. is not covered by the event and the plugin cannot reflect this change in its nonDb free-text-search index. 

As a part of Apache™ Bloodhound Trac fork, we added a new IResourceChangeListener interface, which is common for all resources (see full code in attached patch).  The main idea of the IResourceChangeListener interface is that it is similar to existing I*ChangeListener interfaces (existing interfaces are working as before), it is common for all resources (resource is sent as parameter) and that there is no need to introduce interfaces such as IVersionChangeListener, IComponentChangeListener etc. Listener may specificy resource types for which it has to be notified via method get_subscribed_resources. What do you think about such approach?

The IResourceChangeListener implementation was tested in Apache™ Bloodhound for a couple of months and it looks like it is stable enough and covers, at least, our requirements. I think that support of the IResourceChangeListener interface in Trac can be useful for Trac community and would like to suggest this patch for Trac. Please find the attached patch rebased against the Trac trunk.
Is the Trac community interested in applying something like IResourceChangeListener into the Trac codebase?

Cheers, Andrej

[1]  http://trac.edgewall.org/wiki/AdvancedSearch
[2] http://trac-hacks.org/wiki/TracAdvancedSearchPlugin
[3] http://trac-hacks.org/wiki/FullTextSearchPlugin

--
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-dev+unsubscribe <at> googlegroups.com.
To post to this group, send email to trac-dev <at> googlegroups.com.
Visit this group at http://groups.google.com/group/trac-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
qbolec | 7 Apr 2013 12:42
Picon
Gravatar

[Trac-dev] simm (a new changeset visualisation tool)

Hi,


I've implemented a proof of concept tool called "simm", which as opposed to diff, is focused on showing similarities between two files, instead of exposing differences.
You can see a web demo at http://vanisoft.pl/~lopuszanski/public/simm/ (it simply runs simm and diff -y on the two text snippets).
Currently the algorithm is exponential, so please test it only on the short examples provided by the website.

I'd like to integrate it with trac, which we use in both companies I work for. As a software architect, which performs many code reviews daily I am notoriously frustrated by the way diff compares files.
Could someone point me to some appropriate places in trac's documentation/source code, or otherwise guide me where should I start to plug my code to trac?

--
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-dev+unsubscribe <at> googlegroups.com.
To post to this group, send email to trac-dev <at> googlegroups.com.
Visit this group at http://groups.google.com/group/trac-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Constantinos Lalos | 1 Apr 2013 13:46
Picon

[Trac-dev] ticket custom fields


Hi !

I have created a ticket-custom field in the ticket view. This field is defined in the conf/trac.ini .
I would like a trac user to be unable to edit this field (this field should be something like a title). How can i do this?

Thanks in advance!

--
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-dev+unsubscribe <at> googlegroups.com.
To post to this group, send email to trac-dev <at> googlegroups.com.
Visit this group at http://groups.google.com/group/trac-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Olemis Lang | 31 Mar 2013 10:38
Picon
Gravatar

[Trac-dev] [RFC] Improvements to resource API

Hi !

I'm trying to expand the scope of the resources hierarchy in Apache™
Bloodhound .

For those not familiar with what's been done in there , in advance
I'll mention that an environment can contain many products (i.e.
projects) and for each one of them there will be a product environment
[1]_ (i.e. component manager , see trasourcec:ticket:11121) containing
everything you might expect to be hosted by a regular Trac environment
e.g. components (enabled / disabled by product) , configuration
(stored in the database rather that in filesystem) , product resources
, permissions , ...

My goal now is to reuse and leverage existing resource APIs to make
them work across product boundaries . You can think of this from a
more abstract perspective . Imagine you have different kinds of
component managers (e.g. environments, product environments, ... CM1,
CM2, ...) and there's a need to refer to resources managed by CM1
while performing some computation (e.g. request handling, trac-admin
command , ...) in CM2 scope .

My initial idea is as follows (notice that so far Resource class are
agnostic to component manager) :

  1. Resources setup as usual will still point to local resources . In the
     sample above Resource('ticket', 1) will be CM2's ticket 1 .
  2. For external resources I've been thinking of 3 approaches (...
after discarding
     quite a few ...)
     a. Add component manager parameters in resource-aware methods
        * e.g. PremissionCache__call__(self, realm_or_resource,
id=False, version=False, compmgr=None)
     b. Keep resource-aware methods signature as-is and incorporate
        «manager resources» in the resource hierarchy
        * e.g.

        Resource('product', 'PREFIX')
        +-- Resource('ticket', 1)

        Resource('product', 'PREFIX')
        +-- Resource('ticket', 1)
          +-- Resource('attachment', 'file.txt')

     c. Keep resource-aware methods signature as-is and add a new
        concept in resources API to switch manager context
        * e.g.

        Manager('product', 'PREFIX')
        +-- Resource('ticket', 1)

        Manager('product', 'PREFIX')
        +-- Resource('ticket', 1)
          +-- Resource('attachment', 'file.txt')

        Manager('CM1', mgrid)
        +-- Resource('ticket', 1)
          +-- Resource('attachment', 'file.txt')

Preliminary observations :

  - I do not quite like (a) , so I won't follow that way ...
  - In order to understand the rationale for using (a) or (b) consider
this example :
    * while handling a request in the scope of component manager CM1 there's
      a need to obtain a link to resource (realm, id) in CM2 , and check whether
      user has permission to see its contents.
      + using (b) (for products) it'd be possible to do something like

      {{{
      #!py

      resource = Resource('product', 'PREFIX').child('ticket',
1).child('attachment', 'f.txt')

      # instantiate product environment and another permission cache
object in that context
      # then invoke has_permission method of the later
      req.perm.has_permission(resource)

      # instantiate product environment and ResourceManager object in
that context
      # then invoke get_resource_url method of the later
      trac.resource.get_resource_url(env, resource, href)
      }}}

      + using (c) (in general) it'd be possible to do something like

      {{{
      #!py

      resource = Manager('cm1', id).child(parent_realm,
parent_id).child(realm, id)

      # instantiate manager and another permission cache object in that context
      # then invoke has_permission method of the later
      req.perm.has_permission(resource)

      # instantiate manager and ResourceManager object in that context
      # then invoke get_resource_url method of the later
      trac.resource.get_resource_url(cm2, resource, href)
      }}}

  - As you might have already noticed the main difference between (b)
    and (c) is that
    in the former case it is a bit hard to identify the exact point
where manager
    instantiation is needed
    * 'product' is a resource realm too .
    * It's difficult to intercept resource management extensions without
      patching Trac core in many locations.
    * The result will be tightly coupled to the implementation details of
      resource managers
    * There is no space for managers that are not resources e.g.
      trac.env.Environment
    * It would be necessary to traverse the resources hierarchy
      and «know-what-to-do» (i.e. what realm has to be used to instantiate a
      given component manager sub-type).
  - OTOH using (c) Manager class makes this boundary explicit,
    and it's possible to do things in such a way that access to resource
    manager will be O(1) .
    * Of course , new interfaces will be needed in order
      to look up and instantiate component managers , among other things ...
  - AFAIK at present the resources API is focused on realms .
    There's no (evident)
    way to implement or hook resource management extensions at such a
    higher level. Hence there are no extension points to make this
    kind of things happen .

So, after all this , my questions are :

  - What option would you prefer (if any) ?
  - If we implement something like this in Apache™ Bloodhound is
    there a chance to propose it as an enhancement to incorporate
    it upstream into Trac trunk ?

I look forward to your replies .

.. [1] BEP 3 # Product environments
       (https://issues.apache.org/bloodhound/wiki/Proposals/BEP-0003#product-envs)

-- 
Regards,

Olemis.

Apache™ Bloodhound contributor
http://issues.apache.org/bloodhound

Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:

--

-- 
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-dev+unsubscribe <at> googlegroups.com.
To post to this group, send email to trac-dev <at> googlegroups.com.
Visit this group at http://groups.google.com/group/trac-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Christopher Nelson | 28 Mar 2013 21:02
Picon

[Trac-dev] Help with query form

Working on my query augmentation
(http://trac.edgewall.org/ticket/10983), I've hit a brick wall.  I
have a more complete example which starts to support augmenting the
query form. I get the plugin's fields in the "And" and "Or" drop downs
and they add items in the Filters frame but when I click Update, the
plugin fields have no effect and they disappear from the Filters
section.

I've added code to process_request in trac/ticket/query.py but even at
the beginning of that function, my plugin fields are already missing.
I'm guessing there's magic in the query template or query.js but I
can't find it. Can someone point me at what gets executed when I click
Update?

                                                                        Chris
-- 
A: Top-posting.
Q: What is the most annoying thing in e-mail?

--

-- 
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-dev+unsubscribe <at> googlegroups.com.
To post to this group, send email to trac-dev <at> googlegroups.com.
Visit this group at http://groups.google.com/group/trac-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Remy Blank | 28 Mar 2013 13:28
Picon
Favicon

[Trac-dev] Test failures related to dates and i18n

I just ran our test suite on 1.0-stable, and I have a number of test
failures related to dates and i18n. This may be due to my slightly
special locale setup (en_CH is a custom locale), but AFAIU the tests
shouldn't depend on the my locale.

$ locale
LANG=en_US.utf8
LC_CTYPE=de_CH.utf8
LC_NUMERIC=en_CH.utf8
LC_TIME=en_CH.utf8
LC_COLLATE=en_CH.utf8
LC_MONETARY=en_CH.utf8
LC_MESSAGES=en_US.utf8
LC_PAPER=en_CH.utf8
LC_NAME=en_CH.utf8
LC_ADDRESS=en_CH.utf8
LC_TELEPHONE=en_CH.utf8
LC_MEASUREMENT=en_CH.utf8
LC_IDENTIFICATION=en_CH.utf8
LC_ALL=

Any ideas?

-- Remy

======================================================================
ERROR: test_i18n_parse_date_date (__main__.I18nDateFormatTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "trac/util/tests/datefmt.py", line 937, in test_i18n_parse_date_date
    datefmt.parse_date('28 Aug 2010', tz, en_GB))
  File "/home/joe/src/trac/1.0-stable/trac/util/datefmt.py", line 470,
in parse_date
    date=text, hint=hint), _('Invalid Date'))
TracError: "28 Aug 2010" is an invalid date, or the date format is not
known. Try "MM/DD/YY" instead.

======================================================================
ERROR: test_i18n_parse_date_datetime (__main__.I18nDateFormatTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "trac/util/tests/datefmt.py", line 837, in
test_i18n_parse_date_datetime
    en_US))
  File "/home/joe/src/trac/1.0-stable/trac/util/datefmt.py", line 470,
in parse_date
    date=text, hint=hint), _('Invalid Date'))
TracError: "Aug 28, 2010 1:45:56 PM" is an invalid date, or the date
format is not known. Try "MM/DD/YY" instead.

======================================================================
ERROR: test_i18n_parse_date_datetime_meridiem
(__main__.I18nDateFormatTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "trac/util/tests/datefmt.py", line 900, in
test_i18n_parse_date_datetime_meridiem
    en_US))
  File "/home/joe/src/trac/1.0-stable/trac/util/datefmt.py", line 470,
in parse_date
    date=text, hint=hint), _('Invalid Date'))
TracError: "Feb 22, 2011 0:45:56 AM" is an invalid date, or the date
format is not known. Try "MM/DD/YY" instead.

======================================================================
FAIL: test_format_compatibility (__main__.I18nDateFormatTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "trac/util/tests/datefmt.py", line 981, in test_format_compatibility
    datefmt.format_datetime(t, '%x %X', tz, en_US))
AssertionError: 'Aug 28, 2010 1:45:56 PM' != u'08/28/10 13:45:56'

======================================================================
FAIL: test_i18n_date_hint (__main__.I18nDateFormatTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "trac/util/tests/datefmt.py", line 788, in test_i18n_date_hint
    in ('MMM d, yyyy', 'MMM d, y'))
AssertionError

======================================================================
FAIL: test_i18n_datetime_hint (__main__.I18nDateFormatTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "trac/util/tests/datefmt.py", line 767, in test_i18n_datetime_hint
    in ('MMM d, yyyy h:mm:ss a', 'MMM d, y h:mm:ss a'))
AssertionError

======================================================================
FAIL: test_i18n_format_date (__main__.I18nDateFormatTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "trac/util/tests/datefmt.py", line 718, in test_i18n_format_date
    datefmt.format_date(t, tzinfo=tz, locale=en_US))
AssertionError: 'Aug 7, 2010' != u'08/07/10'

======================================================================
FAIL: test_i18n_format_datetime (__main__.I18nDateFormatTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "trac/util/tests/datefmt.py", line 694, in test_i18n_format_datetime
    locale=en_US))
AssertionError: 'Aug 28, 2010 1:45:56 PM' != u'08/28/10 13:45:56'

======================================================================
FAIL: test_i18n_format_time (__main__.I18nDateFormatTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "trac/util/tests/datefmt.py", line 746, in test_i18n_format_time
    datefmt.format_time(t, tzinfo=tz, locale=en_US))
AssertionError: '1:45:56 PM' != u'13:45:56'

----------------------------------------------------------------------
Ran 94 tests in 0.044s

FAILED (failures=6, errors=3)


Gmane