﻿ticket	summary	__group__	version	milestone	type	severity	owner	status	created	_changetime	_description	_reporter
10606	GitPlugin: Improve performance	plugin/git	1.0dev	next-dev-1.7.x	enhancement	critical		new	2012-03-04T15:22:25+01:00	2022-11-11T15:58:38+01:00	"''Created as part of the [ticket:10594 move of GitPlugin]. Tickets originally reported for th:GitPlugin: #746''

Quoting [th:ticket746:comment:6 hvr]:
>  - try to create an additional `libgit-thin`-based `Storage` in `PyGIT.py` to evaluate whether the exec+fork+parse overhead is still signifikant
>  - most external `git` calls can be avoided now thanks to extensive caching of meta-data; one of the remaining speed killers is listing directories in the source browser (`cat-file -s` calls can be optimized, by using GIT 1.5.3+ `-l` option to `ls-tree`; but having to call `rev-list` for each folder element still remains an issue... maybe it'll be possible to get an enhancement to `ls-tree` merged upstream to provide that information as well...)

----
See also: TracDev/Performance/Git"	Peter Suter
11061	TypeError: Git object id must be byte or a text string, not: int	plugin/git		next-major-releases	defect	minor		new	2013-02-13T08:10:33+01:00	2023-03-01T05:44:59+01:00	"We should be able to cope with git-svn converted repositories which might contain svn style TracLinks (like our own repository).

... but this ticket is more an opportunity to congratulate Jun for his effort with the [repos:jomae.git@pygit2] branch ;-)

We should also add libgit2/pygit2 versions to the system info.
In my case, it's 0.17.0 and 0.17.3 on OpenSuSE 0.12.2. 

Btw, I've also tried on Windows with the bleeding edge (build of latest from yesterday), but got many errors, the API has evolved quite a bit since 0.17.3.

----

==== How to Reproduce ====

While doing a GET operation on `/log/trunk/`, Trac issued an internal error.

''(please provide additional details here)''

Request parameters:
{{{
{'path': u'/trunk/', 'revs': u'11577-11612'}
}}}

User agent: `Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0`

==== System Information ====
|| '''`Trac`''' || `1.1.2dev` ||
|| '''`Babel`''' || `0.9.6` ||
|| '''`Docutils`''' || `0.9` ||
|| '''`Genshi`''' || `0.6 (without speedups)` ||
|| '''`Pygments`''' || `1.5` ||
|| '''`pysqlite`''' || `2.6.0` ||
|| '''`Python`''' || `2.7.3 (default, Apr 14 2012, 08:58:41) [GCC]` ||
|| '''`pytz`''' || `2012b` ||
|| '''`setuptools`''' || `0.6` ||
|| '''`SQLite`''' || `3.7.12.1` ||
|| '''`jQuery`''' || `1.8.3` ||

==== Enabled Plugins ====

==== Python Traceback ====
{{{
Traceback (most recent call last):
  File ""/home/cboos/trac/trunk/trac/web/main.py"", line 497, in _dispatch_request
    dispatcher.dispatch(req)
  File ""/home/cboos/trac/trunk/trac/web/main.py"", line 214, in dispatch
    resp = chosen_handler.process_request(req)
  File ""/home/cboos/trac/trunk/trac/versioncontrol/web_ui/log.py"", line 113, in process_request
    rev = unicode(repos.normalize_rev(rev))
  File ""/home/cboos/trac/trunk/tracopt/versioncontrol/git/git_fs.py"", line 520, in normalize_rev
    commit = self._get_commit(rev, raises=False)
  File ""/home/cboos/trac/trunk/tracopt/versioncontrol/git/git_fs.py"", line 445, in _get_commit
    git_object = self.git_repos[rev]
TypeError: Git object id must be byte or a text string, not: int
}}}"	Christian Boos
10599	GitPlugin: Show branches in timeline, changesets, browser	plugin/git	1.0dev	next-major-releases	enhancement	normal		new	2012-03-04T15:18:35+01:00	2017-11-23T13:50:35+01:00	"''Created as part of the [ticket:10594 move of GitPlugin]. Tickets originally reported for th:GitPlugin: th:#2633, th:#7860, th:#8522''

Quoting [th:ticket:2633 jkp@...]:
> It would be best if you could see which branch a commit was made against in both the changeset view and the timeline view.
-> worksforme, but really needs to be improved, see comment:4

Quoting [th:ticket:7860 shogsbro]:
> For Git repos with multiple branches it would be useful to be able to browse the branch
-> [comment:3 worksforme]

Quoting [th:ticket:8522 trac@...]:
> I'd like browse source to take me to the same [branch] by default each time.
-> [comment:2 duplicate]"	Peter Suter
11992	Allow git commit hashes to be abbreviated to 7 characters	plugin/git	1.0.4	next-major-releases	defect	normal		new	2015-03-21T09:11:55+01:00	2022-08-07T15:41:34+02:00	"Currently an abbreviated git commit hash is only recognised by trac if it's at least 8 characters.  But git itself defaults to abbreviating to 7 characters (if the 7 character abbreviation is unique in the repo) - to demonstrate this:

{{{
olly@pippikin:~/git/xapian$ git log -1 --oneline
575eab1 docs/: Add a document about character encoding, as suggested by James Aylett in #550.
}}}

The fix is a single character change - I'll attach a patch in a moment.

This seems to affect 1.0.4 and trunk."	olly@…
13169	GitNode.get_content() read entire of a file into memory even if it is huge	plugin/git		next-stable-1.6.x	defect	minor		new	2019-06-06T10:29:43+02:00	2023-09-23T22:33:10+02:00	"I think we should use `TemporaryFile`/`SpooledTemporaryFile` rather than `cStringIO`.

See also:

 - [source:/tags/trac-1.0.17/tracopt/versioncontrol/git/git_fs.py@:749#L746 GitNode.get_content()]
 - [source:/tags/trac-1.0.17/tracopt/versioncontrol/git/PyGIT.py@:851#L850 get_file()] - `cStringIO` is used
 - [source:/tags/trac-1.0.17/tracopt/versioncontrol/git/PyGIT.py@:702#L679 cat_file()] - entire of the content into memory by `Popen.stdout.read(size)`"	Jun Omae
10704	Plugin should ignore commits/revisions not in heads or tags	plugin/git	0.12.3	next-stable-1.6.x	enhancement	normal		new	2012-05-27T17:43:35+02:00	2023-09-23T22:33:10+02:00	"It seems plugin still (at least its 0.12 version) processes and adds to timeline all commits/revisions, even if they are not in heads or tags refs. From what I have read and by my experience this is wrong.

The difference is same as between:

{{{
git rev-list --all
}}}

and:

{{{
git rev-list --branches --tags
}}}

The point is that various git extensions are storing custom objects in other refs. For example, GitHub stores all pull requests (not even pulled in) in other refs. So if I have a mirrored GitHub repository and Trac access it I get all commits from all pending pull requests visible in timeline."	Mitar
10730	Provide Git hooks to call trac-admin	plugin/git		next-stable-1.6.x	enhancement	normal		new	2012-06-19T07:07:03+02:00	2023-09-23T22:33:10+02:00	"As mentioned on TracGit#hooks and as discussed in #10594, we should provide a post-receive hook script for Git to  call trac-admin.

=== References
* ​th:GitPlugin#post-receivehookscripts lists several such shell scripts.
* We provide such hooks for Subversion as shell scripts in `contrib` ([browser:trunk/contrib/trac-svn-hook trac-svn-hook] / [browser:trunk/contrib/trac-svn-post-commit-hook.cmd trac-svn-post-commit-hook.cmd]).
* We provide such hooks for Mercurial as Python scripts in the plugin's directory (#10225 / [browser:plugins/0.13/mercurial-plugin/tracext/hg/hooks.py hooks.py])."	Peter Suter
11043	Add option to hide a commiter's email address	plugin/git		unscheduled	enhancement	minor		new	2013-02-03T15:04:34+01:00	2013-02-28T00:29:45+01:00	"Hi,

when viewing changesets in timeline or comments in ticket changes besides the name of the author an email address will be displayed. If setting ""show_email_address"" is false, the email address will be truncated / obfuscated.

Example:
Author name <author@...>

I'd like to have a setting to remove email address completely.

Example:
Author name

Instead of ""Author name <author@...>"" or ""Author name <author@name.com>""

I patched it by changing this line http://trac.edgewall.org/browser/trunk/tracopt/versioncontrol/git/git_fs.py#L101

from ""user, time, tz_str = s.rsplit(None, 2)"" to ""user, email, time, tz_str = s.rsplit(None, 3)"" and just ignored the email variable.

Guess this is not the best solution since some users want to match the email address with Trac users. Would be great to have a setting for this.

Thanks!"	anonymous
10666	Setting fine grained permissions using AuthzPolicy does not work	plugin/git		next-major-releases	defect	normal		new	2012-04-13T19:44:03+02:00	2015-01-03T09:33:41+01:00	"While attempting to use AuthzPolicy to set fine-grained (per-branch) permissions, I found out that there seemed to be no way to set these permissions for a git repository (simply using repository: did not do anything). After reading up a bit on how the AuthzPolicy permissions work, I found out that these apparently make use of 'resource descriptors' to check whether a user has permission to do something, and digging through the TracGit source brought me to the conclusion that there does not seem to be any kind of implementation of resource descriptors - which, of course, means I have no way of addressing a specific branch in my permissions configuration.

I've come to the above conclusion by attempting to disallow all features for all repositories by setting user permissions on [repository:*@*] to nothing, which did not do anything and still left all repositories and branches visible. Disallowing everything on [*] worked fine, so I know that at least the permissions system itself is working.

Unless I'm missing something, it seems a rather vital feature is missing. Is this something that is planned to be implemented, or have I overlooked something and is this functionality already present?"	jamsoftgamedev@…
12413	support for git-lfs and git-annex	plugin/git		unscheduled	enhancement	normal		new	2016-03-23T18:25:20+01:00	2018-03-08T06:07:54+01:00	"Hi,

it would be great, if the source-browser of git could support git-lfs and/or git-annex (large file storage) by redirecting to the real file in the lfs-folder resp. annex-folder. 


I want to you trac (especially trac-wiki) in combination with git-lfs for storing educational resources. git would be in charge for distributing the files to all teachers / students; with tracwiki I would organize all the ""meta-data"" like informations on lectures etc. It is one of the key-aspects (for teachers) to work on the files (worksheets etc.) at the local computer, therefore a dvcs (with large file support) is desperately needed.

For the repo-browser one could also use gitblit, since it supports git-lfs (see https://github.com/gitblit/gitblit/issues/1025 and the fix https://github.com/gitblit/gitblit/commit/77c38a1865564a4ea4544bfb1f52bedf4326d481), but it would be more helpfull if trac would support git-lfs.

And apart from that: git-annex has an equivalent approach for storing large-files and is even more flexible as git-lfs. gitlab is supporting both git-lfs and git-annex, but the wiki-system of gitlab is too limited.

I've been searching for a wiki-system with a dvcs-repo-browser with large-file-support during the last months, the only one with a good wiki-system  I could found was trac. It would be great, if you could add support for git-lfs and/or git-annex.

Greetings

Tobias"	tracuser@…
8417	CachedRepository support in TracMercurial	plugin/mercurial	0.11.1	plugin - mercurial	enhancement	major	Christian Boos	new	2009-06-25T16:09:38+02:00	2022-06-09T23:59:56+02:00	I used trac with svn, and switched to mercurial. the revision table in postgres is no more updated with new changesets. So when I do a search in changesets, new changesets are not listed. Did I forgot to configure something?	asterix@…
10091	Exception when formatting Mercurial changeset link	plugin/mercurial	0.12.2	next-major-releases	defect	normal		new	2011-03-19T19:22:39+01:00	2015-05-26T20:50:57+02:00	"When trying to format `[cset:34c7144cba5a]` or `[123:34c7144cba5a]` when having multiple Mercurial repositories but no default repository fails with the following exception:

{{{
UnboundLocalError: local variable 'errmsg' referenced before assignment
}}}

Stack trace:

{{{
File ""/usr/lib/python2.6/dist-packages/trac/ticket/templates/ticket_change.html"", line 61, in <Expression u'wiki_to_html(context, change.comment, escape_newlines=preserve_newlines)'>
  <py:otherwise>${wiki_to_html(context, change.comment, escape_newlines=preserve_newlines)}</py:otherwise>
File ""/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py"", line 1497, in format_to_html
  return HtmlFormatter(env, context, wikidom).generate(escape_newlines)
File ""/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py"", line 1452, in generate
  escape_newlines)
File ""/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py"", line 1240, in format
  result = re.sub(self.wikiparser.rules, self.replace, line)
File ""/usr/lib/python2.6/re.py"", line 151, in sub
  return _compile(pattern, 0).sub(repl, string, count)
File ""/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py"", line 1158, in replace
  replacement = self.handle_match(fullmatch)
File ""/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py"", line 1154, in handle_match
  return internal_handler(match, fullmatch)
File ""/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py"", line 540, in _lhref_formatter
  return self._make_lhref_link(match, fullmatch, rel, ns, target, label)
File ""/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py"", line 581, in _make_lhref_link
  fullmatch)
File ""/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py"", line 590, in _make_link
  fullmatch)
File ""build/bdist.linux-x86_64/egg/tracext/hg/backend.py"", line 438, in _format_link
  title=errmsg, rel=""nofollow"")
}}}"	Mitar
10719	"Abort: cannot follow file not in parent revision: ""tracext/hg/backend.py"""	plugin/mercurial	0.13dev	plugin - mercurial	defect	major		new	2012-06-10T23:00:53+02:00	2016-03-14T14:29:23+01:00	"Looks like we have a problem with `walkchangerevs` once again...

It doesn't happen for me with with Mercurial 2.0.2, but happens here with 2.2.1.

==== How to Reproduce ====

While doing a GET operation on `/log/mercurial-plugin/tracext/hg/backend.py`, Trac issued an internal error.

Request parameters:
{{{
{'path': u'/mercurial-plugin/tracext/hg/backend.py', 'rev': u'3'}
}}}

User agent: `Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.21 Safari/536.11`

==== System Information ====
|| '''`Trac`''' || `0.13dev-r11050` ||
...
|| '''`Mercurial`''' || `2.2.1` ||
|| '''`mod_wsgi`''' || `3.3 (WSGIProcessGroup trac WSGIApplicationGroup %{GLOBAL})` ||
|| '''`Python`''' || `2.6.6 (r266:84292, Dec 26 2010, 22:48:11) ` [[br]] `[GCC 4.4.5]` ||

==== Enabled Plugins ====
|| '''`TracMercurial`''' || `0.13.0.5dev` ||
...

==== Python Traceback ====
{{{
Traceback (most recent call last):
  File ""/usr/local/virtualenv/0.13-stable/lib/python2.6/site-packages/Trac-0.13dev_r11050-py2.6.egg/trac/web/main.py"", line 480, in _dispatch_request
    dispatcher.dispatch(req)
  File ""/usr/local/virtualenv/0.13-stable/lib/python2.6/site-packages/Trac-0.13dev_r11050-py2.6.egg/trac/web/main.py"", line 198, in dispatch
    resp = chosen_handler.process_request(req)
  File ""/usr/local/virtualenv/0.13-stable/lib/python2.6/site-packages/Trac-0.13dev_r11050-py2.6.egg/trac/versioncontrol/web_ui/log.py"", line 172, in process_request
    for old_path, old_rev, old_chg in history():
  File ""/usr/local/virtualenv/0.13-stable/lib/python2.6/site-packages/Trac-0.13dev_r11050-py2.6.egg/trac/versioncontrol/web_ui/log.py"", line 163, in history
    for h in node.get_history():
  File ""/usr/local/virtualenv/0.13-stable/lib/python2.6/site-packages/TracMercurial-0.13.0.5dev-py2.6.egg/tracext/hg/backend.py"", line 1092, in _get_history_1_4
    for ctx in cmdutil.walkchangerevs(repo, matcher, opts, prep):
  File ""/usr/lib/python2.6/dist-packages/mercurial/cmdutil.py"", line 1058, in walkchangerevs
    for file_, node in iterfiles():
  File ""/usr/lib/python2.6/dist-packages/mercurial/cmdutil.py"", line 1052, in iterfiles
    'revision: ""%s""') % filename)
Abort: cannot follow file not in parent revision: ""tracext/hg/backend.py""
}}}"	Christian Boos
8068	Mercurial bundle attachments should be viewable in readable representation.	plugin/mercurial	none	plugin - mercurial	enhancement	normal	Christian Boos	new	2009-02-18T15:49:39+01:00	2021-04-29T04:05:47+02:00	"When a mercurial bundle is attached to a ticket, viewing that attachment should show a readable representation of the changesets it contains (as if a regular patch had been attached).

Extra points if it also shows metadata about the revisions in the bundle, like author and commit message :).

(All of the above assumes the project has a mercurial repository and the parent revision of the bundle is in that repository)"	fvbommel
9704	Support for subrepositories mercurial extension	plugin/mercurial	0.13dev	plugin - mercurial	enhancement	normal		new	2010-10-20T18:39:52+02:00	2021-04-29T04:05:52+02:00	"Allow trac to manage the subrepositories in mercurial. Right now are not shown. 

http://mercurial.selenic.com/wiki/Subrepositories"	Ismael de Esteban <ismael@…>
9852	Mercurial plugin support for pulling repository description from hgrc	plugin/mercurial		plugin - mercurial	enhancement	normal		new	2010-11-19T19:58:37+01:00	2021-04-29T04:06:02+02:00	The description field of a Mercurial repository could be read from the repository's `.hg/hgrc` file. It's usually specified in the `[web]` section. The information could be used as the description if the field is left blank, or overridden otherwise. This would save admins from having to write the description in two places.	kamil@…
10411	Enhancing TracMercurial plugin to use new server-command protocol	plugin/mercurial	0.12dev	plugin - mercurial	enhancement	normal		new	2011-10-14T20:13:44+02:00	2020-05-20T08:38:28+02:00	"I suggest to use Mercurial's new command server protocol for the TracMercurial plugin.

After recent releases of Mercurial such as 1.8 and 1.9, TracMercurial plugin did not work properly until several patches were delivered, mainly due to Mercurial's internal API changes.

Now Mercurial 1.9 provides [http://mercurial-scm.org/wiki/CommandServer a stable command-server protocol].
It is a fairly simple protocol using pipes to send length + data streams, and features the same command set to that of the console command line.

TracMercurial is for showing the timeline (prev/next and file list) and browsing the repository. It could be implemented using a few commands such as `log`, `tip`, `heads`, `tags`, `diff`, `status --change`, etc.

If we combine this enhancement with a !CachedRepository implementation (ref #8417), the performance problem will be minized.

I think this approach will significantly reduce the efforts for adapting to a new version of Mercurial, and make Trac users to escape from hassle of upgrading.

"	Joongi Kim <me@…>
10950	[hg] encoding setting is not used for files in hg	plugin/mercurial	1.0dev	plugin - mercurial	defect	normal		new	2012-11-13T05:41:16+01:00	2016-03-14T14:29:34+01:00	"We have some files in UTF-8 and some files in cp1251 in our mercurial repository.
{{{
[hg] encoding = utf-8, cp1251
}}}

With this setting committer, commit message, etc are displayed correct in trac's source browser. Files in UTF-8 are also displayed correct, but not files in cp1251. 

Attached patch adds encoding conversion for file content according to [hg] encoding setting."	soloman@…
13050	Quickjump dropdown overflows due to Mercurial tags	plugin/mercurial		plugin - mercurial	defect	normal		new	2018-06-25T22:37:14+02:00	2018-06-25T22:37:14+02:00	"* [source:trunk/tracopt/versioncontrol/svn/svn_fs.py@16609#L479 SVN get_quickjump_entries] just lists each tag path.
* [source:trunk/tracopt/versioncontrol/git/git_fs.py@16411#L585 Git  get_quickjump_entries] just lists each tag name.
* [source:mercurial-plugin/tracext/hg/backend.py@59:639-703,724-730#L682 Mercurial get_quickjump_entries] collects all tags of a revision and joins them together.

When one Mercurial revision has many tags this leads to a huge, overflowing quickjump menu. Can we just drop this?

{{{#!patch
diff -r a821499e945c tracext/hg/backend.py
--- a/tracext/hg/backend.py	Mon Jun 25 19:38:48 2018 +0200
+++ b/tracext/hg/backend.py	Mon Jun 25 22:29:56 2018 +0200
@@ -689,22 +689,11 @@
                 closed_branches[ctx] = b
             else:
                 branches[ctx] = b
-        # map node to tag names
-        tags = {}
-        tagslist = self.repo.tagslist()
-        for tag, n in tagslist:
-            tags.setdefault(n, []).append(self.to_u(tag))
-        def taginfo(ctx):
-            t = tags.get(ctx.node())
-            if t:
-                return ' (%s)' % ', '.join(t)
-            else:
-                return ''
         def quickjump_entries(ctx_name_pairs):
             for ctx, name in sorted(ctx_name_pairs, reverse=True,
                                     key=lambda (ctx, name): ctx.rev()):
                 nodestr = self._display(ctx)
-                yield ((name or nodestr) + taginfo(ctx), '/', nodestr)
+                yield ((name or nodestr), '/', nodestr)
         # bookmarks
         bookmarks = [(self.changectx(b), b)
                      for b in get_repo_bookmarks(self.repo)]
@@ -721,9 +710,9 @@
         for e in quickjump_entries(interesting_heads):
             yield _(""Extra heads""), e[0], e[1], e[2]
         # tags
-        for t, n in reversed(tagslist):
+        for t, n in reversed(self.repo.tagslist()):
             try:
-                yield (_(""Tags""), ', '.join(tags[n]), '/',
+                yield (_(""Tags""), self.to_u(t), '/',
                        self._display(self.repo[n]))
             except (KeyError, RepoLookupError):
                 pass
}}}

Is it important to see which branch has the `(tip)` tag?"	Peter Suter
13092	Unified diff of changeset sometimes include wrong changes?	plugin/mercurial		plugin - mercurial	defect	normal		new	2018-10-17T11:01:57+02:00	2022-07-18T12:31:54+02:00	"For example the changesets before the merge log:mercurial-plugin@17:
* changeset:16/mercurial-plugin: The [/changeset/16/mercurial-plugin/?format=diff&new=2706330d90cb30818cf9d377606afc7f41702ba7 Unified Diff] there looks correct.
* changeset:15/mercurial-plugin: The [/changeset/15/mercurial-plugin/?format=diff&new=fe49850212ceb0907303cef73f0703150e790d22 Unified Diff] there looks correct.
* changeset:14/mercurial-plugin: The [/changeset/14/mercurial-plugin/?format=diff&new=89d0599cbded8e1376e9ff8bcc670ce5c3385f23 Unified Diff] includes a lot more changes than it should!

Another example is before the merge log:mercurial-plugin@46:
* changeset:45/mercurial-plugin: The [/changeset/45/mercurial-plugin?format=diff&new=7c49d0e317476d951b80c9195a537620624e9169 Unified Diff] again includes a lot more changes than it should.
"	anonymous
13318	Changeset with new file links to a different revision	plugin/mercurial		plugin - mercurial	defect	normal		new	2020-07-10T14:35:58+02:00	2023-03-13T19:41:52+01:00	"We noticed a changeset that links to the wrong revisions of files in the changeset. It all works correctly for other changesets. I don't know what's special about this changeset.

Trac 	1.5.1.dev0
Jinja2 	2.11.1
Mercurial 	5.3+3-847e582f3cc9
tracmercurial 	1.0.0.10.dev0

Any ideas?"	anonymous
10640	Mercurial user aliases	plugin/mercurial	0.12-stable	undecided	enhancement	normal		new	2012-03-24T16:38:26+01:00	2015-03-02T21:04:15+01:00	"With Mercurial you usually use ""Full Name <email@address>"" as author for your changesets while with Trac you use just ""somename"" so it would be nice to have the ability to map changesets to the right Trac user.

I've made a patch that implements this but I guess someone should take a look at it as this is the first time I'm working on a Trac plugin."	Julian Brost <julian@…>
12453	branch/tag/bookmark name should be decoded as utf-8	plugin/mercurial			defect	normal		new	2016-04-12T13:19:32+02:00	2016-04-13T02:27:15+02:00	"For example, when I set `hg.encoding=cp932` (Japanese Shift_JIS),
I see broken Japanese tag/branch/bookmark names in repo browser.

We should use utf-8 (=`HGENCODING`) to decode branch/tag/bookmark string,
not with `hg.encoding` (for file name).

I have two patches for this issue.

- https://bitbucket.org/gotoh/trac-mercurial-plugin-mod/commits/4b0488c954ca8d7174e816c10d39b4c7fc8cfc58
- https://bitbucket.org/gotoh/trac-mercurial-plugin-mod/commits/67197d6a98feb002f9107d59110c11b48cb952c8



"	shunichi.goto@…
13493	Make compatible with Python 3, Mercurial 6.2+ and Trac 1.5.3+	plugin/mercurial			defect	normal	Jun Omae	assigned	2022-08-31T09:08:17+02:00	2022-09-11T00:59:20+02:00	[https://www.mercurial-scm.org/wiki/Release6.2 Mercurial 6.2] has been released on 2022-07-11. The release supports only Python 3.6+ but mercurial plugin doesn't support Python 3 neither Trac 1.5.3+.	Jun Omae
11044	Include Mercurial support in Trac distribution	plugin/mercurial	1.0-stable	plugin - mercurial	enhancement	normal		new	2013-02-03T16:07:45+01:00	2018-06-23T21:51:44+02:00	If git support is included, why not Mercurial as well?	Dirkjan Ochtman <dirkjan@…>
8813	next_rev is slow, particularly in the direct-svnfs case	version control	0.11	next-major-releases	defect	major	anonymous	new	2009-11-13T10:10:33+01:00	2023-03-23T22:27:14+01:00	"This is a continuation of #7490, which became too ""big"" to be usable. Please keep that other ticket closed.

A lot of possible reasons for bad performance have been identified, some of them fixed, most being due to installation and configuration issues. Please refer to the TracPerformance checklist, and help maintain that wiki page with your findings.

This ticket should be used to help identify the remaining performance bottlenecks, a part from those which are already known (see TracDev/Performance).


"	Christian Boos
3470	improve handling of scoped repositories with copy history	version control	devel	next-major-releases	defect	major		new	2006-07-25T21:44:29+02:00	2015-05-26T20:50:57+02:00	"While testing r3015, the revisions are still not working properly.  I removed trac 0.9.6, checked out and installed r3570.  I ran all the required upgrade commands and resync'd, but trac still always shows one rev for the part of the svn repo moved from another part.

Here's an example... the svn repo had proj1/trunk/java/src and proj2/trunk/websrc.  I renamed websrc in proj2/trunk to src.  Then I created proj1/trunk/web and moved src from proj2/trunk to proj1/trunk/web.  When I make a change to web/src/file1 the revision is incremented, but all files in web/src show that revision too.

If I point trac to the root of the repo and resync, things work better, but if I point to proj1, the revision for the moved code is always the latest revision for files that haven't been updated since the move.

I'm guessing this is because trac is indexing only the current point in the history since the move."	posterday@…
3519	browse source - edit feature?	version control	0.9.6	next-major-releases	enhancement	normal		new	2006-08-04T22:40:37+02:00	2022-01-29T18:33:38+01:00	"It would be great if when browsing the source tree through the subversion repository, there was a way to pull up an ""Edit"" box to make quick edits to files and submit them to the subversion repository.  This way I can give access to WIKI users to make edits to files within the subversion repository without them needing to set up full development environments."	anonymous
2611	Problem with SVN bindings (SVN 1.3.0, Trac r2771)	version control	0.10.4	not applicable	defect	major	Christian Boos	new	2006-01-16T10:08:05+01:00	2023-01-18T11:07:10+01:00	"Every morning when I first try to get to Trac, I get this error on the first request:

{{{
Mod_python error: ""PythonHandler trac.web.modpython_frontend""

Traceback (most recent call last):
...
  File ""/home/manuzhai/dev/trac/trac/versioncontrol/svn_fs.py"", line 31, in ?
    from svn import fs, repos, core, delta
  File ""/usr/lib/python2.4/site-packages/svn/fs.py"", line 19, in ?
    from libsvn.fs import *
  File ""/usr/lib/python2.4/site-packages/libsvn/fs.py"", line 29, in ?
    import core
  File ""/usr/lib/python2.4/site-packages/libsvn/core.py"", line 3049, in ?
    svn_pool_create()
  File ""/usr/lib/python2.4/site-packages/libsvn/core.py"", line 1098, in svn_pool_create
    return apply(_core.svn_pool_create, args)

TypeError: argument number 0: a 'apr_pool_t *' is expected, 'instance()' is received
}}}

''Similar symptoms: ''
{{{
[Fri Sep 29 22:05:12 2006] [error] [client 127.0.0.1] PythonHandler trac.web.modpython_frontend: TypeError: argument number 0: a 'apr_pool_t *' is expected, 'instance(<libsvn.core.GenericSWIGWrapper instance at 0xb6924c8c>)' is received
}}}

Subsequent requests seem to just work...

=== Note ===

This is now a well-known issue having to do with the way the SVN Python bindings behaves when multiple Python interpreters are used within the same process, as this can be the case with mod_python e.g. when more than one virtual host is used. 

Most SVN binding versions are affected, though there's no confirmed report of this with 1.2.x (the bug started to be reported with 1.3.0) and reverting to SVN 1.2.4 is sometimes mentioned as a workaround.

There are other documented workarounds where one can keep using SVN 1.3.x and 1.4.x or any newer version:
 - see #3455
 - see comment:72 (`mod_python`)
 - see comment:94 (`mod_wsgi`)

Related issue: #3371
"	Manuzhai
12406	Standardize nomenclature/options for cached repository	version control		1.7.1	enhancement	normal		new	2016-03-16T22:25:08+01:00	2022-03-22T03:19:05+01:00	"Cached SVN repository is specified using the type //svn//. Cached Git repository is specified using the option `[git]` `cached_repository`. I think the latter is more clear, however it can't be specified per-repository.

In order to be more consistent, we could make `cached` a repository attribute, and use it for Git and Subversion repositories. We could allow the attribute to be set from the //Manage Repositories// admin page. An upgrade could be added to migrate users to the new configuration.

Also, the admin panel shows two additional types: //direct-svnfs// and //svnfs//. Are these just aliases?"	Ryan J Ollos
13215	Adding a repository does NOT trim trailing blanks	version control	1.2.2	1.7.1	defect	normal		new	2019-10-27T15:57:50+01:00	2021-05-28T21:28:12+02:00	"Adding a new git repository fails to remove trailing blanks from the repository path. It took some time for me to figure out.

This happened with trac 1.2.2, I didn't test newer versions"	strk@…
11706	"""Can't synchronize"" warning message persists longer than it should"	version control		next-dev-1.7.x	defect	normal		new	2014-08-04T02:45:20+02:00	2020-12-29T09:45:39+01:00	"To reproduce:
 1. Add or modify an SVN repository (or any type) and set its `type` to be any other type.
 1. Save the changes and find the following message when redirected back to the //Manage Repositories// page:
 {{{#!html
<div id=""warning"" class=""system-message"">
        <a style=""display: inline;"" class=""trac-close-msg"" href=""#"" title=""Hide this warning""><span>close</span></a>
          <strong>Warning:</strong>
          Can't synchronize with repository ""(default)"" ('/home/user/Workspace/tracdev/repos/tracdev' does not appear to contain a repository (Mercurial 2.2.2 says RepoError: repository /home/user/Workspace/tracdev/repos/tracdev not found)). Look in the Trac log for more information.
      </div>
}}}
 1. Select the repository and set its type correctly.
 1. //Submit changes// and on redirect back to the //Manage Repositories// page, notice that the warning message is still present.
 1. Refresh the page to cause the warning message to disappear.
"	Ryan J Ollos
12161	Add a Revision Log macro	version control		next-dev-1.7.x	enhancement	normal		new	2015-08-08T06:02:44+02:00	2020-12-29T09:45:39+01:00	This would be similar to the [th:ChangeLogMacro]. That changes could be based on that macro if the code was refactored and tests added.	Ryan J Ollos
12898	Add interface for changes on cached repository	version control		next-dev-1.7.x	enhancement	normal		new	2017-08-27T08:11:42+02:00	2020-12-29T09:45:39+01:00	"Plugins such as [th:TracTicketChangelogPlugin] implement an `IAdminCommandProvider` command to perform an initial synchronization.
{{{#!sh
$ trac-admin $env ticketlog sync
}}}

It would be nice if we could hook into the `repository sync` and `repository resync` commands rather than having a separate command for the plugin. I considered adding a `changeset_synchronized` method to `IRepositoryChangeListener`, but the pattern didn't seem quite right.

All of the other `I*ChangeListener` interfaces send notifications when the an instance of the model has changed. `IRepositoryChangeListener` sends a notification when the repository that is external to Trac has changed, and Trac uses that notification to synchronize the cache with the repository on disk.

That led to my thinking that a better solution would be an interface that sends notifications on changes to `CachedRepository`.

{{{#!python
class ICachedRepositoryChangeListener(Interface):

    def cache_deleted(repos):
        """"""Called when the cache is deleted.""""""

    def changeset_added(repos, changeset):
        """"""Called when a changeset is added.""""""

    def changeset_modified(repos, changeset, old_changeset):
        """"""Called when a changeset is modified.""""""
}}}"	Ryan J Ollos
13277	Add a macro for rendering code from the repository	version control		next-dev-1.7.x	enhancement	normal		new	2020-04-29T19:59:03+02:00	2021-06-02T19:31:57+02:00	"The macro should render code from the repository, optionally with line numbers.

* Specify revision id to render
* Specify line range to render
* Render changesets from repository
 * Path as an optional argument to only render changeset for specified path

Examples:
* [th:IncludeMacro]
* [th:CiteCodeMacro]
* [th:CodeExampleMacro]"	Ryan J Ollos
13301	"Remove ""Can't synchronize"" warnings or only show if user has TRAC_ADMIN"	version control		next-dev-1.7.x	enhancement	normal	Ryan J Ollos	assigned	2020-05-20T08:02:15+02:00	2020-12-29T09:45:39+01:00	"First mentioned in comment:18:ticket:11269.

This warning describes a configuration problem and we shouldn't display it to a non-admin user."	Ryan J Ollos
10764	refactor changeset search	version control	1.0dev	next-major-releases	defect	major		new	2012-07-12T16:38:43+02:00	2015-07-11T07:41:34+02:00	"Currently it's done at the level of the `ChangesetModule`, assuming all the data is in the database's `revision` table!

(see [source:trunk/trac/versioncontrol/web_ui/changeset.py@11093#L1143])

Obviously this won't work for non-cached repositories. The current implementation needs to be moved to the cached repository and each repository should be able to provide results (or not, e.g.  on a per repository basis depending on some settings, like don't search that non-cached linux repo, as it's too big)."	Christian Boos
9343	Because Trac support for multiple repos, each repo with a related encoding.	version control	0.12dev	next-major-releases	enhancement	minor		new	2010-05-15T14:50:12+02:00	2017-04-16T22:35:39+02:00	"So I recommend for each repos, set an distinct default charset for it.
"	anonymous
978	Specify InterTrac context for a repository	version control	devel	next-major-releases	enhancement	normal		new	2004-11-22T11:22:12+01:00	2022-07-19T03:21:36+02:00	"This topic was already mentioned on the list of features for the 2.0 Roadmap, 
so I thought I should created a ticket for it in order to comment on that topic.

Actually, [http://svk.elixus.org SVK] ''is'' supported, out of the box,
because a SVK repository is just a regular Subversion repository.
Simply configuring a Trac environment to use the SVK repository just works.

However, starting from this basic level of support, 
several SVK-specific enhancements could be made:
 * show the list of mirrors
 * when displaying a changeset, show if it is one generated
   by SVK (like those created while synchronizing a mirrored repository)
 * annotate branches with their merge tickets
 * ...
"	Christian Boos
2382	WebAdmin: resync from the web interface	version control	0.9	next-major-releases	enhancement	normal		new	2005-11-20T10:24:21+01:00	2015-05-26T20:50:57+02:00	"It would be nice to be able to resynchronize from the web interface. I've written a WebAdmin component that does this for any repository that supports the 'sync' method.

(Should we have a WebAdmin component for tickets?)"	Manuzhai
2733	Push some more behaviour to the vc backend	version control	0.9.3	next-major-releases	enhancement	normal		new	2006-02-08T21:26:43+01:00	2015-05-26T20:50:57+02:00	"In order to get my new TracDarcs plugin working, I had to apply [http://artiemestieri.tn.it/~lele/projects/trac-darcs/trac-api-2866.patch this patch] that 

 1. Fixes #2731
 1. Adds an ""hash"" field to the `revision` table
 1. Moves the actual insertion of the cache data from the `CachedRepository` class to the `Changeset` one

Point 3 allows the backend to augment the cached data as needed, simply by overriding a `Changeset` method (see [http://artiemestieri.tn.it/~lele/projects/trac-darcs/tracdarcs/changeset.py for example]). 

Of course, I could have reimplemented the whole `sync()` machinery in a subclass of `CachedRepository`, but DRY approach suggests that's not the right way.
"	Lele Gaifax
3236	Support for a merge change type in version control API	version control	devel	next-major-releases	enhancement	normal		new	2006-06-08T03:36:04+02:00	2015-05-26T20:50:57+02:00	"Trac currently supports ''add'', ''edit'', ''delete'', ''copy'' and ''move'' change types for files in a changeset. However, it would also be nice if Trac supported some of the ''merge'' change type for changes that involve merging changes from other files.

I realise that Subversion doesn't currently implement merge tracking natively (''yet''), but I have been working on a [http://www.perforce.com/ Perforce] plugin for Trac (similar to the one described in #257 but based on [http://pyperforce.sourceforge.net/ PyPerforce]) and would like to be able to get Perforce's merge/integration information displayed through Trac.

Perforce supports a number of different merge/integration types:
 * '''branch from''' - An exact copy of a file to a new location. Equivalent to Trac's ''copy'' or ''move'' depending on whether the source file was also deleted in the same changeset.
 * '''add from''' - A copy of a file to a new location that has been modified before checkin (related to #3172).
 * '''copy from''' - A merge operation that ignores any changes in the target file, effectively replacing the target with the source.
 * '''ignore from''' - A merge operation that ignores any changes in the source file, keeping the target file's changes.
 * '''merge from''' - A merge operation that merges the changes from both source and target files.
 * '''edit from''' - A merge operation that merges the changes from both source and target files and contains original user edits.
 * '''delete from''' - A merge of a deleted source file into the target file, deleting the target file. Basically a delete operation with an associated source file.

See the [http://www.perforce.com/perforce/doc.052/manuals/cmdref/integrated.html#1040665 p4 integrated] documentation for more info on the Perforce integration model.
"	lewisbaker@…
4048	Diff between repositories	version control	devel	next-major-releases	enhancement	normal		new	2006-11-01T21:21:39+01:00	2017-07-11T12:46:51+02:00	"Trac allows to see the files of the project (in any Versioning system) but it were nice if trac allows to:
 1. commit on-line files and directories, 
 2. comment the files, directories and changes of these, 
 3. see diffs between two repositories, etc.

Probably it's a long term enhancement (version 0.20...)

Thank you very much"	anonymous
4612	Changeset URL to contain the revision in the query string.	version control	0.10.3	next-major-releases	enhancement	normal		new	2007-01-28T21:00:56+01:00	2016-01-18T23:36:05+01:00	"I’m using bzr as version control backend provided by the trac+bzr plugin. Since each branch has its own revision numbers, the revisions as seen by trac have the format:

{{{
path/to/branch,revno
}}}

!ChangesetModule.match_request will match 'path' to the revision and 'to/branch,revno' as the path. trac+bzr works around this problem by URL escaping the revision string but the result is highly unreadable and not at all user-friendly.

Attached is a very simple patch I’m using to make trac gracefully handle the above scenario. I have added a configuration switch for the new format because I expect some people would like to keep the old URLs valid. 

The solution is simply to change the changeset URLs from:

{{{
/changeset/revision/path
}}}

to:

{{{
/changeset/path?new=revision
}}}

The latter is also totally consistent with URLs of log and browser:

{{{
/log/path?rev=old_rev&stop_rev=new_rev
/browser/path?rev=revision
}}}

The patch also allows a new changeset notation:

{{{
changeset:path@revision
}}}

Clearly the {{{changeset:revision/path}}} notation cannot be used when revision can contain a slash.
"	Peter Dimov <peter.dimov@…>
9979	[PATCH] Single changeset resync fails if changesets are missing	version control	0.12-stable	next-major-releases	defect	normal		new	2011-01-15T00:28:50+01:00	2011-01-18T17:04:55+01:00	"When running {{{repository resync repo rev}}} the operation fails if the revision you are trying to resync is missing from the revisions table.  Attached patch ""fixes"" that, maybe not in the most elegant or correct way.  Improvements welcome. "	barry@…
10162	Add a REPOS kind of Node	version control	0.12.1	next-major-releases	defect	normal		new	2011-05-03T00:34:39+02:00	2020-04-01T17:09:59+02:00	"How to Reproduce

While doing a GET operation on `/changeset/26e036576133f07b15eeb4363bf993b67bf9eacb/tp`, Trac issued an internal error. 

This only happens for a changeset that only updates git submodules, for which ""get_content_length"" returns None (because there is no associated git blob).

(The Python error is ""unsupported operand type(s) for +"")

This is similar to the old ticket #3287 here.


Request parameters:
{{{
{ new : u 26e036576133f07b15eeb4363bf993b67bf9eacb ,  new_path : u /tp }
}}}
User agent: `Mozilla/5.0  X11; U; Linux x86_64; en-US; rv:1.9.2.17  Gecko/20110428 Fedora/3.6.17-1.fc14 Firefox/3.6.17`

System Information
||    `Trac`    || `0.12.1` ||
||    `Docutils`    || `0.7` ||
||    `Genshi`    || `0.6` ||
||    `GIT`    || `1.7.3.4` ||
||    `psycopg2`    || `2.2.2` ||
||    `Pygments`    || `1.3.1` ||
||    `Python`    || `2.6.6  r266:84292, Mar 6 2011, 17:53:48  `   br   ` GCC 4.3.4 ` ||
||    `pytz`    || `2010o` ||
||    `setuptools`    || `0.6` ||
||    `Subversion`    || `1.6.16  r1073529 ` ||
||    `jQuery`    || `1.4.2` ||

Enabled Plugins
||    `BatchModify`    || `0.8.0-trac0.12` ||
||    `FilteredTicketQuery`    || `N/A` ||
||    `timingandestimationplugin`    || `1.0.6` ||
||    `TracGit`    || `0.12.0.6dev` ||

Python Traceback
{{{
Traceback  most recent call last :
File  /usr/lib64/python2.6/site-packages/trac/web/main.py , line 511, in _dispatch_request
dispatcher.dispatch req
File  /usr/lib64/python2.6/site-packages/trac/web/main.py , line 237, in dispatch
resp   chosen_handler.process_request req
File  /usr/lib64/python2.6/site-packages/trac/versioncontrol/web_ui/changeset.py , line 352, in process_request
self._render_html req, repos, chgset, restricted, xhr, data
File  /usr/lib64/python2.6/site-packages/trac/versioncontrol/web_ui/changeset.py , line 586, in _render_html
diff_bytes   _estimate_changes old_node, new_node
File  /usr/lib64/python2.6/site-packages/trac/versioncontrol/web_ui/changeset.py , line 537, in _estimate_changes
return old_size new_size
TypeError: unsupported operand type s  for :  NoneType  and  NoneType
}}}"	dmarti
10733	Renamed files and prev/next links don't work well	version control		next-major-releases	defect	normal		new	2012-06-20T21:37:43+02:00	2012-06-23T12:46:52+02:00	"source:trunk/trac/versioncontrol/web_ui/browser.py@10924#L427 creates links for the previous, next and latest revision of a given file. This does not take name changes into account: the link will always be for the created_path member value, which is described in #3340. But in the presence of a rename, both the preceding and the next revision of a file might be in a different location.

So Repository.previous_rev and next_rev should probably be allowed to not only return a revision but a new path as well. Perhaps you could allow them to return a tuple, either checking the actually returned value using isinstance or breaking backwards compatibility. Or you could introduce a new method. Up to you.
Current api at source:trunk/trac/versioncontrol/api.py@11059#L873
Perhaps this would help getting rid of created_path altogether, as it would now be up to the repository backend to decide what path to return."	Martin.vGagern@…
10905	Enabled CommitTicketUpdater only for some repositories	version control	0.12.3	next-major-releases	enhancement	normal		new	2012-10-15T14:49:47+02:00	2017-09-09T00:45:15+02:00	I am using CommitTicketUpdater on a Trac installation with multiple (git) repositories. The problem I am having is that for some of those repositories we are using GitHub for ticketing. And because CommitTicketUpdater listens to all comments, when somebody reference ticket with GitHub ticket number, a wrong reference is made in Trac. Would it be possible to enable CommitTicketUpdater only for some repositories?	Mitar
12442	Support per-repository authz_file	version control		next-major-releases	enhancement	normal		new	2016-04-04T21:43:39+02:00	2019-09-22T01:31:38+02:00	"Discussed in comment:5:ticket:11703 and gmessage:trac-users:sI9q_1OF24s/QpeUkYrWCgAJ, since Subversion 1.7 a per-repository `authz_file` is supported. We should continue to support a single `authz_file`, but also add support for the per-repository `authz_file`. References:
* [https://subversion.apache.org/docs/release-notes/1.7.html#per-repos-authz 1.7 Release notes]
* [http://svnbook.red-bean.com/nightly/en/svn.serverconfig.pathbasedauthz.html Getting started with path-based access control]
* [http://svnbook.red-bean.com/nightly/en/svn.serverconfig.httpd.html#svn.serverconfig.httpd.authz.perdir Configuring per-directory access control]"	Ryan J Ollos
12549	Provide option for blame to use merged history	version control		next-major-releases	enhancement	normal		new	2016-07-28T21:31:40+02:00	2016-08-09T19:52:01+02:00	"`svn blame` has the `-g` option:
{{{
  -g [--use-merge-history] : use/display additional information from merge
                             history
}}}

This can be useful for finding the changeset in which a line was changed, which is often more useful than the line in which the change was merged.

For example, line 47 of [/browser/trunk/trac/core.py?rev=14978&annotate=blame] shows [13672], however that's a merge changeset and [13671] may be more interesting.

`svn blame -g trac/core.py` on the trunk yields:

{{{
G  13671    rjollos         super(TracError, self).__init__(message)
}}}

while `svn blame trac/core.py` yields:

{{{
 13672    rjollos         super(TracError, self).__init__(message)
}}}

It looks like we could use `blame4` or `blame5` of `svn.client`, rather than [browser:trunk/tracopt/versioncontrol/svn/svn_fs.py@15012:865-866#L846 blame2]:
{{{
    svn_client_blame4(*args)
        svn_client_blame4(char const * path_or_url, svn_opt_revision_t peg_revision, svn_opt_revision_t start, 
            svn_opt_revision_t end, svn_diff_file_options_t const * diff_options, svn_boolean_t ignore_mime_type, 
            svn_boolean_t include_merged_revisions, svn_client_blame_receiver2_t receiver, 
            void * receiver_baton, svn_client_ctx_t ctx, 
            apr_pool_t pool) -> svn_error_t
    
    svn_client_blame5(*args)
        svn_client_blame5(char const * path_or_url, svn_opt_revision_t peg_revision, svn_opt_revision_t start, 
            svn_opt_revision_t end, svn_diff_file_options_t const * diff_options, svn_boolean_t ignore_mime_type, 
            svn_boolean_t include_merged_revisions, svn_client_blame_receiver3_t receiver, 
            void * receiver_baton, svn_client_ctx_t ctx, 
            apr_pool_t pool) -> svn_error_t
}}}

Btw, I wonder if it would be useful to have a `blame` TracLink, or extend the `browser` TracLink to allow blame to be specified."	Ryan J Ollos
12687	Provide additional hints when trac-admin repository commands are not provided a valid repository name	version control		next-major-releases	defect	normal		new	2017-02-12T08:44:19+01:00	2017-02-12T08:44:19+01:00	"From reports on the MailingList and personal experience, it seems users mistakenly input ""repository <path>"" rather than ""repository <name>"" for the trac-admin repository commands:

{{{#!sh
$trac-admin tracenvs/proj-1.3 help repository
repository add <repos> <dir> [type]

    Add a source repository

repository alias <name> <target>

    Create an alias for a repository

repository list 

    List source repositories

repository remove <repos>

    Remove a source repository

repository resync <repos> [rev]

    Re-synchronize trac with repositories

repository set <repos> <key> <value>

    Set an attribute of a repository

repository sync <repos> [rev]

    Resume synchronization of repositories
}}}

We could provide additional hints, like the following:
{{{#!sh
$trac-admin tracenvs/proj-1.3 repository sync ""notfound"" 10
TracError: Repository ""notfound"" doesn't exist.

Use 'repository list' to view the valid repository names.
}}}

{{{#!diff
diff --git a/trac/versioncontrol/admin.py b/trac/versioncontrol/admin.py
index 86294ac4f..0acd0e99a 100644
--- a/trac/versioncontrol/admin.py
+++ b/trac/versioncontrol/admin.py
@@ -128,7 +128,9 @@ class VersionControlAdmin(Component):
                 reponame = ''
             repos = rm.get_repository(reponame)
             if repos is None:
-                raise TracError(_(""Repository \""%(repo)s\"" doesn't exist"",
+                raise TracError(_(""Repository \""%(repo)s\"" doesn't exist.\n""
+                                  ""\nUse 'repository list' to view the ""
+                                  ""valid repository names."",
                                   repo=reponame or '(default)'))
             if rev is not None:
                 repos.sync_changeset(rev)
}}}

Similar changes would need to be made for the other `trac-admin repository` commands. Alternatively we could list the repository names when the error occurs."	Ryan J Ollos
10763	fix changeset search results	version control	1.0dev	next-stable-1.6.x	defect	minor		new	2012-07-12T15:09:25+02:00	2023-09-23T22:33:10+02:00	"I just noticed the following glitch: 
 - the changeset results displayed show something like `[134]: blah`, without any hint about the repository; this should rather be `[134/reponame]` or `[134] in repo1, repo2`, the same kind of consolidation that we (should) get in the timeline 

(should, as that's also broken)"	Christian Boos
11205	"""repository sync"" fails for Subversion repository with unicode path"	version control	1.0-stable	next-stable-1.6.x	defect	minor		new	2013-06-15T16:03:47+02:00	2023-09-23T22:33:10+02:00	"In Linux, ""repository sync"" command fails for Subversion repository with unicode path.

{{{
$ svnadmin create /tmp/svn-tété
$ ~/venv/trac/1.0.1/bin/trac-admin /tmp/trac-1.0 initenv title sqlite:db/trac.db >/dev/null
$ ~/venv/trac/1.0.1/bin/trac-admin /tmp/trac-1.0 config set components 'tracopt.versioncontrol.*' enabled
$ ~/venv/trac/1.0.1/bin/trac-admin /tmp/trac-1.0
Welcome to trac-admin 1.0.1
Interactive Trac administration console.
Copyright (C) 2003-2013 Edgewall Software

Type:  '?' or 'help' for help on commands.

Trac [/tmp/trac-1.0]> repository add blah /tmp/svn-tété svn
Trac [/tmp/trac-1.0]> repository list

Name  Type  Alias  Directory
--------------------------------
blah  svn          /tmp/svn-tété

Trac [/tmp/trac-1.0]> repository sync blah
TracError: /tmp/svn-tété does not appear to be a Subversion repository.
}}}

The apr library on Linux, it needs to initialize with `setlocale()` for the encoding of file system. If no `setlocale()`, uses `C` locale and 8-bits bytes for the paths.

{{{#!diff
diff --git a/trac/admin/console.py b/trac/admin/console.py
index 74c2388..3091255 100755
--- a/trac/admin/console.py
+++ b/trac/admin/console.py
@@ -596,4 +596,5 @@ def run(args=None):

 if __name__ == '__main__':
     pkg_resources.require('Trac==%s' % VERSION)
+    locale.setlocale(locale.LC_ALL, '')
     sys.exit(run())
}}}

After the patch, the command correctly works.
{{{
$ PYTHONPATH=$PWD ~/venv/py25/bin/python trac/admin/console.py /tmp/trac-1.0
Welcome to trac-admin 1.0.2dev
Interactive Trac administration console.
Copyright (C) 2003-2013 Edgewall Software

Type:  '?' or 'help' for help on commands.

Trac [/tmp/trac-1.0]> repository sync blah
Resyncing repository history for blah...
0 revisions cached.
Done.
}}}"	Jun Omae
8700	patch for trac-svn-post-commit-hook.cmd	version control	devel	next-stable-1.6.x	defect	normal		new	2009-09-29T14:53:32+02:00	2023-09-23T22:33:10+02:00	"With last Multirepos branch, you need to specify just the repository's name instead full repository path; otherwise trac-admin will not resync.

The patch in attach correct this problem and clarifies the usage of batch files.

The batch file is tested on Win Xp.

Thanks you.
Federico [at] Briata [dot] Org"	federico.briata@…
10847	contrib/trac-svn-hook to support TRAC_PARENT_ENV	version control	1.0-stable	next-stable-1.6.x	enhancement	normal		new	2012-09-11T07:57:40+02:00	2023-09-23T22:33:10+02:00	this patch adds `TRAC_PARENT_ENV` support to browser:trunk/contrib/trac-svn-hook	Elan Ruusamäe <glen@…>
10884	trac-admin repository resync fails with TypeError : int argument required	version control	0.12.4	next-stable-1.6.x	defect	normal		new	2012-10-04T13:56:27+02:00	2023-09-23T22:33:10+02:00	"If for any reason a post-commit hook fails to signal a changeset (rev) has been added in the repository, then the following trac-admin command should re-synchronize it:

trac-admin /path/to/projenv repository resync """" rev

but it fails with the following error:

TypeError: int argument required 

'''How To Reproduce''': make the hook not operational, eg comment out the line in the hook script calling trac-admin. Then create a new changeset in the repository, TRAC should not trace this new revision in the timeline (normal). Then try to resynchronize it with the trac-admin resync command.

'''System Information''':

CentOS Linux 5.8
Trac 	0.12.4
CustomFieldAdmin 	0.2.2
FullBlog 	0.1.1
Genshi 	0.6 (without speedups)
mod_python 	3.2.8
Pygments 	0.9
pysqlite 	2.6.0
Python 	2.4.3 (#1, Jun 18 2012, 08:55:31) [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)]
setuptools 	0.6c11
SQLite 	3.3.6
Subversion 	1.7.6 (r1370777)
jQuery:	1.4.4

By applying the given patch, the resync command is working again."	michel.guillot@…
12742	"Invalid log link does not render with ""missing"" class"	version control		next-stable-1.6.x	defect	normal		new	2017-03-23T01:31:40+01:00	2023-09-23T22:33:10+02:00	"Example:
* log:/a/non-existent/file

Non-existent revision range does not render with missing class:
* r1:10000000
* r1000000:1000001

Minor issue: some missing TracLinks have a ""missing"" title, others do not:
* comment:10000:ticket:1 => //ticket comment does not exist//
* ticket:1000000 => no title attribute"	Ryan J Ollos
12844	Log TracLinks don't work as documented	version control		next-stable-1.6.x	defect	normal		new	2017-06-16T17:03:34+02:00	2023-09-23T22:33:10+02:00	"The documentation (TracLinks#Multi-repositorylinks) and [browser:/branches/1.2-stable/trac/versioncontrol/web_ui/tests/wikisyntax.py@14877:309#L307 wikisyntax.py] tests imply the following should work:

log:rjollos.git/1.0-stable

Before I edited (TracLinks@102#Multi-repositorylinks), the documentation seemed to imply that an explicit `branches` should be included, but that doesn't work either:

log:rjollos.git/branches/1.0-stable

The repository-relative path works for an svn repository:

log:svn/branches/1.0-stable

The following works for a Git repository:

log:rjollos.git:1.0-stable

Is this a defect, or do we just need to update the docs?"	Ryan J Ollos
12922	AuthzSourcePolicy doesn't deny viewing changeset on restricted path	version control		next-stable-1.6.x	defect	normal		new	2017-09-24T07:36:34+02:00	2023-09-23T22:33:10+02:00	"There seems to be an inconsistency in `AuthzSourcePolicy` permission checking for files and changesets. For files, a `True` or `False` decision is made based on the authz configuration: [browser:tags/trac-1.2.2/trac/versioncontrol/svn_authz.py@:219#L181]. However, for changesets the decision will be `True` or `None`: [browser:tags/trac-1.2.2/trac/versioncontrol/svn_authz.py@:223-225#L181]. When the decision is `None`, other policies are consulted.

Simple example:
{{{#!ini
[/dir1]
user1 = r
[/dir2]
user2 = r
}}}

Consider a change to `/dir1/file1`, where no users have coarse-grained `FILE_VIEW` and `CHANGESET_VIEW`. `user1` can view the file and changeset and `user2` cannot. Now grant `FILE_VIEW` and `CHANGESET_VIEW` to `authenticated`. The behavior is the same for `user1`. However, `user2` can view the changeset but cannot view the file.

View of `user1`:

[[Image(Screen Shot 2017-09-23 at 22.35.26.png,border=2)]]

View of `user2`:

[[Image(Screen Shot 2017-09-23 at 22.36.15.png,border=2)]]

The issue may have been introduced in r10007."	Ryan J Ollos
1381	view files by date as well as revision number	version control	devel	unscheduled	enhancement	minor		new	2005-03-31T00:20:25+02:00	2015-05-26T20:55:39+02:00	"I had just assumed that because svn supported this, it was on the todo list, but according to those on #trac, it's not.

Anyway, trac has the nice ""view revision #"" field, but nothing for ""view as it was on date X"", which is a much more human-usable feature."	xris@…
2566	Trac browser should browse SVN symbolic links	version control	0.9.2	unscheduled	defect	minor		new	2006-01-09T06:32:11+01:00	2010-07-01T12:18:29+02:00	"Here is a patch to add browsing of symbolic links. It has the following behaviour:

  * Links outside the repository are normalised to /, but display the full link path.
  * Links to non-existent objects will display the default file."	Alec Thomas <alec@…>
4746	intertrac links support in trac-post-commit hook	version control		unscheduled	enhancement	normal		new	2007-02-15T13:58:43+01:00	2015-05-26T20:55:39+02:00	"Hello,

It would be very nice to support intertrac links within the trac-post-commit hook. If the XMLRPC plugin is installed in the remote trac, tickets should be remotely updateable."	philn
6599	redirect in trac browser after file got moved in svn	version control		unscheduled	enhancement	normal		new	2008-01-07T13:53:52+01:00	2015-05-26T20:55:39+02:00	"it would be nice if trac would make a redirect after a file got moved in svn. in this case the ""source:"" links stay valid and could be adjusted afterwards.

a second possibility would be to have a function which adjusts the source wiki links to the new location.
"	ThurnerRupert
7263	/trunk/contrib/trac-pre-commit-hook not stringent enough in supported_cmds	version control	0.10.4	unscheduled	defect	normal		new	2008-05-23T02:44:21+02:00	2016-06-23T00:31:56+02:00	"There is a hole in the trac-pre-commit-hook which lets commands through and then they are not processed properly by trac-post-commit-hook.

For example:
""arefs #1234"" or ""ref #1234"" or ""refa #1234"" will all successfully get through the trac-pre-commit-hook.  When the trac-post-commit-hook runs it will now be able to identify these commands and link the svn commit to the trac ticket."	sbranden@…
9208	Support for SVN repository on a UNC path on Windows	version control	0.11	unscheduled	defect	normal		new	2010-04-08T17:29:55+02:00	2021-07-06T11:07:32+02:00	"While setting up a Trac installation a year ago, I ran into a problem where my SVN repository was stored on a UNC accessible path on a Windows-based Apache system. In other words, I was running Trac on Apache for Windows, with the python module for Apache. Our SVN repository was stored on a separate network drive and only accessible via a UNC path.

At the time I was using Trac 0.11.x (not sure of the revision, and I no longer operate that system).

The problem is due to SubversionRepository `__init__` not handling the UNC slashes properly. When the path is fixed by converting the '\'\' to '\' the UNC slashes were being transformed to just '\' instead of staying '\'\'. I corrected this by adding splitunc() call before the replace and only performing the replace on the non-UNC portion of the path.

I've attached a diff patch making the similar change to the latest version from the 0.12 trunk, as well as the original modified version from my 0.11 installation."	morphiend@…
10426	Refactor pre-commit-hook to handle post-commit-hook features	version control	0.12-stable	unscheduled	task	normal		new	2011-10-21T16:07:38+02:00	2012-01-19T19:56:01+01:00	"The current version of [source:/trunk/contrib/trac-pre-commit-hook@7440 contrib/trac-pre-commit-hook] doesn't use the same Trac component / code than [source:/trunk/tracopt/ticket/commit_updater.py@10617 tracopt/ticket/commit_updater.py] which is used for post-commit hooks.

It would be great to refactor the trac-pre-commit-hook in order to handle all the features of post-commit-hook (envelope, commands.close, commands.refs, etc...) defined on a Trac environment.

I've written a pre-commit-hook.py which copies the code of both python files in order to refactor it later."	Anthony O.
12461	Move svn_authz or rename to authz_policy	version control			enhancement	normal		new	2016-04-21T19:42:07+02:00	2016-04-21T19:42:07+02:00	"While `svn_fs` and `svn_prop` were moved to `tracopt.versioncontrol.svn`, `svn_authz` remains in `trac/versioncontrol`. I think the justification was that `svn_authz` can be used for fine-grained access control in the repository browser for any type of repository. Note however that `tracopt.perm.authz_policy` can also be used for this purpose. 

If the module is not svn-specific, we could consider renaming the modules to `authz_policy` and moving the options from the `[svn]` section to the `[repositories]` section. If the module should remain svn-specific, we should consider moving it to `tracopt.versioncontrol.svn`.

See also #12442.

I also plan to look at whether more code can be shared between `tracopt.perm.authz_policy` and `trac.versioncontrol.svn_authz`. I would like to add an `AuthzFile` class that can be used for reading and writing an `AuthzFile`, which I can use in th:TracSvnAuthzPlugin (which is important because it's a dependency of th:TracHacksPlugin, but much of the functionality of !TracSvnAuthzPlugin is currently broken)."	Ryan J Ollos
6904	Annotate Does not show full user name.	version control	0.11b1	next-major-releases	defect	minor		new	2008-02-29T12:46:50+01:00	2015-05-26T20:50:57+02:00	"When using annotate the user name is truncating after a space in the user name.

For Exmaple...

My NT User Name: = ''' DOMAIN\David Shaw ''' [[BR]]

Annotate tool tip: ''' DOMAIN\David: svn log text '''"	trac@…
6009	colons in revision identifiers	version control	devel	next-major-releases	enhancement	normal		new	2007-09-11T19:26:44+02:00	2015-05-26T20:50:57+02:00	"At least for, but not limited to `source:path@rev` links, it would be nice to have support for revision identifiers that contain a colon, as such identifiers are common for some non-svn version control systems, e.g. mercurial or monotone.

However, looking at [source:trunk/trac/versioncontrol/web_ui/browser.py@5877#L557 trac/versioncontrol/web_ui/browser.py], a colon separates the revision identifier from a line number mark (what is a ""line number mark""? - this is not covered by TracLinks).

Additionally, in revision log or diff links, a colon is used to separate the start and end revision identifier.

So, it seems a colon cannot be used literally in a revid. Would it be possible to get some support for escaping such special characters in revision identifiers?"	thomas.moschny@…
9129	TypeError: expecting datetime, int, long, float, or None; got <class 'genshi.template.eval.Undefined'>	version control	0.11.6	next-major-releases	defect	normal		new	2010-03-11T16:41:39+01:00	2016-04-08T21:18:01+02:00	"
==== How to Reproduce ====

While doing a GET operation on `/log/trunk`, Trac issued an internal error.

''(please provide additional details here)''


Request parameters:
{{{
{'action': u'stop_on_copy',
 'limit': u'100',
 'mode': u'stop_on_copy',
 'path': u'/trunk',
 'rev': u'100',
 'stop_rev': u''}
}}}


User Agent was: `Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8`

==== System Information ====

|| '''Trac''' || `0.11.6` ||
|| '''Python''' || `2.5.2 (r252:60911, Jan 20 2010, 21:48:48) ` [[br]] `[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)]` ||
|| '''setuptools''' || `0.6c11` ||
|| '''psycopg2''' || `2.0.13` ||
|| '''Genshi''' || `0.5.1` ||
|| '''Subversion''' || `1.4.6 (r28521)` ||
|| '''Docutils''' || `0.4.1` ||
|| '''jQuery:''' || `1.2.6` ||

==== Python Traceback ====
{{{
Traceback (most recent call last):
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/web/main.py"", line 450, in _dispatch_request
    dispatcher.dispatch(req)
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/web/main.py"", line 227, in dispatch
    data, content_type)
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/web/chrome.py"", line 773, in render_template
    stream.render(method, doctype=doctype, out=buffer)
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/core.py"", line 179, in render
    return encode(generator, method=method, encoding=encoding, out=out)
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/output.py"", line 61, in encode
    for chunk in iterator:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/output.py"", line 311, in __call__
    for kind, data, pos in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/output.py"", line 753, in __call__
    for kind, data, pos in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/output.py"", line 592, in __call__
    for kind, data, pos in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/output.py"", line 698, in __call__
    for kind, data, pos in chain(stream, [(None, None, None)]):
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/output.py"", line 532, in __call__
    for ev in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/core.py"", line 283, in _ensure
    for event in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/core.py"", line 283, in _ensure
    for event in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/web/chrome.py"", line 838, in _strip_accesskeys
    for kind, data, pos in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/core.py"", line 283, in _ensure
    for event in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/web/chrome.py"", line 827, in _generate
    for kind, data, pos in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py"", line 569, in _include
    for event in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/markup.py"", line 298, in _match
    ctxt, start=idx + 1, **vars):
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/markup.py"", line 298, in _match
    ctxt, start=idx + 1, **vars):
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/markup.py"", line 245, in _match
    for event in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py"", line 543, in _exec
    for event in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py"", line 533, in _eval
    for event in substream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py"", line 496, in _eval
    for kind, data, pos in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py"", line 551, in _flatten
    for event in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/core.py"", line 283, in _ensure
    for event in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/path.py"", line 141, in _generate
    subevent = stream.next()
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py"", line 569, in _include
    for event in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/markup.py"", line 234, in _strip
    event = stream.next()
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py"", line 543, in _exec
    for event in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py"", line 533, in _eval
    for event in substream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py"", line 496, in _eval
    for kind, data, pos in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py"", line 551, in _flatten
    for event in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/core.py"", line 283, in _ensure
    for event in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/path.py"", line 141, in _generate
    subevent = stream.next()
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py"", line 569, in _include
    for event in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/markup.py"", line 234, in _strip
    event = stream.next()
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py"", line 543, in _exec
    for event in stream:
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py"", line 520, in _eval
    result = _eval_expr(data, ctxt, **vars)
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/base.py"", line 286, in _eval_expr
    retval = expr.evaluate(ctxt)
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg/genshi/template/eval.py"", line 180, in evaluate
    return eval(self.code, _globals, {'__data__': data})
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/versioncontrol/templates/revisionlog.html"", line 148, in <Expression u'dateinfo(change.date)'>
    <td class=""date"" py:content=""dateinfo(change.date)"" />
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/timeline/web_ui.py"", line 236, in dateinfo
    pretty_timedelta(date),
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/util/datefmt.py"", line 73, in pretty_timedelta
    time1 = to_datetime(time1)
  File ""/home/trac-migration/.local/lib/python2.5/site-packages/Trac-0.11.6-py2.5.egg/trac/util/datefmt.py"", line 53, in to_datetime
    type(t))
TypeError: expecting datetime, int, long, float, or None; got <class 'genshi.template.eval.Undefined'>

}}}
    "	exarkun
7744	source:path@rev targeting a file below a copied dir may fail	version control/browser	0.11-stable	next-major-releases	defect	minor		new	2008-10-22T16:12:55+02:00	2020-09-23T06:08:21+02:00	"... when the file has not been modified since the copy and `rev` predates the copy operation itself.

e.g. source:/branches/0.11-stable/contrib/bugzilla2trac.py@6820#L824
leads to:
{{{
No node /branches/0.11-stable/contrib/bugzilla2trac.py at revision 6820
}}}
Looking at source:/branches/0.11-stable/contrib/bugzilla2trac.py (without revision spec) works, and indeed shows a revision of r6820 for this file.

This is happening because at r6820, there was no branches/0.11-stable. This behavior is actually ""correct"" if ...@6820 is supposed to be a peg revision in Subversion terminology, but it's annoying nonetheless, as the TracLinks syntax doesn't allow an alternative way of specifying the revision(*) and anyway I don't think it's a good idea to expose the peg revision vs. operative revision subtleties in Trac (http://svnbook.red-bean.com/en/1.5/svn.advanced.pegrevs.html).

(*) well it does, but source:/branches/0.11-stable/contrib/bugzilla2trac.py?rev=6820 has the same problem"	Christian Boos
3098	"Support ""Descript.ion"" files in Browse Source"	version control/browser	0.9.5	next-major-releases	enhancement	normal		new	2006-05-01T18:46:20+02:00	2019-09-06T19:51:32+02:00	"As the summary says...

Right now we hand edit a Wiki page describing each subdir and file.

The `descript.ion` metadata file is a [http://jpsoft.com/ascii/descfile.txt quasi-standard] by JP-Soft (4DOS) that Browser might be able to support showing a short description of each file.
"	trac@…
7687	"Add support for svn:externals ""1.5"" style"	version control/browser	0.11.1	next-stable-1.6.x	defect	normal		new	2008-10-01T18:15:55+02:00	2023-09-23T22:33:10+02:00	"For now, Trac only supports the old-style syntax.

Subversion 1.5 URLs have the following special prefixes:

 ../ :: Relative to the URL of the directory on which the svn:externals property is set
 !^/ :: Relative to the root of the repository in which the svn:externals property is versioned
 // :: Relative to the scheme of the URL of the directory on which the svn:externals property is set
 / :: Relative to the root URL of the server on which the svn:externals property is versioned

Also, there's a new convention for svn:externals, instead of:
{{{
RELPATH [-r<rev>] URL
}}}
the mapping can now be written:
{{{
[-r<rev>] URL RELPATH
}}}

(taken from [http://svnbook.red-bean.com/en/1.5/svn.advanced.externals.html])"	Emmanuel Blot
10136	Way to configure by default displayed branch	version control/browser	0.12.2	1.7.1	enhancement	normal		new	2011-04-18T02:19:33+02:00	2022-06-14T01:15:13+02:00	"For (at least Mercurial) it would be great to be able to configure which branch should be displayed as default in source code browser. Currently tip is displayed, but sometimes it is useful that default is some more ""stable"" branch."	Mitar
3584	[PATCH] Zip file names should match the latest version of their contents, not of the whole repository	version control/browser	devel	next-major-releases	enhancement	minor		new	2006-08-19T12:14:16+02:00	2015-05-26T20:50:57+02:00	"The original ticket appears as th:ticket:558.

I don't know which solution is the best to implement such a feature (renaming feature as Alec suggested, ...), but the current implemention is a real issue on multi-project host servers such as TracHacks.
"	Emmanuel Blot
3689	"patch for mimeviewer: autodetect charset by ""# -*- coding: windows-1251 -*-"""	version control/browser	0.10b1	next-major-releases	enhancement	minor		new	2006-09-09T07:54:32+02:00	2015-12-19T15:46:40+01:00	"***** api.py.bak2
{{{
#!python
                return utf
        return self.default_charset
}}}
***** api.py
{{{
#!python
                return utf
        m = re.search(r'-\*-\s+coding:\s*(\S+)\s+-\*-', content[:100])
        if m:
           return m.group(1)
        return self.default_charset
}}}
*****"	igor daniloff
6365	Show trac:summary (oneliner_properties) property at the directory level	version control/browser	devel	next-major-releases	enhancement	minor		new	2007-11-16T23:40:34+01:00	2015-05-26T20:50:57+02:00	"If !trac:summary is set on `trunk/prop` I think it would be good to see it shown in the listing for `trunk`, e.g.:

{{{
Name   	               Size   	Rev  	 Age   	Last Change
addins                            7        3    Something
prop  Proposal files              9        2    Something else
zap.py                 11k        3       23    Imported
}}}

if for example !trac:summary was set to 'Proposal files' on prop.
"	TerryBrown
7044	RSS feed on Sourcechanges	version control/browser		next-major-releases	enhancement	minor		new	2008-03-25T19:51:30+01:00	2015-05-26T20:50:57+02:00	"In 'Browse Source' add RSS feed on changes for a specific directory.

This would be usefull for developers interested only in a part of the sourcecode changes.
If a directory has changes in sourcecode it should give a new RSS feed.

"	allarddijk@…
7929	make links clickable in annotate view	version control/browser	none	next-major-releases	enhancement	minor		new	2009-01-05T03:13:19+01:00	2009-02-24T15:52:53+01:00	"In the 'annotate' view, the first column contains for each source row a hyperlink to an associated changeset. The problem is that if javascript is enabled, the 'href' attribute gets removed, destroying the link. I would like to be able to open the linked page in a new browser tab. But that's currently not possible, because...

All mouse clicks are captured and used to trigger ajax-ish retrieval of the linked page and display it in an overlay, which finally contains a clickable link. Also, each associated row gets highlighted blue as a side effect, which is cpu-intensive. This makes it somewhat annoying.

A solution was proposed to me by 'coderanger_' on IRC.

  instead of removing the href, we should capture and reject clicks on the <a> (the click handler is on the table cell itself, not the <a>)

Hopefully the handler would only catch LMB clicks, leaving MMB ('open in new tab') or at least RMB ('context menu') functionality intact.
"	theultramage@…
2636	browsing a directory with many files takes a long time	version control/browser	0.9.3	next-major-releases	enhancement	normal		new	2006-01-19T13:05:15+01:00	2015-05-26T20:50:57+02:00	"when browsing a repository browser with a lot of files (tested with 3370) it takes a long time (minutes) before the files are shown in the browser.[[BR]]
'''enhancement:''' It would be better to limit the amount of files processed, as to process them in blocks (configurable, default 250?)

tested with gentoo-linux on a P4 2.4GHz 512MB RAM with apache and fastcgi (5 preforks) as interface to trac (0.9.3) (all processing power was available to trac at that moment)[[BR]]
client is windows xp with firefox 1.5.0.1

"	joramagten@…
2695	[PATCH] Pretty icons for various file types.	version control/browser	0.9.3	next-major-releases	enhancement	normal		new	2006-01-31T06:37:51+01:00	2015-12-19T15:46:12+01:00	"I'd like to propose using different icons for various file-types in the browser view.

The Silk icon set at http://www.famfamfam.com/lab/icons/silk/ is ""licensed under a [http://creativecommons.org/licenses/by/2.5/ Creative Commons Attribution 2.5 License] and contains good icons for a number of file-types, including:
 * http://www.famfamfam.com/lab/icons/silk/icons/folder.png a folder icon
 * http://www.famfamfam.com/lab/icons/silk/icons/folder_delete.png folder ""deny""
 * http://www.famfamfam.com/lab/icons/silk/icons/page_white.png a default file icon
 * http://www.famfamfam.com/lab/icons/silk/icons/page_white_delete.png file ""deny""
 * http://www.famfamfam.com/lab/icons/silk/icons/page_white_acrobat.png Acrobat/PDF
 * http://www.famfamfam.com/lab/icons/silk/icons/page_white_actionscript.png Action Script
 * http://www.famfamfam.com/lab/icons/silk/icons/page_white_c.png C
 * http://www.famfamfam.com/lab/icons/silk/icons/page_white_cplusplus.png C++
 * http://www.famfamfam.com/lab/icons/silk/icons/page_white_csharp.png C#
 * http://www.famfamfam.com/lab/icons/silk/icons/page_white_code.png Code/Markup
 * http://www.famfamfam.com/lab/icons/silk/icons/page_white_coldfusion.png Cold Fusion
 * http://www.famfamfam.com/lab/icons/silk/icons/page_white_excel.png Excel
 * http://www.famfamfam.com/lab/icons/silk/icons/page_white_flash.png Flash
 * http://www.famfamfam.com/lab/icons/silk/icons/page_white_gear.png Settings/Config (gear)
 * http://www.famfamfam.com/lab/icons/silk/icons/page_white_h.png .h
 * http://www.famfamfam.com/lab/icons/silk/icons/page_white_paint.png Paint
 * http://www.famfamfam.com/lab/icons/silk/icons/page_white_php.png PHP
 * http://www.famfamfam.com/lab/icons/silk/icons/page_white_ruby.png Ruby
 * http://www.famfamfam.com/lab/icons/silk/icons/page_white_visualstudio.png Visual Studio
 * http://www.famfamfam.com/lab/icons/silk/icons/page_white_word.png Word
 * http://www.famfamfam.com/lab/icons/silk/icons/page_white_world.png World/Globe
 * ...and others.

Even if no one likes my idea for the different file types, the basic folder, file, and deny icons could be used.

I've started hacking this together in my own Trac install, but I'm not a python developer, so I'm not sure if it's worth anything to anyone else.  I'll be posting a first-attempt patch in just a moment."	Curtis Buys <trac@…>
3906	Request for a files search (no indexing just plain find like search)	version control/browser	0.10	next-major-releases	enhancement	normal		new	2006-10-11T03:15:59+02:00	2018-07-08T12:48:00+02:00	"I would like a /usr/bin/find like file search to look for a specific filename in the repository recursively (ie, some*.pdf)

I've seen the RepoSearch hack but I would like a simple file search (perhaps in Browse source or in Search directly with a files checkbox) that would let me search for a file or files in particular strictly based on the files in the repository.

This is a simple feature, I'm surprised it hasn't been implemented yet ;)

perhaps a simple hack would be in order..."	sineer@…
4590	There is no interface for providing conversion over files or changeset like in wiki IContentConverter	version control/browser		next-major-releases	enhancement	normal		new	2007-01-25T10:59:28+01:00	2015-05-26T20:50:57+02:00	It will be useful. But now i should modify Trac sources.	mou@…
4788	show symlink info in source browser	version control/browser	devel	next-major-releases	enhancement	normal		new	2007-02-19T17:17:07+01:00	2015-05-26T20:50:57+02:00	"Currently the source browser doesn't seem to display if a given file in the svn repository is a symlink.

In the browser of the directory containing a symlink, it could be something like
{{{
(&rarr; target)
}}}
right after the name of the file.
And in the browser of the symlink itself it could be an extra line like
{{{
Symbolic linc to target
}}}
where ""target"" would be a link to the appropriate file (if the target is also in the repository)"	Sergei Haller <sergei@…>
5177	norobots option for: raw source code, rss, old source code	version control/browser	0.10.3	next-major-releases	enhancement	normal		new	2007-04-19T11:24:50+02:00	2015-05-26T20:50:57+02:00	"it would be beneficial if there would be an option to prevent search engines from spidering:
 * rss
 * raw contents if the contents is  displayed beautifully rendered in trac
 * old versions out of svn
via e.g. norobots or similar.
"	ThurnerRupert
5246	[PATCH] Use permission system to store groups for authz access control	version control/browser	0.10-stable	next-major-releases	enhancement	normal		new	2007-05-02T00:11:50+02:00	2015-12-19T15:48:35+01:00	"We're currently using LDAP to store our users and groups. Our problem with using Subversion-style authz files for restricting access in Trac is that we'd have to define group memberships again in the authz file itself - thus we'd have to manage group memberships twice: Once in LDAP, once in the authz file (we're currently NOT using an authz file for Subversion itself for exactly this reason - we're doing it the ""hard way"" via Apache configuration instead). Basically, this issue is #4224 the other way 'round.

In this context, it would be great if the authz module could simply use the built-in permission system of Trac to retrieve the groups a user belongs to - and not the authz file.

I've written a patch that adds a configuration option authz_use_perm_groups that's false by default, resulting in the current behaviour. If set to true, Trac will not care about the groups section of the authz file and use the PermissionSystem to retrieve the group names instead (currently by fetching all lower-case permissions for the current user and stripping an eventual @ in front of the group name). I don't know much about the internal design of Trac so my code is probably quite ugly - but at least it works. Feel free to find a nicer solution. :-)

Please note that this patch would interfere with #4997 since Subversion itself does not implement any of this."	christian.seiler@…
5390	Zip Archive: aliases, symlinks	version control/browser	0.10.3	next-major-releases	defect	normal	Jun Omae	assigned	2007-05-30T04:13:24+02:00	2022-05-19T14:00:43+02:00	"Downloading source from the Trac Browsers ""Zip Archive"" generates Mac aliases or symlinks as files instead of links."	anonymous
7867	h,l keyboard shortcuts	version control/browser	none	next-major-releases	enhancement	normal		new	2008-12-05T14:41:51+01:00	2015-03-02T22:27:22+01:00	"A request to add h and l to move up and down (or better say left and right) the directory tree structure expanding/collapsing leaves as needed.

There is also a bug in j,k shortcuts that they stop work after <Tab> is pressed."	techtonik <techtonik@…>
9646	[PATCH] Highlight selected line when #L123 is used in source browser	version control/browser	0.13dev	next-major-releases	enhancement	normal		new	2010-09-26T18:51:40+02:00	2015-12-19T16:40:59+01:00	When viewing a file via the source browser and #L<line number> is used, it would be nice if it'll visually show the line that was passed, especially when its near the end so its not scrolled down right to that line. Also, when it does and scroll the page up and down, its nice to still see the original line you were linked to.	shesek
9655	Source code navigation in browser	version control/browser		next-major-releases	enhancement	normal		new	2010-09-30T23:09:34+02:00	2015-05-26T20:50:57+02:00	"It would be very cool if when viewing source code in Trac source browser, it will render the language elements (e.g. functions, methods, classes, module imports / includes) as links to where they are defined (like most IDEs).

The lacking of this is the only reason that my team uses !SlickEdit for code-reviews, and not Trac browser. (well, this and the ability to annotate the reviewed code with comments, but that's another enhancement request).

Now, I assume this is a heavy feature (language awareness?!), but thought I'd raise it anyway. Maybe it can be done partially using other libraries (I guess Pygments is doing something similar, syntax-analysis or something of that sort)."	Itamar Ostricher
10059	prop.rendered not properly set in browser.html	version control/browser	0.12.2	next-major-releases	defect	normal		new	2011-03-02T18:04:35+01:00	2012-01-19T19:40:14+01:00	"Hi,

despite having the wiki_properties set to a property that is rendered correctly as wiki syntax, the prop.rendered in browser.html is not set. This causes everything to be displayed not in the py:when case of a span and a div."	anonymous
10183	How to browser sources which folders have been changed and/or removed?	version control/browser	0.12.2	next-major-releases	defect	normal		new	2011-05-16T12:36:21+02:00	2015-05-26T20:50:57+02:00	"When I try to browser sources which folders have been changed and/or removed, there is an error message:

No node ""/path/to/oldfile"" at revision ""head revision number"".

Could I browser these kind of sources through Trac browser?

Thank you!"	zheng.bangyou@…
10455	A repository hides a directory which has the same name in default repository	version control/browser	0.12-stable	next-major-releases	defect	normal		new	2011-11-09T18:43:13+01:00	2011-11-10T10:13:26+01:00	"=== Reproduce
 1. Create a repository with `trac/versioncontrol/tests/svnrepos.dump` and adds as default repository. The root directory has `trunk`, `branches`, `tags` directories in the repository.
 2. Create another repository and add it with repository name being `tags`.
 3. Launch tracd and view `/browser` page.
 4. Expand `tags` directory in default repository. It will show second repository instead of `tags` in default repository."	Jun Omae
11353	Hierarchical tree of repositories	version control/browser	1.0.1	next-major-releases	enhancement	normal		new	2013-11-05T06:49:28+01:00	2015-03-05T14:43:47+01:00	"For a big project it would be really nice to organize git repositories into the hierarchical tree. Like 

[[Image(http://dside.dyndns.org/projects/screenshots/trac-repotree-small.png)]]

I have hacked in a small patch for myself, but it will be really nice to have a proper implementation upstream.
http://dside.dyndns.org/projects/patches.dir/trac-ds-repotree.diff"	csa@…
11619	Option to show whitespace and tab characters in file and diff view	version control/browser		next-major-releases	enhancement	normal		new	2014-05-20T00:46:48+02:00	2016-03-23T15:15:20+01:00	"The TortoiseSVN diff view has the option to show whitespace and tab characters. It would be useful to have an option to do the same in the Trac file and diff views.

[[Image(TsvnDiffView.png)]]"	Ryan J Ollos
12121	Subversion copies could show peg revision in browser view	version control/browser		next-major-releases	defect	normal		new	2015-07-14T21:51:09+02:00	2015-08-06T04:24:45+02:00	"Here is an example from the browser view:
{{{#!html
<li>
          <div class=""cp""> </div>
            <a title=""Show entry in browser"" href=""/browser/psi/Projects/Presto/Software/tags/urs_1.02.06?rev=10791"">
              Projects/Presto/Software/tags/urs_1.02.06
            </a>
          <span class=""comment"">(copied)</span>
            <small><em>(copied from <a href=""/browser/psi/Projects/Presto/Software/branches/REL-1.xx-URS?rev=10603"" title=""Show original file (revision 10603)"">
                Projects/Presto/Software/branches/REL-1.xx-URS</a>)</em></small>
            </li>
}}}

The proposed change is to show the peg revision in the path:

{{{#!html
<li>
          <div class=""cp""> </div>
            <a title=""Show entry in browser"" href=""/browser/psi/Projects/Presto/Software/tags/urs_1.02.06?rev=10791"">
              Projects/Presto/Software/tags/urs_1.02.06
            </a>
          <span class=""comment"">(copied)</span>
            <small><em>(copied from <a href=""/browser/psi/Projects/Presto/Software/branches/REL-1.xx-URS?rev=10603"" title=""Show original file (revision 10603)"">
                Projects/Presto/Software/branches/REL-1.xx-URS@10603</a>)</em></small>
            </li>
}}}"	Ryan J Ollos
12679	"Add ""View blame prior to this change"" link to blame view"	version control/browser		next-major-releases	enhancement	normal		new	2017-02-07T19:52:48+01:00	2019-09-06T19:54:30+02:00	"Blame view ([source:trunk/Makefile?annotate=blame example]) seems to be missing this very useful feature available on github ([https://github.com/edgewall/trac/blame/trunk/Makefile example]).

On github each blame annotation line has a small icon with tooltip ""View blame prior to this change"" that links to the same blame page but at an older revision. This is allows quickly navigating through the history of the file.
"	anonymous
12746	Add keyboard shortcut for blame from file view	version control/browser		next-major-releases	enhancement	normal		new	2017-03-25T22:54:16+01:00	2017-03-28T06:21:58+02:00	"From the repository browser, the keyboard shortcut `a` leads to the annotation view. It would be nice to have the same from the file view.

Line highlighting and anchor should be preserved when navigating to the blame view using either the keyboard shortcut or the contextual navigation link."	Ryan J Ollos
8541	[patch] recursive auto-expansion of folders containing only one sub-directory	version control/browser	0.12dev	next-major-releases	enhancement	trivial		new	2009-08-02T15:32:30+02:00	2015-12-19T16:36:40+01:00	"... like Vista's explorer does, for example.

The Mercurial repository browser also does something similar, it shows all those nested directories on the same line.

It's quite handy for Java packages, where the actual files are often nested in a chain of single entry directories...

Attaching the patch here, in case other people find it useful.
"	Christian Boos
8639	"""View latest revision"" links to non-existent (404) page"	version control/browser	0.11.4	next-stable-1.6.x	defect	minor		new	2009-09-06T10:45:08+02:00	2023-09-23T22:33:10+02:00	"""View latest revision"" links to non-existent (404) page in repository browser for files which do not exist anymore in current/latest revision. This makes a lot of 404 errors when robots are crawling Trac and is otherwise not nice to have links to non-existent pages.

I would propose replacing this link with a static message ""Non-existent in latest revision""."	Mitar
5499	performance issues when viewing larger files	version control/browser	devel	next-stable-1.6.x	defect	normal		new	2007-06-12T16:19:53+02:00	2023-09-23T22:33:10+02:00	"There are numerous source code files in our project that are above the default limit (250kB).[[BR]]
When viewing these files, it takes a moment before they're generated and rendered by the browser. When using the 'annotate' option, this problem increases significantly. Here is a sample (server is a P733, using apache):

Original size: 200kB[[BR]]
Browser view: 800kB, generating time: 1 minute[[BR]]
Annotated view: 1500kB, generating time: 5 minutes[[BR]]

It gets far worse on files that are 400+kB (actually I don't even try that anymore).[[BR]]
Additionally, when viewing such an annotated page in Opera, the browser does 100% cpu load that doesn't stop until you close the page. Sometimes it also destabilizes the browser (needs restart).

Can anything be done in this regard?"	theultramage@…
9677	Expanding an alias repository sets the hash to the aliased repository	version control/browser	0.12-stable	next-stable-1.6.x	defect	normal		new	2010-10-08T13:54:22+02:00	2023-09-23T22:33:10+02:00	"When expanding a named repository alias in the repository index, the URL hash is set to the aliased repository instead of the alias. Therefore, when reloading a page with an expanded alias, the aliased repository is expanded instead.

This is due to [source:trunk/trac/htdocs/js/expand_dir.js@10012:78-80#L59 toggleDir()] using the anchor `href` to determine the path. For aliases, the `href` points to the aliased repository. We could instead reconstruct the path by using the anchor `text()` and walking up the table to find the containing directories."	Remy Blank
11046	Reloading a page in the source browser redirects to another file	version control/browser	1.0	next-stable-1.6.x	defect	normal		new	2013-02-03T16:18:37+01:00	2023-09-23T22:33:10+02:00	"It's hard to explain this one, so I'll jump directly to the steps to reproduce:
 1. Go to http://trac.edgewall.org/browser/trunk/trac
 2. Click a non-link area on the page
 3. Hover the ""admin"" directory
 4. Reload the page using the web browser's keyboard shortcut (ctrl-r or cmd-r)
 5. Browser navigates to http://trac.edgewall.org/browser/trunk/trac#admin

Keep hovering and reloading, it will navigate to files and folders.

Since this behavior is not documented (or is it?), and I find it annoying, I assume it's a bug.

My site is running v1.0, hence the report below. For some reason I can't find the version number of YOUR site."	noamtm@…
11445	Empty lines are invisible when hiding line column on browser view	version control/browser	1.0-stable	next-stable-1.6.x	defect	normal		new	2014-01-14T17:33:00+01:00	2023-09-23T22:33:10+02:00	"When hiding line column on browser view, empty lines would be invisible. Also, empty lines cannot be copied to clipboard if line column is hide. The text without empty lines would be copied.

[[Image(visible-line-column.png)]] [[Image(hidden-line-column.png)]]"	Jun Omae
11631	Exceptions in get_repository method of IRepositoryConnector should not disable repository browser	version control/browser		next-stable-1.6.x	enhancement	normal		new	2014-05-31T17:27:56+02:00	2023-09-23T22:33:10+02:00	The issue was raised in comment:7:ticket:11610. A `TypeError` raised in `MercurialConnector` disabled the repository browser. A proposed patch can be found in comment:8:ticket:11610.	Ryan J Ollos
10079	improper rendering of svn:externals when not configured	version control/browser		undecided	defect	normal		new	2011-03-11T17:12:59+01:00	2015-06-04T11:56:20+02:00	"Some people do not (or can not) configure all of their svn:external properties to really point to some http:// url. So when trac.ini has no svn:externals section the entry
{{{
foo svn://svnserver/path/to/whatever
}}}
will be just rendered as 
* foo
and nothing else. This is pretty annoying, and I have modified my trac to display in that case the complete line from the externals entry, so if you are intrested, here is my `_render_externals` function (modified against 0.12.2)

{{{#!diff
diff --git a/trac/versioncontrol/svn_prop.py b/trac/versioncontrol/svn_prop.py
index 8c77d0c..2b3e906 100644
--- a/trac/versioncontrol/svn_prop.py
+++ b/trac/versioncontrol/svn_prop.py
@@ -71,7 +71,7 @@ class SubversionPropertyRenderer(Component):
                 continue
             localpath, rev, url = elements[0], '', elements[-1]
             if localpath.startswith('#'):
-                externals.append((external, None, None, None, None))
+                externals.append((external, None, None, None, None, None))
                 continue
             if len(elements) == 3:
                 rev = elements[1]
@@ -94,11 +94,13 @@ class SubversionPropertyRenderer(Component):
                 if prefix:
                     remotepath = posixpath.join(*reversed(prefix))
                 externals.append((localpath, revstr, base_url, remotepath,
-                                  href % {'path': remotepath, 'rev': rev}))
+                                  href % {'path': remotepath, 'rev': rev},
+                                  external))
             else:
-                externals.append((localpath, revstr, url, None, None))
+                externals.append((localpath, revstr, url, None, None,
+                                  external))
         externals_data = []
-        for localpath, rev, url, remotepath, href in externals:
+        for localpath, rev, url, remotepath, href, external in externals:
             label = localpath
             if url is None:
                 title = ''
@@ -108,6 +110,7 @@ class SubversionPropertyRenderer(Component):
                 label += rev + url
                 title = ''.join((remotepath, rev, url))
             else:
+                label = external
                 title = _('No svn:externals configured in trac.ini')
             externals_data.append((label, href, title))
         return tag.ul([tag.li(tag.a(label, href=href, title=title))

}}}"	anonymous
1947	Nicer handling of bugtraq properties	version control/browser	devel	unscheduled	enhancement	minor		new	2005-08-20T19:46:17+02:00	2015-05-26T20:55:39+02:00	"It would appear that Trac partially supports Subversion bugtraq properties, useful for linking changesets back to the issue tracking url. However, when you add these properties, the output looks like this: [[BR]]
[[BR]]
Added Subversion bugtraq properties to repository. bugtraq:message ""#1""[[BR]]
[[BR]]
While the #1 is correctly linked back to the issue, it's because Trac is using the built-in regex to link back. If the full bugtraq properties were read correctly, the Subversion repository would provide this information.[[BR]]
[[BR]]
try setting the following properties on a Subversion repository (be sure to do this recursively):[[BR]]
[[BR]]
bugtraq:label # [[BR]]
bugtraq:url http://localhost/cgi-bin/trac.cgi/ticket/%BUGID% [[BR]]
bugtraq:message ""#%BUGID%"" [[BR]]
bugtraq:number true [[BR]]
bugtraq:warnifnoissue false[[BR]]
[[BR]]
If you connect to a subversion repository with a tool like TortoiseSVN, you'll be able to click on the defect number and link directly back to the issue in Trac.[[BR]]
[[BR]]
Full support of this in Trac would be a nice enhancement.[[BR]]

"	borzwazie@…
6474	svn:externals displayed as folder in listing	version control/browser		unscheduled	enhancement	minor		new	2007-12-11T02:42:51+01:00	2015-05-26T20:55:39+02:00	"It would be nice if it was an option to enable svn:externals (& possibly other version control systems with the same feature) to be displayed inline in the folder/file listing.

Currently the svn:externals is listed at the bottom of the listing for the folder it's applied to. This link can be controlled using the TracIni settings to point directly to the correct repository.

The listing of the folder the external is linked to does not show any reference to the external. This is confusing as a checkout will copy the external into the WC, but there is no visual representation of this in Trac. A folder with a link icon (maybe) and information about the external (& link if configured correctly) would be nice.

Cameron"	cjunge@…
6615	svn:externals not correctly displayed in browser	version control/browser	0.11b1	unscheduled	defect	minor		new	2008-01-09T10:33:24+01:00	2015-05-26T20:55:39+02:00	"Using Trac 0.11b1, svn:externals can be followed using the browser.[[BR]]

However, imagine a directory which only contains links to externals modules (this could be a common use case, putting all external stuff in one place). Then when clicking on the left arrow to expand this folder, the ""jquery Loading..."" sends back an ''(empty)'' directory ! This is '''''correct from a subversion point of view''''' but a bit '''''strange from a user point of view''''' (which is not supposed to know svn internals) and we have to click on the directory name to get the svn:external link displayed.[[BR]]

The proposal should be : '''creating a particular directory entry icon which could represent an external link'''. Then, this link would be displayed as a special directory entry and the user would be able to follow this link without being disturbed by an ''empty'' dir content.[[BR]]
[[BR]]

I put here another thougth as it is linked to my previous description : A great improvement of the svn:externals functionality would be to follow the link within the trac browser if the link target is related to the same repos. Indeed, consider this situation :
[[BR]]
 * Repos is stored here http://myserver/svn/repos
 * The source directoy is http://myserver/svn/repos/project1/
 * the target directory is http://myserver/svn/repos/modules/module1
The svn:externals property of http://myserver/svn/repos/project1/ is set to ""module1 http://myserver/svn/repos/modules/module1"" [[BR]]
Then when following the link in the trac browser http://myserver/trac/browser/project1/module1 , we are redirected to http://myserver/svn/repos/modules/module1 which is correct but which leaves trac pages. As the link is ""external"" from a svn point of view but ""internal"" from a trac point of view, the address could be transformed on the fly to http://myserver/trac/browser/modules/module1



"	anonymous
7005	render svn properties as wiki text in new browser column	version control/browser		unscheduled	enhancement	normal		new	2008-03-14T10:20:11+01:00	2015-05-26T20:55:39+02:00	"Hi, a little patch we had for our internal trac here inspired me to this enhancement request. The patch currently works as follows:

It takes a configurable property (trac:comment in our case), runs it through the wiki->html engine part and then displays it in the source code browser view between the file/directory name and the actual contents of the browser view.

For the new javascript enhanced browser view, I would also put some kind of marker at all the files that have the said property set, so people can actually click in the view on it (as opposed to opening the treeview)."	anonymous
8477	Support SVN 1.5 merge tracking in Annotate view	version control/browser	none	unscheduled	enhancement	normal		new	2009-07-13T23:51:57+02:00	2010-07-01T11:54:48+02:00	"Starting with Subversion 1.5, the ""svn annotate"" command accepts a new option -g [--use-merge-history].
When used, the commands shows, for each line, it's original author, instead of the default behavior of showing the author of the merge operation.

This is possible thanks to the merge tracking capabilities introduced in SVN 1.5, and it is useful in projects which make intensive branching, because otherwise annotate info is progressively lost after successive merges.

Ideally Trac would support this too.

To enable the feature, a new checkbox in the annotate view would be needed, named something like ""Include merged revisions"" (I took that from Subclipse).

Finally, ""svn annotate"" also shows the letter ""G"" prior to each line which has been merged. It would be nice to find some equivalent.

"	Javier Sanz <jsceballos@…>
8611	More flexible configuration of browser quickjump facility	version control/browser	0.11.5	unscheduled	enhancement	normal		new	2009-08-28T00:35:49+02:00	2014-07-29T17:02:12+02:00	"This ticket summarizes the discussion starting in comment:3:ticket:4223.

The proposed enhancement is to create a `[browser-quickjump]` section in ''trac.ini'', which will be used to configure the quickjump facility in TracBrowser.  A screen capture of the current quickjump facility on a Trac instance with a Subversion repository is shown below.

[[Image(ticket:4223:QuickjumpFacility.png)]]

In the case of a Subversion backend, the browser quickjump facility is currently configured in TracIni#svn-section.  I'm told that no configuration is required for a Mercurial back-end, and I'm not sure how other repositories might be configured.

The current limitations are:
 * It is not possible to define your own group headings.  For an svn back-end the group headings are `branches` and `tags`.
 * It is not possible to have a list of entries with no group heading.

The proposal is to define a new section:

{{{
[browser-quickjump]
Common = /Common/*
Utilities = /Utilities/*
Test and Measurement = /Test and Measurement/*

Product =  /Presto/Product/Software/*,
           /Presto/Product/Docs/Released/*

Prototypes = /Presto/Prototype/Verasonics Matlab Simulator/*,
             /Presto/Prototype/PSI Development/*

R&D = /Presto/R&D/Software/*
}}}

The text to the left of the equals sign would define a section heading for the corresponding list of paths.

Comments and other ideas are welcome and appreciated."	Ryan J Ollos
9730	Allow adding comments to source in browser	version control/browser		unscheduled	enhancement	normal		new	2010-10-29T23:49:21+02:00	2023-01-21T10:20:39+01:00	This is something I have had in my mind for a while.  Given that many people are likely to use the trac browser to study the source of a piece of software they are not fully familiar with, it would make sense if they were allowed to add comments corresponding to that source as they understood how it works.  I could imagine something on the lines of a matching ticket being created for comments added by users which developers could handle and close (making the user comments disappear again) once they had transferred the comments to the actual code (or decided not to add a given comment).  I realise that this is not a trivial enhancement request, although there may be smarter and simpler ways to achieve the same thing.	michaeljt
10058	Highlight locked files in repository browser	version control/browser		unscheduled	enhancement	normal		new	2011-03-02T17:06:42+01:00	2015-11-18T07:35:15+01:00	"Re: http://groups.google.com/group/trac-users/browse_thread/thread/dbc3db1051a31c06#

I shall be implementing this feature and attaching a patch to this ticket once done. Patch target will be 0.12.x. Features
 - Display Lock Owner, Lock Created time and Lock Comment on the information page for a file
 - On the directory view highlight locked files, possibly showing 'Lock Owner' rather than 'Author' and 'Lock Comment' rather than 'Last Change'."	alex@…
10118	(almost patch) make browser quickjump dropdown context sensitive	version control/browser	0.12.2	unscheduled	enhancement	normal		new	2011-04-05T15:56:08+02:00	2015-12-19T16:51:14+01:00	"Hi, I made my quickjump context menu context sensitive because I have many many projects within the same erpository, and adding them all by hand to the trac.ini would not only be tedious, it would also confuse people since they probably only want to see available tags/branches to whatever server/program/library they are currently looking at.

I made a little patch to my trac 0.12.2 that does exactly what I want, but I guess to make it a full feature it should be configurable in some way (at lest switch it on/off, restrict it to some directory or all that match a pattern, or have some special keyword that gets substituted by the current path, or all at once).

Here are the changes:

{{{#!diff
diff -r -U5 /root/src/Trac-0.12.2/trac/versioncontrol/web_ui/browser.py ./versioncontrol/web_ui/browser.py
--- /root/src/Trac-0.12.2/trac/versioncontrol/web_ui/browser.py 2011-01-31 23:05:46.000000000 +0100       
+++ ./versioncontrol/web_ui/browser.py  2011-04-05 15:34:29.000000000 +0200                               
@@ -396,11 +397,11 @@                                                                                     
                                                                                                          
         quickjump_data = properties_data = None                                                          
         if node and not xhr:                                                                             
             properties_data = self.render_properties(                                                    
                     'browser', context, node.get_properties())                                           
-            quickjump_data = list(repos.get_quickjump_entries(rev))
+            quickjump_data = list(repos.get_quickjump_entries(rev,path))

         data = {
             'context': context, 'reponame': reponame, 'repos': repos,
             'repoinfo': all_repositories.get(reponame or ''),
             'path': path, 'rev': node and node.rev, 'stickyrev': rev,



diff -r -U5 /root/src/Trac-0.12.2/trac/versioncontrol/svn_fs.py ./versioncontrol/svn_fs.py 
--- /root/src/Trac-0.12.2/trac/versioncontrol/svn_fs.py 2011-01-31 23:05:46.000000000 +0100
+++ ./versioncontrol/svn_fs.py  2011-04-05 15:42:51.000000000 +0200                        
@@ -399,13 +399,20 @@                                                                      
         self.repos = self.fs_ptr = self.pool = None                                       
                                                                                           
     def get_base(self):                                                                   
         return self.base                                                                  
                                                                                           
-    def _get_tags_or_branches(self, paths):                                               
+    def _get_tags_or_branches(self, paths, showpath = None):                              
         """"""Retrieve known branches or tags.""""""                                            
-        for path in self.params.get(paths, []):                                           
+       mypaths=self.params.get(paths,[])                                                  
+       if( showpath and showpath.startswith(""trunk"") ):                                   
+           npath=showpath.replace(""trunk"",paths)                                          
+           if( not npath.endswith(""/"") ):                                                 
+               npath += ""/""                                                               
+           npath += ""*""                                                                   
+           mypaths.append(npath)                                                          
+       for path in mypaths:                                                               
             if path.endswith('*'):                                                        
                 folder = posixpath.dirname(path)                                          
                 try:                                                                      
                     entries = [n for n in self.get_node(folder).get_entries()]            
                     for node in sorted(entries, key=lambda n:                             
@@ -418,18 +425,18 @@                                                                      
                 try:                                                                      
                     yield self.get_node(path)                                             
                 except: # no right                                                        
                     pass                                                                  
                                                                                           
-    def get_quickjump_entries(self, rev):                                                 
+    def get_quickjump_entries(self, rev, showpath = None):                                
         """"""Retrieve known branches, as (name, id) pairs.                                  
                                                                                           
         Purposedly ignores `rev` and always takes the last revision.                      
         """"""                                                                               
-        for n in self._get_tags_or_branches('branches'):                                  
+        for n in self._get_tags_or_branches('branches',showpath):                         
             yield 'branches', n.path, n.path, None                                        
-        for n in self._get_tags_or_branches('tags'):                                      
+        for n in self._get_tags_or_branches('tags',showpath):                             
             yield 'tags', n.path, n.created_path, n.created_rev                           
                                                                                           
     def get_path_url(self, path, rev):                                                    
         url = self.params.get('url', '').rstrip('/')                                      
         if url:                    


}}}

This should give you an idea of what the feature looks like that I wanted to have."	anonymous
5119	"zip source download link should support ""current version"""	version control/browser		next-major-releases	enhancement	minor		new	2007-04-10T12:46:54+02:00	2015-05-26T20:50:57+02:00	"the source download link should be depending on the revision which is displayed in the source browser. i.e.:
 * if trunk (head, latest) is displayed, the download link should be trunk too, [http://trac.edgewall.org/changeset/trunk/trunk?old_path=%2F&format=zip like this]
 * if some revision is displayed, the download link should be that revision too, [http://trac.edgewall.org/changeset/5000/trunk?old_path=%2F&format=zip like this, r5000]

this would allow to give somebody else a direct download link by just copy-pasting the link.
"	ThurnerRupert
2956	Upload files to the repository	version control/browser	0.9.4	next-major-releases	enhancement	normal		new	2006-03-30T01:37:44+02:00	2017-04-16T11:13:05+02:00	Can you build in a simple FileUploading (into the rep) to Trac for those who cannot install a svn client on their main workstation.	anonymous
10480	forward slash in repository name causes errors	version control/browser	0.12dev	next-stable-1.6.x	defect	minor		new	2011-11-22T20:26:49+01:00	2023-09-23T22:33:10+02:00	"When adding a repository to my new Trac 0.12 installation, I made the mistake of using the URL as the repository name.  It turns out that Trac does not like forward slashes in the repository name.

Here's the command I used:
{{{
[root@svn-server:/var/lib/trac/projects/trac-env]# trac-admin $PWD repository add ""svn://svn-server"" /path/to/svn/repos/ svn
}}}

Here's the error that is displayed when I try to browse the source:
[[Image(trac_browse_source_error.png)]]

Here's the warning out of the log.  Note that it only diplays one out of the two forward slashes.

{{{
2011-11-22 12:17:13,017 Trac[env] INFO: -------------------------------- environment startup [Trac 0.12.2] --------------------------------
2011-11-22 12:17:13,160 Trac[env] WARNING: base_url option not set in configuration, generated links may be incorrect
2011-11-22 12:17:13,188 Trac[api] INFO: Synchronized '' repository in 0.02 seconds
2011-11-22 12:17:13,191 Trac[main] WARNING: HTTPNotFound: 404 Trac Error (No node svn:/svn-server)
}}}

When I use the ""(default)"" name for the same repository instead of the name with forward slashes, everything works fine."	Andrew C Martin <andrew.c.martin@…>
10547	glitch with mergeinfo (recreation of merge source shown as eligible)	version control/browser	0.12dev	next-stable-1.6.x	defect	minor		new	2012-01-27T22:05:54+01:00	2023-09-23T22:33:10+02:00	"It seems that we show the revision corresponding to the re-creation of a deleted merge source as eligible while svn does not:

{{{
$ svn merge ^/sandbox/mercurial-plugin-0.11 --record-only
--- Recording mergeinfo for merge of r8941 through r10935 into '.':
 U   .

$ svn merge ^/plugins/0.11/mercurial-plugin --record-only
--- Recording mergeinfo for merge of r4247 through r8935 into '.':
 G   .
--- Recording mergeinfo for merge of r8936 through r10935 into '.':
 G   .

$ svn diff
Index: .
===================================================================
--- .   (revision 10935)
+++ .   (working copy)

Property changes on: .
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /sandbox/mercurial-plugin-0.11:r8941-10935
   Merged /plugins/0.11/mercurial-plugin:r9953-10935

$ svn ci -m ""TracMercurial for 0.12: cleanup mergeinfo (everything was up-to-date)""
Sending        .

Committed revision 10936.

$ svn mergeinfo ^/sandbox/mercurial-plugin-0.11 --show-revs=eligible

$ 
}}}

In particular, note the initial command, we merge all pending changes from `^/sandbox/mercurial-plugin-0.11` and svn says ""r8941 through r10935"" and the corresponding commit, r10936, shows that this corresponds to the recording of the merge of r8943.

The last command shows that according to Subversion there's no more eligible revisions from that branch, but we will nevertheless show r8940 as eligible, in source:plugins/0.12/mercurial-plugin.

For the context, see: 
 - log:/plugins/0.12/mercurial-plugin@10936?mode=follow_copy
 - log:sandbox/mercurial-plugin-0.11&mode=path_history (another glitch there btw, no color code)

We see that [source:sandbox/mercurial-plugin-0.11@8827] was moved to [source:plugins/multirepos/mercurial-plugin-0.12@8937] in r8937, and that after this move, the path `sandbox/mercurial-plugin-0.11` was recreated in r8940, and got a modification in r8943. Subversion considers that r8943 was eligible for merge, but not r8940 (quite logically). We should do the same."	Christian Boos
12380	No scrolling on repository browser with j/k keys	version control/browser		next-stable-1.6.x	defect	normal		new	2016-03-03T04:23:10+01:00	2023-09-23T22:33:10+02:00	In repository browser, j/k keys can be used to select next/previous entry. However, no scrolling even if selected entry is out of viewport. I think we should scroll window for that case.	Jun Omae
4329	diff does not treat TAB as whitespace	version control/browser	0.10.3	unscheduled	defect	minor		new	2006-12-04T15:44:59+01:00	2016-02-25T05:54:51+01:00	"Checking the box to ignore whitespace still ends up highlighting changes from TAB to space(s).
"	anonymous
9265	Display HEAD when browsing latest revision	version control/browser	0.12dev	unscheduled	enhancement	trivial		new	2010-04-24T16:59:07+02:00	2010-07-04T00:24:57+02:00	"Last week I updated to the newest 0.12dev.

I noticed that in the repo-browser view the revision number is now appended to the path shown in the left-above corner, e.g.

 source: /somepath/trunk '''@ 584'''

I think it would be useful when the text {{{HEAD}}} is appended in cases the shown rev-number is the latest revision (head revision) of the repo. Assuming that rev 584 is the head revision, above example would then be displayed as

 source: /somepath/trunk '''@ 584 (HEAD)'''
"	Laurens Blanckenborg <laurens@…>
6101	browsing folder with too many files should use paging	version control/browser	devel	next-major-releases	defect	minor		new	2007-09-28T11:20:13+02:00	2015-05-26T20:50:57+02:00	"From time to time and everytime when I try to open a folder which contains many files at the ""Browse source"" component I get this memory error:

{{{
Traceback (most recent call last):
  File ""/usr/local/python2.5/lib/python2.5/site-packages/Trac-0.11dev_r6038-py2.5.egg/trac/web/api.py"", line 342, in send_error
    'text/html')
  File ""/usr/local/python2.5/lib/python2.5/site-packages/Trac-0.11dev_r6038-py2.5.egg/trac/web/chrome.py"", line 601, in render_template
    return stream.render(method, doctype=doctype)
  File ""build/bdist.linux-i686/egg/genshi/core.py"", line 154, in render
    return encode(generator, method=method, encoding=encoding)
  File ""build/bdist.linux-i686/egg/genshi/output.py"", line 45, in encode
    output = u''.join(list(iterator))
  File ""build/bdist.linux-i686/egg/genshi/output.py"", line 274, in __call__
    for kind, data, pos in stream:
  File ""build/bdist.linux-i686/egg/genshi/output.py"", line 519, in __call__
    for kind, data, pos in stream:
  File ""build/bdist.linux-i686/egg/genshi/output.py"", line 679, in __call__
    for kind, data, pos in chain(stream, [(None, None, None)]):
  File ""build/bdist.linux-i686/egg/genshi/output.py"", line 459, in __call__
    for ev in stream:
  File ""build/bdist.linux-i686/egg/genshi/core.py"", line 212, in _ensure
    for event in stream:
  File ""build/bdist.linux-i686/egg/genshi/core.py"", line 212, in _ensure
    for event in stream:
  File ""/usr/local/python2.5/lib/python2.5/site-packages/Trac-0.11dev_r6038-py2.5.egg/trac/web/chrome.py"", line 631, in _strip_accesskeys
    for kind, data, pos in stream:
  File ""build/bdist.linux-i686/egg/genshi/core.py"", line 212, in _ensure
    for event in stream:
  File ""/usr/local/python2.5/lib/python2.5/site-packages/Trac-0.11dev_r6038-py2.5.egg/trac/web/chrome.py"", line 620, in _generate
    for kind, data, pos in stream:
  File ""build/bdist.linux-i686/egg/genshi/template/markup.py"", line 252, in _include
    for event in stream:
  File ""build/bdist.linux-i686/egg/genshi/template/markup.py"", line 322, in _match
    content = list(self._include(content, ctxt))
  File ""build/bdist.linux-i686/egg/genshi/template/markup.py"", line 252, in _include
    for event in stream:
  File ""build/bdist.linux-i686/egg/genshi/template/markup.py"", line 297, in _match
    for event in stream:
  File ""build/bdist.linux-i686/egg/genshi/template/markup.py"", line 286, in _strip
    event = stream.next()
  File ""build/bdist.linux-i686/egg/genshi/template/markup.py"", line 242, in _exec
    for event in stream:
  File ""build/bdist.linux-i686/egg/genshi/template/base.py"", line 421, in _eval
    result = data.evaluate(ctxt)
  File ""build/bdist.linux-i686/egg/genshi/template/eval.py"", line 136, in evaluate
    return eval(self.code, _globals, {'data': data})
  File ""/usr/local/python2.5/lib/python2.5/site-packages/Trac-0.11dev_r6038-py2.5.egg/trac/templates/error.html"", line 161, in <Expression u'shorten_line(repr(value))'>
    <td><code>${shorten_line(repr(value))}</code></td>
MemoryError
}}}

This error only occurs when I have some data in the associated repository."	alex.theissen
7071	keyboard nav implementation	version control/browser	0.11b2	next-major-releases	enhancement	trivial		new	2008-04-02T22:49:36+02:00	2015-05-26T20:50:57+02:00	"why do you do such operations like


{{{
+   $(function() { 
+     $('a,input,select,textarea,button') 
+       .focus(function(event) { 
+         ENABLE_KEY_NAV = false; 
+       }) 
+       .blur(function(event) { 
+         ENABLE_KEY_NAV = true; 
+       }); 
+   });
}}}
see r6724

if you could do things easier using a :not selector with jquery

{{{
$(""*:not(a,input,select,textarea,button,option)"")
}}}

Another little thing:
the '''option''' tags should also be ingored to be IE friendly"	Markus.Staab
10267	Version controls diffs of large text files kill the system	version control/changeset view	0.12.2	next-dev-1.7.x	defect	major		new	2011-07-15T18:25:07+02:00	2020-12-29T09:45:39+01:00	"We have some large text files (they are some data files we deal with) and when you try to view ""last revision"" or a revision with them it bombs (i.e. the service's cpu usage goes to 100%, and things come to a screeching halt).

Looks like the issue is in: versioncontrol/web_ui/changeset.py

The `_content_changes` method tries to do a diff of anything that isn't a binary.  This is fine for most text files, unless they are big (like even 5 to 10 megs seems a bit much for the diffing method used).  Anyway, I simply added the following to `_content_changes`:

{{{#!python
if (len(old_content) > 100000 or len(new_content) > 100000):
    return None
}}}

(Sorry if it isn't proper pep8)

It looks like you have a max_diff_bytes but that only effects the diff results.  Ideally you would want a threshold before you have the diff results.

"	anonymous
2035	Changeset commenting	version control/changeset view		next-major-releases	enhancement	major		new	2005-09-09T15:35:21+02:00	2022-09-08T16:44:10+02:00	Commenting on changesets would be great, it would substitute for code review tools.	polarfox@…
53	plugin infrastructure for rendering diff HTML previews	version control/changeset view	devel	next-major-releases	enhancement	normal		new	2004-02-10T21:10:27+01:00	2023-02-26T06:09:59+01:00	"== Use Cases

=== Viewing image changes/patches in a changeset

It would be pretty cool to be able to view image updates in the changeset viewer. An updated image should show the old version and the new version side by side, just like text diffs.

=== Filter out noisy changes

Typical use case is for showing diffs on .po files, where the chunks corresponding to line number changes only are completely uninteresting and can be safely skipped.
"	daniel
4080	[Patch] Detect charset using enca or chardet	version control/changeset view	0.10	next-major-releases	enhancement	normal		new	2006-11-06T13:06:14+01:00	2015-12-14T14:37:03+01:00	"to detect charset in multiply charset repository

http://gitorious.org/enca"	mpv
2465	"Add ""custom query"" functionality for changesets"	version control/changeset view	none	next-major-releases	enhancement	critical		new	2005-12-09T11:54:06+01:00	2015-05-26T20:50:57+02:00	"I think it would be really useful to have the ability to quickly define queries on changesets, similarily to what can be done on tickets (ie. with a GUI allowing filters on changeset comments, author, file path and commit dates).[[BR]]
This page should also implement RSS feed (as Ticket custom queries), to allow notification of specific changes. [[BR]]

I suppose that the implementation would be similar to the ticket 'custom query' page (but I havn't looked in depth at the code, not being a Python developer... yet).
I leave it to the TRAC people to set milestone, priority, etc. Many Thanks for this great software BTW."	guillaume.tardif@…
6858	Improve intra-line diff highlighting	version control/changeset view		next-major-releases	enhancement	minor		new	2008-02-20T11:06:38+01:00	2015-05-26T20:50:57+02:00	"Looking at this one:
http://trac.edgewall.org/wiki/TracInstall?action=diff&version=231

{{{
#!diff
--- TracInstall
+++ TracInstall
@@ -43,7 +43,7 @@
 * [http://www.postgresql.org/ PostgreSQL] 
 * [http://initd.org/projects/psycopg2 psycopg2] or [http://pypgsql.sourceforge.net/ pyPgSQL] 
 
- '''Warning''': Postgresql-8.3 uses a strict type checking mechanism. To use trac with the 8.3 Version of Postgresql, you will need the latest version of trac. 
+ '''Warning''': PostgreSQL 8.3 uses a strict type checking mechanism. To use Trac with the 8.3 Version of PostgreSQL, you will need the latest version of Trac. 
 
 === For MySQL === 
 
}}}

I think we should be able to do much better, something like:

{{{
#!html
<div class=""diff""><ul class=""entries""><li class=""entry"">
  <h2>TracInstall</h2>
  <table cellspacing=""0"" summary=""Differences"" class=""inline"">
   <colgroup><col class=""lineno""/><col class=""lineno""/><col class=""content""/></colgroup>
   <thead><tr>
    <th>old</th>
    <th>new</th>
    <th> </th>
   </tr></thead><tbody><tr><th>43</th><th>43</th><td class=""l""><span>* [http://www.postgresql.org/ PostgreSQL] </span> </td></tr><tr><th>44</th><th>44</th><td class=""l""><span>* [http://initd.org/projects/psycopg2 psycopg2] or [http://pypgsql.sourceforge.net/ pyPgSQL] </span> </td></tr><tr><th>45</th><th>45</th><td class=""l""><span/> </td></tr></tbody><tbody class=""mod""><tr class=""first""><th>46</th><th> </th><td class=""l""> '''Warning''': Postgre<del>sql-</del>8.3 uses a strict type checking mechanism. To use <del>t</del>rac with the 8.3 Version of Postgre<del>sql</del>, you will need the latest version of <del>t</del>rac.  </td></tr><tr class=""last""><th> </th><th>46</th><td class=""r""> '''Warning''': Postgre<ins>SQL </ins>8.3 uses a strict type checking mechanism. To use <ins>T</ins>rac with the 8.3 Version of Postgre<ins>SQL</ins>, you will need the latest version of <ins>T</ins>rac.  </td></tr></tbody><tbody><tr><th>47</th><th>47</th><td class=""l""><span/> </td></tr><tr><th>48</th><th>48</th><td class=""l""><span>=== For MySQL === </span> </td></tr><tr><th>49</th><th>49</th><td class=""l""><span/> </td></tr></tbody>
  </table>
 </li>
</ul></div>
}}}

That would be especially useful for Wiki text diffs, where it's common to have one line for a full paragraph, but the clarity of code diffs would probably benefit of this enhancement as well.

A somewhat related enhancement would be to have an heuristic for triggering the intra-line diff highlighting also when the base and new block length differ, as it's common to have common lines changed together with lines added/removed, in the same chunk.

"	Christian Boos
9172	Trac diff highlighting start and end points	version control/changeset view	0.11-stable	next-major-releases	enhancement	minor		new	2010-03-25T12:05:57+01:00	2017-04-16T17:22:25+02:00	"At the moment the changeset diff viewer correctly shows the difference between two files, however the start and end points are oddly positioned.

So for example this diff view shows the deletion starting at the closing ""}"" of the previous section:

[[Image(diffoddstartend.png)]]

In complex code this can be offputting, as it is really the second declaration that has simply been removed (including it's bracketed {…} section).  However as the diff catches the closing }, you are then left with a closing } at the end of the diff.

Whilst technically still a correct diff, other systems (such as fisheye) are able to show the diff in a more intuitive way, by highlighting the removed section instead, mockup example:

[[Image(diffnewstartend.png)]]

It would be a nice enhancement to change the diff viewer so it is more in line with removing the section rather than clipping the previous closing bracket."	c.jones@…
515	Collapsible diff display	version control/changeset view	0.7.1	next-major-releases	enhancement	normal		new	2004-06-04T23:14:55+02:00	2023-02-26T06:25:47+01:00	It would be nice to have a button on each diff section to collapse each the diff section/file.  In this way you could display only the file diff you are interested in rather than having to display all the diffs.	jamesm@…
4887	Option for changeset viewer to show added and deleted files inline	version control/changeset view	0.10.3	next-major-releases	enhancement	normal		new	2007-03-04T23:16:11+01:00	2015-05-26T20:50:57+02:00	"The unified diff correctly includes new files.  However the web changeset view does not.

For an example, see this change set on r4848 trac.  It is missing the contents of trunk/trac/htdocs/js/ie_pre7_hacks.js."	paul.wants.no.spam@…
6638	Allow file exclusions in diffs	version control/changeset view		next-major-releases	enhancement	normal		new	2008-01-12T12:44:12+01:00	2015-05-18T20:07:03+02:00	"Trac should allow us to set file types (by extension) that should not be diff-ed. A lot of large auto generated xml-based files are showing up in changesets and they really hurt performance and make Trac difficult to use.
"	anonymous@…
6783	Diff Tabular / Unified switcher highlights the wrong way around?	version control/changeset view	devel	next-major-releases	enhancement	normal		new	2008-02-07T14:10:55+01:00	2015-05-26T20:50:57+02:00	"When viewing a diff, the selected alternative is bolded (and not linked) and the alternative option that can be selected is greyed out (with link).

Shouldn't it be the other way around? It is very confusing, and contrary to common UI practice. Or could it be adjusted like the appearance of small mini tabs or something where both look like valid choices, but where current choice can still be clearly seen?


"	osimons
6807	Option to skip revisions with lots of added files	version control/changeset view		next-major-releases	enhancement	normal		new	2008-02-11T09:35:43+01:00	2015-05-26T20:50:57+02:00	"On the real production systems with several millions LOC,
it should be possible to skip the revisions that contain initial import
of the sources into svn. Such a revisions could contain thousands of files
and to trac it takes a hours to process such a revision, probably because of the indexing or code diff calculation.

The request is to have an option to skip such a revision, i.e. either make 
them invisible to trac somehow, or make trac know to take the special care of such a cases.
Ideally, trac could detect such a revisions by itself and proceed according to 
some config. The huge revisions could be detected by the size of the revision file,
for example.
"	moisei
8146	Unified diff in changeset view differs from exported unified diff	version control/changeset view	0.12dev	next-major-releases	defect	normal		new	2009-03-21T20:59:58+01:00	2021-01-11T14:45:35+01:00	"In the changeset view the unified diff provided by clicking on Unified is different from the one which can be downloaded.

View when selecting **Unified** in the changeset view:
{{{
Index: trunk/setup.py
===================================================================
--- a/trunk/setup.py
+++ b/trunk/setup.py
@@ -2,5 +2,5 @@
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2003-2008 Edgewall Software
+# Copyright (C) 2003-2009 Edgewall Software
 # All rights reserved.
 #
@@ -71,5 +71,5 @@
     install_requires = [
         'setuptools>=0.6b1',
-        'Genshi>=0.5'
+        'Genshi>=0.6dev-r960'
     ],
     extras_require = {
}}}


Content downloaded as a //Unified Diff//:
{{{
Index: trunk/setup.py
===================================================================
--- trunk/setup.py (revision 7699)
+++ trunk/setup.py (revision 7890)
@@ -2,5 +2,5 @@
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2003-2008 Edgewall Software
+# Copyright (C) 2003-2009 Edgewall Software
 # All rights reserved.
 #
@@ -71,5 +71,5 @@
     install_requires = [
         'setuptools>=0.6b1',
-        'Genshi>=0.5'
+        'Genshi>=0.6dev-r960'
     ],
     extras_require = {
}}}

here the diff of the two diffs :


{{{
#!diff
--- C:\Users\Absynthe\Downloads\diff-trunk_trac_versioncontrol_web_ui_changeset.py-from-r7626-to-r7890.diff	sam. mars 21 12:38:50 2009
+++ C:\Users\Absynthe\Downloads\diff-trunk_setup.py-from-r7699-to-r7890.diff	sam. mars 21 12:37:11 2009
@@ -1,7 +1,7 @@
 Index: trunk/setup.py
 ===================================================================
---- a/trunk/setup.py
-+++ b/trunk/setup.py
+--- trunk/setup.py (revision 7699)
++++ trunk/setup.py (revision 7890)
 @@ -2,5 +2,5 @@
  # -*- coding: utf-8 -*-
  #
}}}

As you can see paths in the index of the first diff are a bit custom."	anonymous
10101	Broken permissions for changeset view	version control/changeset view	0.12	next-major-releases	defect	normal		new	2011-03-26T13:10:34+01:00	2019-09-06T19:51:32+02:00	"I installed Trac 0.12 some time ago and created me as admin user (TRAC_ADMIN). I added SVN respository, synchronization and everything works fine. After some time, I added a new user and added him some permissions. But when I try to view a changeset logged as this new user, I get weird results - only some added files (2-3 from ~20 new files) with not completed paths (e.g. ballance instead of user_accounts/ballance). Diffs are not shown. Sometimes I get only:

Message:
      
(No files)

It is ok when I log in as admin user. After some time playing with permissions, when I delete all permissions, then I add TRAC_ADMIN permission to the new user, then changesets are ok. But when I try to add only CHANGESET_VIEW permission (or all other permissions except TRAC_ADMIN), then it is not working.

I have to add (or add, remove, add) TRAC_ADMIN permission to the new user, then all required permissions and finally remove TRAC_ADMIN permission if I want CHANGESET_VIEW to work without admin permission."	bruce@…
10914	Changeset columns overlapping	version control/changeset view		next-major-releases	defect	normal		new	2012-10-19T01:20:03+02:00	2015-03-02T22:27:22+01:00	"The columns with changeset information are overlapping (for a Git repository), as shown in this screenshot:

[[Image(git-changeset.png)]]

This is on Ubuntu 12.04 with Firefox."	Thijs Triemstra
11446	Cummulative diff view for non-contiguous changesets	version control/changeset view		next-major-releases	enhancement	normal		new	2014-01-15T01:17:13+01:00	2019-08-20T11:11:09+02:00	When linking to a non-contiguous range of revisions from a TracLink such as [2,4:5], multiple //Show changes// buttons are displayed, and it doesn't seem to be possible to view a single diff encompassing all the changes. However, the latter view is usually what I'm looking for.	Ryan J Ollos
7975	Viewing changesets is very slow	version control/changeset view	0.11.2.1	next-stable-1.6.x	defect	major		new	2009-01-16T17:24:53+01:00	2023-09-23T22:33:10+02:00	Running trac 0.11.2.1 with Postgres 8.1.11 backend.  We have approximatley 20k changesets.  It takes several minutes to render a changeset.  The systems appears to be doing heavy I/O against the database during the rendering.  Have tried adjusting max_diff_bytes and max_diff_files to various settings with no effect.	it@…
12484	GitErrorSha is raised from /diff page when the git repository is empty	version control/changeset view	1.0.11	next-stable-1.6.x	defect	minor		new	2016-05-20T08:23:45+02:00	2023-09-23T22:33:10+02:00	"{{{
03:18:05 PM Trac[main] ERROR: Internal Server Error: <RequestWithSession ""GET '/changeset?old_path=%2Fempty.git&old=&new_path=%2Fempty.git&new='"">, referrer 'http://127.0.0.1:3000/diff'
Traceback (most recent call last):
  File ""/venv/trac/1.0.11/lib/python2.5/site-packages/trac/web/main.py"", line 562, in _dispatch_request
    dispatcher.dispatch(req)
  File ""/venv/trac/1.0.11/lib/python2.5/site-packages/trac/web/main.py"", line 249, in dispatch
    resp = chosen_handler.process_request(req)
  File ""/venv/trac/1.0.11/lib/python2.5/site-packages/trac/versioncontrol/web_ui/changeset.py"", line 301, in process_request
    prev_path, prev_rev = new_path, repos.previous_rev(new)
  File ""/venv/trac/1.0.11/lib/python2.5/site-packages/trac/versioncontrol/cache.py"", line 397, in previous_rev
    return self.repos.previous_rev(self.normalize_rev(rev), path)
  File ""/venv/trac/1.0.11/lib/python2.5/site-packages/tracopt/versioncontrol/git/git_fs.py"", line 599, in previous_rev
    return self.git.hist_prev_revision(rev)
  File ""/venv/trac/1.0.11/lib/python2.5/site-packages/tracopt/versioncontrol/git/PyGIT.py"", line 643, in hist_prev_revision
    return self.history_relative_rev(sha, +1)
  File ""/venv/trac/1.0.11/lib/python2.5/site-packages/tracopt/versioncontrol/git/PyGIT.py"", line 622, in history_relative_rev
    raise GitErrorSha()
GitErrorSha:
}}}"	Jun Omae
4474	diffing two large trees results in a massive list with a lot of empty links	version control/changeset view	devel	next-stable-1.6.x	defect	normal		new	2006-12-29T19:16:59+01:00	2023-09-23T22:33:10+02:00	"If I run a manual diff of two large directories in different branches (600 files, 15MB), instead of directly showing all the diffs, it displays a list of links to the diffs of individual files.

That wouldn't be too bad (it's probably intended to reduce browser load but I'd like to be able to customize the behavior somehow - help!), but in the above case, many of the links lead to empty diffs, which is obviously wrong. Please fix it so it only links to non-empty diffs."	theultramage@…
5515	Empty changeset causes exception	version control/changeset view	devel	next-stable-1.6.x	defect	normal		new	2007-06-13T23:57:32+02:00	2023-09-23T22:33:10+02:00	"= Context = 

 * Reorganizing project
   * Exported 2 svn repositories, server and client
   * Created new svn repository
   * Created 2 svn folders in new repository, server and client
   * Did import into server and client folders
 * Changed trac.ini to point to new repository, then did resync
 * Browsed to project Timeline to look at changesets
 * When I tried browse to changeset [1], got an internal error
 * Browsing to other changesets worked fine
   * Changeset [2] picked up the new server folder
   * Changeset [3] picked up the new client folder
   * Changeset [4] does not exist ??
   * Changeset [5] picked up import into server folder
   * Changeset [6] picked up import into client folder
 * I searched tickets for ""changeset NoneType split"" with no hits
 * Search for ""changeset NoneType"" hit an unrelated ticket

= Diagnostic Data =
Trac detected an internal error:
{{{
AttributeError: 'NoneType' object has no attribute 'split'


Python Traceback
Most recent call last:

    * File ""c:\python25\lib\site-packages\Trac-0.11dev_r5661-py2.5.egg\trac\web\main.py"", line 432, in dispatch_request
      Code fragment:
       427. if not env and env_error:
       428. raise HTTPInternalError(env_error)
       429. try:
       430. try:
       431. dispatcher = RequestDispatcher(env)
       432. dispatcher.dispatch(req)
       433. except RequestDone:
       434. pass
       435. return req._response or []
       436. finally:
       437. if not run_once:
      Local variables:
      Name	Value
      after 	[' except RequestDone:', ' pass', ' ...
      before 	[' if not env and env_error:', ' raise ...
      dispatcher 	<trac.web.main.RequestDispatcher object at 0x055836F0>
      e 	AttributeError(""'NoneType' object has no attribute 'split'"",)
      egg_cache 	None
      env 	<trac.env.Environment object at 0x0556AEF0>
      env_error 	None
      env_name 	'sqdb'
      env_parent_dir 	'D:/projects'
      env_path 	'D:/projects\\sqdb'
      env_paths 	None
      environ 	{'HTTP_AUTHORIZATION': 'Basic cGhpbnRvbjplcjFjYTE=', 'wsgi.multiprocess': ...
      exc_info 	(<type 'exceptions.AttributeError'>, AttributeError(""'NoneType' object has ...
      filename 	'c:\\python25\\lib\\site-packages\\Trac-0.11dev_r5661-py2.5.egg\\trac\\web\ ...
      frames 	[{'function': 'dispatch_request', 'lines_before': [' if not env and ...
      has_admin 	True
      line 	' dispatcher.dispatch(req)'
      lineno 	431
      message 	u""AttributeError: 'NoneType' object has no attribute 'split'""
      options 	{'TracUriRoot': '/projects', 'TracEnvParentDir': 'D:/projects'}
      path_info 	['changeset', '1']
      req 	<Request ""GET u'/changeset/1'"">
      request_uri 	'/projects/sqdb/changeset/1'
      root_uri 	'/projects'
      run_once 	False
      script_url 	None
      start_response 	<bound method ModPythonGateway._start_response of ...
      tb 	<traceback object at 0x06E36198>
      tb_hide 	None
      traceback 	'Traceback (most recent call last):\n File ...
    * File ""c:\python25\lib\site-packages\Trac-0.11dev_r5661-py2.5.egg\trac\web\main.py"", line 217, in dispatch
      Code fragment:
       212. 'Do you have cookies enabled?')
       213.  
       214. # Process the request and render the template
       215. try:
       216. try:
       217. resp = chosen_handler.process_request(req)
       218. if resp:
       219. if len(resp) == 2: # Clearsilver
       220. chrome.populate_hdf(req)
       221. template, content_type = \
       222. self._post_process_request(req, *resp)
      Local variables:
      Name	Value
      chosen_handler 	<trac.versioncontrol.web_ui.changeset.ChangesetModule object at ...
      chrome 	<trac.web.chrome.Chrome object at 0x055838B0>
      err 	(<type 'exceptions.AttributeError'>, AttributeError(""'NoneType' object has ...
      handler 	<trac.versioncontrol.web_ui.changeset.ChangesetModule object at ...
      req 	<Request ""GET u'/changeset/1'"">
      self 	<trac.web.main.RequestDispatcher object at 0x055836F0>
    * File ""c:\python25\lib\site-packages\Trac-0.11dev_r5661-py2.5.egg\trac\versioncontrol\web_ui\changeset.py"", line 319, in process_request
      Code fragment:
       314. self._render_diff(req, filename, repos, data)
       315. elif format == 'zip':
       316. self._render_zip(req, filename, repos, data)
       317.  
       318. # -- HTML format
       319. self._render_html(req, repos, chgset, restricted, xhr, data)
       320.
       321. if chgset:
       322. diff_params = 'new=%s' % new
       323. else:
       324. diff_params = unicode_urlencode({'new_path': new_path,
      Local variables:
      Name	Value
      chgset 	<trac.versioncontrol.cache.CachedChangeset object at 0x07019F90>
      data 	{'changeset': <trac.versioncontrol.cache.CachedChangeset object at ...
      diff_data 	{'style': 'inline', 'options': {'ignorecase': 0, 'ignoreblanklines': 0, ...
      format 	None
      new 	1
      new_path 	'/'
      old 	None
      old_path 	None
      options 	['-U2']
      prev 	None
      prev_path 	'/'
      prev_rev 	None
      repos 	<trac.versioncontrol.cache.CachedRepository object at 0x07014D50>
      req 	<Request ""GET u'/changeset/1'"">
      restricted 	False
      self 	<trac.versioncontrol.web_ui.changeset.ChangesetModule object at ...
      style 	'inline'
      xhr 	False
    * File ""c:\python25\lib\site-packages\Trac-0.11dev_r5661-py2.5.egg\trac\versioncontrol\web_ui\changeset.py"", line 595, in _render_html
      Code fragment:
       590. info = None
       591. changes.append(info) # the sequence should be immutable
       592.  
       593. data.update({'has_diffs': has_diffs, 'changes': changes, 'xhr': xhr,
       594. 'filestats': filestats,
       595. 'files': files, 'location': self._get_location(files),
       596. 'longcol': 'Revision', 'shortcol': 'r'})
       597.  
       598. if xhr: # render and return the content only
       599. stream = Chrome(self.env).render_template(req, 'changeset.html',
       600. data, fragment=True)
      Local variables:
      Name	Value
      _changeset_title 	<function _changeset_title at 0x06F8D470>
      _content_changes 	<function _content_changes at 0x06F17030>
      _estimate_changes 	<function _estimate_changes at 0x06F174F0>
      _prop_changes 	<function _prop_changes at 0x06F17B30>
      annotated 	False
      browser 	<trac.versioncontrol.web_ui.browser.BrowserModule object at 0x05583F70>
      change 	'add'
      changes 	[{'new': {'path': u'', 'href': '/projects/sqdb/browser/?rev=1', 'rev': 1, ...
      chgset 	<trac.versioncontrol.cache.CachedChangeset object at 0x07019F90>
      context 	<Context u'[root], changeset:1' <Request ""GET u'/changeset/1'"">>
      data 	{'changeset': <trac.versioncontrol.cache.CachedChangeset object at ...
      diff_bytes 	0
      diff_files 	0
      diffs 	[]
      files 	[None]
      filestats 	{'edit': 0, 'delete': 0, 'add': 1, 'copy': 0, 'move': 0}
      get_changes 	<function get_changes at 0x06F8D370>
      has_diffs 	False
      info 	{'new': {'path': u'', 'href': '/projects/sqdb/browser/?rev=1', 'rev': 1, ...
      kind 	'dir'
      new_node 	<trac.versioncontrol.svn_fs.SubversionNode object at 0x06FEBE70>
      next_href 	'/projects/sqdb/changeset/2'
      next_rev 	2
      node_info 	<function node_info at 0x06F174B0>
      old_node 	None
      oldest_rev 	1
      options 	{'ignorecase': 0, 'ignoreblanklines': 0, 'contextlines': 2, ...
      path 	'/'
      props 	[]
      repos 	<trac.versioncontrol.cache.CachedRepository object at 0x07014D50>
      req 	<Request ""GET u'/changeset/1'"">
      restricted 	False
      rev 	1
      revprops 	{}
      self 	<trac.versioncontrol.web_ui.changeset.ChangesetModule object at ...
      show_diff 	True
      show_diffs 	True
      show_entry 	True
      title 	'Changeset 1'
      xhr 	False
      youngest_rev 	6
    * File ""c:\python25\lib\site-packages\Trac-0.11dev_r5661-py2.5.egg\trac\versioncontrol\web_ui\changeset.py"", line 732, in _get_location
}}}
System Information:

||User Agent:|| Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3||
||Trac:|| 	0.11dev-r5661||
||Python:|| 	2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)]||
||setuptools:|| 	0.6c6||
||MySQL:|| 	server: ""5.0.41-community-nt"", client: ""5.0.27"", thread-safe: 1|
||MySQLdb:|| 	1.2.2||
||Genshi:|| 	0.4.1||
||Subversion:|| 	1.4.3 (r23084)||
||jQuery:||	1.1.2||
"	hinton_phil@…
5549	"Improve diff message ""no files"""	version control/changeset view	devel	next-stable-1.6.x	defect	normal		new	2007-06-19T15:10:30+02:00	2023-09-23T22:33:10+02:00	"When a changeset contains only minor modifications (blank line, whitespace changes ...) and the matching ""ignore"" checkboxes are selected, Trac outputs a confusing message:

'''(No files)'''

whereas the actual message should be something like ""''(No visible changes)''"", as the changeset does contain files, but the selected diff options lead to an empty diff.

This is confusing especially as Trac conveniently keeps track of the user diff preferences from one diff to another - which implies that a user can get a ""''(No files)''"" message as soon as he wants a diff.


"	Emmanuel Blot
7486	wrong space in diff output	version control/changeset view	0.11-stable	next-stable-1.6.x	defect	normal		new	2008-07-30T14:50:39+02:00	2023-09-23T22:33:10+02:00	"i'm not sure if this applies to other mimetype syntax highligher

See URL: http://linuxfire.com.cn/BadGirl/changeset/290

the new ""num0_254"" is EXPECTED to be align to num1_254 but it is ACTUALLY 1 char off and align to ""(""

actual code output:
{{{
                        <th>114</th><th> </th><td class=""l""><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <del>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </del> num0_254,</span> </td>
}}}
expected code output
{{{
                        <th>114</th><th> </th><td class=""l""><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <del>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </del>&nbsp;num0_254,</span> </td>
}}}

please note the difference is, ""</del> "" is changed to ""</del>&nbsp;""

tech reason: although space following &nbsp; is recognized as space, e.g.: ""&nbsp; "" is same as ""&nbsp;&nbsp;"", but space following the ""<tag>"" is not. ""</del> "" should be escape as ""</del>&nbsp;"""	moo
10813	diff view (tabular) whitespace off-by-one mistake	version control/changeset view	1.0dev	next-stable-1.6.x	defect	normal		new	2012-08-15T19:52:31+02:00	2023-09-23T22:33:10+02:00	"I have made a commit that looks like the following:
{{{
#!diff
--- a
+++ b
@@ -12,3 +12,3 @@
 	return ( stricmp(cpname, ""utf-8""   ) == 0 ) ? CP_UTF8
 	     : ( stricmp(cpname, ""euc-kr""  ) == 0 ) ? CP_EUCKR
-		:
+	     :
}}}
It was to fix a whitespace typo where my editor put in two tabs instead of a tab and five spaces. Now, when I view the revision in the changeset view using 'tabular' mode, the + part of the diff is missing one space and the : is no longer aligned with the line above.

I did some tests with the generated html code, and the cause is the following snippet:
{{{ <span><ins>&nbsp; &nbsp; </ins> :</span> }}}
compare that to the html generated in this ticket view:
{{{ <span><ins>&nbsp; &nbsp; &nbsp;</ins>:</span> }}}

In the changeset view, trac generates the missing blank space outside of the <ins> segment, but that area is not pre-formatted and so the space is discarded by the browser. And even if it wasn't, it would still be colored wrong. What's also weird is the alternating chain of &nbsp; and spaces, instead of just &nbsp; packed together (is this filesize optimization?).

Note that the 'unified' mode does not suffer from this issue as it seems to be taking this off-by-one issue into account and compensating for it. PS: I believe this issue has existed for years."	theultramage <umage@…>
11439	"Git changeset ""Branches"" property should link to branch logs"	version control/changeset view	1.0	next-stable-1.6.x	enhancement	normal		new	2014-01-09T22:51:42+01:00	2023-09-23T22:33:10+02:00	"When viewing a Git changeset like [d19b3083d40b9237e8dbffa91dfa9f2f3b65e2ad/rjollos.git], the ""Branches"" property (showing the list of branches which contain this changeset) generates a link for each branch.  Currently, the generated link is a ""changeset"" view of the branch's tip, so (e.g.) clicking on ""trunk"" in that list will show you the most recent changeset on the ""trunk"" branch.

This seems confusing.  When I click on a branch in that list, seeing a changeset view makes me feel like I've lost my place in navigating around the repository.  (This is exacerbated by the fact that the URL in the address bar and the `<h1>` on the page both reference the SHA of the branch tip, and there's no visual indicator that I'm viewing a particular branch tip.)  

When I click on a branch in that list, I expect to go somewhere that contextualizes the branch somehow.  I think the ""log"" view for that branch is the most sensible place to land."	ethan.jucovy@…
12745	Changeset view with single revision which has many files is so slow	version control/changeset view		next-stable-1.6.x	enhancement	normal		new	2017-03-25T11:25:28+01:00	2023-09-23T22:33:10+02:00	"From [ticket:12545#comment:5]:
----
Changeset view with single revision which has many files is so slow caused by execution of `git ls-tree REV PATH` for each revision and file. I'd like to fix on 1.0-stable but it doesn't seem to be unable to fix without API changes."	Jun Omae
13083	Unified diff with contextall	version control/changeset view		undecided	enhancement	normal		new	2018-09-21T12:56:38+02:00	2018-09-26T15:04:45+02:00	"The changeset view (example 3: changeset:16824) allows to ""Show the changes in full context"" via `?contextall=1` (example 2: changeset:16824?contextall=1).

It also has a link to ""Download in other formats: Unified Diff"" (example 3: changeset:16824?format=diff&new=16824).

But combining these two features is not currently possible. On the ''example 2'' page the `contextall=1` parameter is not included in the Unified Diff link. 
And even if it is manually added it does not seem to have any effect (example 4: changeset:16824?format=diff&new=16824&contextall=1).

Would it be possible to make this work? This is very useful for people that prefer using an offline diff viewer tool."	anonymous
3694	Code coloring in diff	version control/changeset view	none	unscheduled	enhancement	minor		new	2006-09-10T12:23:14+02:00	2019-01-14T15:22:21+01:00	It would be great to have code source code highlightrd in Diff view.	anonymous
10531	Annotate in changeset diff view	version control/changeset view		unscheduled	enhancement	normal		new	2012-01-18T15:55:07+01:00	2023-04-20T08:02:38+02:00	"http://trac.edgewall.org/changeset?reponame=&new=10909%40trunk&old=10902%40trunk

I wonder if it is possible at all - show commit message in this view when mouse is over a green or a red piece of contents?"	anatoly techtonik <techtonik@…>
6424	Next/previous diff support	version control/changeset view		next-major-releases	enhancement	minor		new	2007-12-01T16:21:36+01:00	2015-05-26T20:50:57+02:00	"While stumbling upon a FishEye on a site I noticed the diff it generates has useful icons next to the diff sections that allow you to quickly jump between the sections in the diff.

This is related to #6423."	Jeroen Ruigrok van der Werven
6709	Extended 'view diff' feature does not update the browsing position	version control/changeset view	0.11b1	next-major-releases	enhancement	minor		new	2008-01-25T12:28:38+01:00	2015-05-26T20:50:57+02:00	"When a changeset is browsed (`/changeset/xxx`) and that the max size/file limit is reached, the changeset diff is not rendered: only the changeset log message and the list of modified files are rendered. This is the expected behaviour.

A handy feature is that each modified file appears in the list with a ""view diff"" clickable link. When such a link is selected, the diff of the file is rendered, again with the log message of the same changeset.

However the browser shows the regular diff page, without scrolling down to the actual diff section.

When the log message is a bit long, the user experience is a bit weird: it seems that the link led to the same page as the full changeset: the same long log message is rendered, and the selected diff does not appear in the browsing window. 

It would be nice to add an anchor to the diff section so that the browser directly jump to the actual diff, that is the info he selected from the changeset view.
"	Emmanuel Blot
9621	Display problem with side by side diff and ignore blank lines	version control/changeset view	0.13dev	next-major-releases	defect	minor		new	2010-09-15T15:31:50+02:00	2010-09-23T14:21:34+02:00	"Example: changeset:10046, view differences side by side, show the changes in full context, ignore blank lines.

After line 639 (which is removed in this changeset) the content becomes offset by 1 line. Further down the files get re-aligned because line 675 is repeated on the right.

Presumably this ought to be displayed in the same way as it would be without blank lines ignored, just without the blank line highlighted.
"	Dave Matthews
13101	Unified diff in git format?	version control/changeset view		next-major-releases	enhancement	minor		new	2018-11-06T12:52:25+01:00	2018-11-06T13:38:25+01:00	"Is the diff format of ""Download in other formats: Unified Diff"" in changeset view configurable?

I'm no expert on the various diff formats. wikipedia:Diff#Unified_format says:
> There are some modifications and extensions to the diff formats that are used and understood by certain programs and in certain contexts. For example, some revision control systems—such as Subversion—specify a version number, ""working copy"", or any other comment instead of or in addition to a timestamp in the diff's header section.
>
> Some tools allow diffs for several different files to be merged into one, using a header for each modified file that may look something like this:
> {{{
> Index: path/to/file.cpp
> }}}

Trac includes such `Index:` headers. Many tools (GNU `patch`, `hg import`, `git apply`) require a `-p0` switch to understand this.

It would be convenient if Trac could also create diffs in a different format that does not require remembering special switches.

[https://git-scm.com/docs/diff-format git diff-format] typically uses a different format(?) with `a/` / `b/` prefixes and ""extended header lines"".

[https://www.mercurial-scm.org/doc/hgrc.5.html#diff Mercurial] also supports ""git extended diff format""."	anonymous
1200	Provide syntax to link to file-differences from svn log messages	version control/changeset view	0.8	next-major-releases	enhancement	normal		new	2005-02-14T12:39:26+01:00	2015-05-26T20:50:57+02:00	It would be nice if there was a syntax for filenames in svn log messages, so that the filename in question becomes a link that jumps to the corresponding file in the diff.	arnarb@…
5170	max_diff_bytes should be honored even if only one file has changed	version control/changeset view	0.10.3.1	next-major-releases	enhancement	normal		new	2007-04-18T17:24:36+02:00	2016-10-13T10:27:55+02:00	"As mentioned in r2968, the `max_diff_bytes` rule is ignored if only one file has changed; the differences are then shown inline. This means that if we have lots of changes in one file only (such as often happens here with huge XML files saved by our software), they are shown directly in the main changeset view.

In find this problematic as I often like to review recent changes by using the ""previous changeset"" and ""next changeset"" links in the main changeset view. When encountering a change in one of our huge files, I sometimes have to wait several minutes as the browser tries to display the enormous diff. I still want the ability to view minor changes inline, but I want the `max_diff_bytes` rule to be followed regardless of the number of files that have changed (even just one). Of course, the big diffs should still be accessible through a link.

I will try to create a patch for this when time allows."	maz <mzizka@…>
5420	EOL changes hidden in changeset view	version control/changeset view	0.10.1	next-major-releases	defect	normal		new	2007-06-04T18:26:58+02:00	2021-08-27T03:29:48+02:00	"If a file's EOL format is changed in the file itself (not via a property change), the changeset does not list that file as changing.  Also, if there were other changes to the file, those are the only changes shown.

This is surprising and confusing behavior.

The current behavior is what I would expect in the ""ignore whitespace changes"" case, not in the default case."	Eli Carter
9946	CommitTicketUpdater does not honor wiki_format_messages setting	version control/changeset view	0.12.1	next-major-releases	defect	normal		new	2010-12-23T18:38:36+01:00	2014-02-21T05:58:10+01:00	"When the {{{[changset] wiki_format_messages}}} option is set to {{{false}}}, I would expect that the changset message that gets sent by email and that gets added as a comment to any referenced ticket(s) would be pre-formatted (i.e., not in wiki format).  However, this is not the case.

In looking at the code, it seems the option isn't even checked - line 195 of method {{{CommitTicketUpdater.make_ticket_comment()}}} in {{{tracopt/ticket/commit_updater.py}}}:
{{{
    def make_ticket_comment(self, repos, changeset):
        """"""Create the ticket comment from the changeset data.""""""
        revstring = str(changeset.rev)
        if repos.reponame:
            revstring += '/' + repos.reponame
        return """"""\
In [%s]:
{{{
#!CommitTicketReference repository=""%s"" revision=""%s""
%s
}}}"""""" % (revstring, repos.reponame, changeset.rev, changeset.message.strip())
}}}
"	guttman@…
10812	CSS conflict for .cp class in changeset view	version control/changeset view	1.0b1	next-stable-1.6.x	defect	minor		new	2012-08-14T16:02:19+02:00	2023-09-23T22:33:10+02:00	"If one has a #!cpp block in a changeset comment, then the Pygments highlighting can get disrupted by the CSS from diff.css, due to the reuse of the `.cp` class:
{{{#!css
.chglist .copy, #overview .cp, .diff .legend .cp { background: #88f }
}}}
(in diff.css, line 24)

{{{#!css
div.code pre .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
}}}
(in pygments/trac.css)

The result, a gray `#include ...` on a light blue background is barely readable...

The #overview .cp should at least be renamed .copy or even .trac-copy."	Christian Boos
6473	Negative revisions for changeset	version control/changeset view	devel	unscheduled	enhancement	minor		new	2007-12-10T18:27:33+01:00	2015-05-26T20:55:39+02:00	"We use a continuous integration server that tags successful builds, so the last revision against trunk is generally useless for seeing what actually changed.  A tiny change, and we can now view revisions using a negative counter, e.g., !http://ourserver.com/trac/Project/changeset/-1 now brings up !r1393 if !r1394 was current.

{{{
Index: svn_fs.py
===================================================================
--- svn_fs.py   (revision 6308)
+++ svn_fs.py   (working copy)
@@ -431,6 +431,8 @@
         else:
             try:
                 rev = int(rev)
+                if rev < 0:
+                    return rev + self.youngest_rev
                 if rev <= self.youngest_rev:
                     return rev
             except (ValueError, TypeError):
}}}"	tgmayfield@…
781	svn:log editing	version control/changeset view		next-major-releases	enhancement	normal		new	2004-09-25T21:56:16+02:00	2023-02-26T06:24:51+01:00	Would it be possible to use trac to edit svn:log properties?  It would be handy to be able to edit a change log to add more information if needed.	mortonda@…
4854	UI Wart: Log viewer navigation links should be duplicated at the bottom of the page	version control/log view	devel	next-major-releases	enhancement	minor		new	2007-02-26T23:08:55+01:00	2015-12-23T19:21:31+01:00	As the summary says. Generally you scroll down the page to see the changesets, then if you don't find the changeset you're after you have to scroll back up to move to the next set.	Alec Thomas
4160	Broken InterWiki Link	version control/log view	0.10	next-major-releases	defect	normal		new	2006-11-14T17:37:43+01:00	2015-05-26T20:50:57+02:00	"The following InterWiki link behaves strangely:

|| '''Syntax''' || '''Behavior''' ||
|| `[tps-t6:1234567]` || Displays as-is, not hyperlinked. ||
|| `[tps-t6:1234567 test]` || Displays `test` hyperlinked to a working URL. ||
|| `tps-t6:1234567` || Displays `tps-t6:1234567` hyperlinked to a working URL. ||

If I change the InterWiki link to tps instead of tps-t6, all of the above syntaxes generate a hyperlink to a working URL as expected.
"	jeff.wise@…
9775	implement get_path_history in the versioncontrol cache	version control/log view	0.12.1	next-major-releases	defect	normal		new	2010-11-05T10:08:57+01:00	2015-05-26T20:50:57+02:00	"While doing a GET operation on `/log/oppimappi`, Trac issued an internal error.

'''Steps to reproduce:'''
* Click ""Browse Source""
* Select a line with a git repository and click hex label in the ""Rev"" column (View Revision Log)
* Select ""Show only adds and deletes"" in ""Revision Log Mode:"" and hit ""Update""
* ""Trac detected an internal error:"" and ""NotImplementedError:"" (note that it seems that the error string is missing the end of error message)

I'd guess that this is caused by an unimplemented feature in TracGit. Notice that ""Stop on copy"" and ""Follow copies"" do not cause errors (though I guess, they don't do anything with TracGit because everything is labelled as ""Modified"").

I think the ""Summary"" for this ticket is bad but I'll leave it as is to make this issue easier to find from the ""Internal Error""'s ""search for similar issues"" link.

The string ""oppimappi"" is the repository name in my trac environment.

Request parameters:
{{{
{'action': u'stop_on_copy',
 'limit': u'100',
 'mode': u'path_history',
 'path': u'/oppimappi',
 'rev': u'f55567eb3a36f3189e3212678aedf5cfd7e0d0c2',
 'stop_rev': u''}
}}}

User agent: `Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/10.04 (lucid) Firefox/3.6.12`

==== System Information ====
|| '''`Trac`''' || `0.12.1` ||
|| '''`Babel`''' || `0.9.5` ||
|| '''`Genshi`''' || `0.6` ||
|| '''`GIT`''' || `1.7.0.4` ||
|| '''`pysqlite`''' || `2.4.1` ||
|| '''`Python`''' || `2.6.5 (r265:79063, Apr 16 2010, 13:09:56) ` [[br]] `[GCC 4.4.3]` ||
|| '''`RPC`''' || `1.1.0-r9360` ||
|| '''`setuptools`''' || `0.6` ||
|| '''`SQLite`''' || `3.6.22` ||
|| '''`Subversion`''' || `1.6.6 (r40053)` ||
|| '''`jQuery`''' || `1.4.2` ||

==== Enabled Plugins ====
|| '''`TracGit`''' || `0.12.0.5dev` ||
|| '''`TracXMLRPC`''' || `1.1.0-r9360` ||

==== Python Traceback ====
{{{
Traceback (most recent call last):
  File ""/usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/trac/web/main.py"", line 511, in _dispatch_request
    dispatcher.dispatch(req)
  File ""/usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/trac/web/main.py"", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File ""/usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/trac/versioncontrol/web_ui/log.py"", line 163, in process_request
    for old_path, old_rev, old_chg in history():
  File ""/usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/trac/versioncontrol/web_ui/log.py"", line 119, in history
    for h in repos.get_path_history(path, rev):
  File ""/usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/trac/versioncontrol/cache.py"", line 386, in get_path_history
    limit)
  File ""/usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/trac/versioncontrol/api.py"", line 888, in get_path_history
    raise NotImplementedError
NotImplementedError
}}}
"	Mikko Rantalainen <mikko.rantalainen@…>
9868	Impossible to see the changelog of a branch using Mercurial	version control/log view		next-major-releases	defect	normal		new	2010-11-24T21:37:43+01:00	2011-04-18T02:16:55+02:00	"Using Mercurial Plugin:
 * browse source
 * select a branch
 * go to revision log

Due to the nature of how it is implemented, it only shows in the first row the tip of such branch and the rest of revisions belongs to all branches. "	Ismael de Esteban <ismael@…>
10317	log?rev=N&stop_rev=N-1&limit=2 only shows a single revision, but should show two revisions	version control/log view	0.11.7	next-major-releases	defect	normal		new	2011-08-17T18:40:12+02:00	2015-08-05T10:45:04+02:00	"To reproduce:

* Go to http://trac.edgewall.org/log/trunk?rev=10769&stop_rev=10768&limit=2

Only a single revision is shown. If you instead go to either of these URLs:

* http://trac.edgewall.org/log/trunk?rev=10769&stop_rev=10768&limit=3
* http://trac.edgewall.org/log/trunk?rev=10769&limit=2

…two revisions are shown.

Since ""limit"" corresponds to the ""Show at most N revisions per page"" form field, it seems like limit=2 should allow 2 revisions to be shown, even when combined with rev and stop_rev."	adam@…
10682	Show the path of changesets in log view	version control/log view		next-major-releases	enhancement	normal		new	2012-04-30T16:41:08+02:00	2015-05-26T20:50:57+02:00	"Would be great if the path of the changed file is visible in the log view. If multiple files were changed, the highest common path of all changed files should be showed.

I know this feature from WebSVN and it's very helpful to survey which parts of the project were actually changed."	anonymous
6002	[PATCH] Adds an options to customize the default history mode	version control/log view	devel	next-stable-1.6.x	enhancement	normal		new	2007-09-10T19:21:09+02:00	2023-09-23T22:33:10+02:00	"I often uses ""Follow copies"" mode in revision log view.
But trac requires 2 clicks to change mode.

I always want to use my trac in follow_copy mode.

The attached patch (against r6000) adds ""default_copy_mode"" and ""default_verbose""
options to trac.ini."	miyamuko@…
12422	Highlight specified changesets in Revision Log	version control/log view			enhancement	normal		new	2016-03-29T10:00:33+02:00	2016-03-29T10:00:33+02:00	"[[TracLinks#VersionControlrelatedlinks|TracLinks]] allows to highlight an arbitrary set of lines for `source:` links:
> `source:/some/file@123:10-20,100,103#L99` - highlight lines 10 to 20, and lines 100 and 103, and target line 99 

(This turns into a `?marks=` parameter, so source:trunk/COPYING@:8 can also be written as source:trunk/COPYING?marks=8)

It would be nice if there was a similar feature for `log:` links, where an arbitrary set of changesets would be highlighted (while still displaying them in context of the other unhighlighted changesets).

For example log:rjollos.git@68feb63e?marks=fc1db222 could display the log as it does now, but highlight the line of changeset `fc1db222`. This would be very useful for discussions, code review etc.

(Adding a special abbreviation syntax for `?marks=` like `@:` seems more difficult, but is not needed.)"	anonymous
1445	[ER] Revision Graph for the Version Control Browser	version control/log view	devel	next-major-releases	enhancement	normal		new	2005-04-18T13:36:32+02:00	2018-10-11T09:05:12+02:00	"== The Revision Graph ==

The revision log shows you only the ''copy from'' information.
That's also all you can get from the `svn` command line tool.

There's no easy way to find out the ''copy to'' information:
how many times and where a given path (say the `/trunk`) 
has been copied.

The TortoiseSVN client provides this feature in a graphical form
(see [http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-revgraph.html TortoiseSVN revision graph]),
and I think Trac should provide that information as well, though possibly not graphically.

== Additional Features ==

 * support for diffing between 2 arbitrary revisions picked
   from the graph 
 * optional support for graphical representation of the revision graph
"	Christian Boos
4760	"""Newer revisions"" link"	version control/log view	devel	next-major-releases	enhancement	normal		new	2007-02-16T08:17:31+01:00	2015-05-26T20:50:57+02:00	"can we have a link ""Newer revisions"" (similar to ""Older revisions"")
in the Revision log browser?

Thanks"	Sergei Haller <sergei@…>
