2

How to set up links to the revision ?

I enter [revision_number], rRevision_number, and take an error:

No default repository defined

I found a solution to the Internet

1) give the name for the repository - "default"

2) create a folder (hooks) in trac project

3) create a file "post-commit" in /hooks

post-commit content:

trac-admin $ENV changeset added "default" $REV

But it still does not work. what could be wrong?

Micha
  • 5,117
  • 8
  • 34
  • 47
Andrei
  • 1,125
  • 2
  • 15
  • 29

2 Answers2

6

Using Trac-1.0.1 I have multiple repositories one can see at http:////admin/versioncontrol/repository in the web interface (with TRAC_ADMIN permissions).

Then I set an alias called (default) to one of them (also on that admin page). That should be enough.

Maybe call a resync additionally.

falkb
  • 1,294
  • 11
  • 35
0

This is specified in the documentation:

Basically the default project is the one with no name, so you just need to specify an alias with an empty name. This can be done in trac.ini, via trac-admin, or the UI. Here's the example from the Trac docs to set it via trac.ini:

[repositories]
project.dir = /var/repos/project
project.description = This is the ''main'' project repository.
project.type = svn
project.url = http://example.com/svn/project
project.hidden = true

lib.dir = /var/repos/lib
lib.description = This is the secondary library code.
lib.type = svn
lib.url = http://example.com/svn/lib

.alias = project    ### <<< THIS SPECIFIES THAT 'project' IS THE DEFAULT REPO 

According to the docs: Alternatively, the name "(default)" can be used instead of the empty name.

codesniffer
  • 1,033
  • 9
  • 22