0

How can I tell Trac about newly-added Git branches? Since talk about Git can get confusing quickly, here's a concrete example: Suppose I have a "central" Git server, foo.example.com, which my Trac installation exports, and on some host I:

$ git clone git@foo.example.com:/path/to/repo.git
$ cd repo
$ git checkout -b test_branch
$ git push -u origin test_branch

I now have a new branch on the central server called "test_branch", yet this is not accessible from Trac. How can I 1) make it accessible (e.g. under the "Visit" drop-down box) and 2) make this happen automatically for any new branch?

Update: Maybe I should mention that the repository exported by Trac is not "the" central repo. It's owned by another user and currently the webserver user doesn't have access. Instead there's a separate repo owned by and exported by the web server user. Both the central repo and the web server happen to be on the same machine, though.

STNBU

Captain Midday
  • 659
  • 8
  • 18

1 Answers1

0

Read about Trac repository administration in the authoritative wiki documentation.

There is certainly no such thing like auto-discovery for repositories in a give path. You could use trac-admin calls from a terminal to add new repositories, if you dislike doing it via admin web-UI. And make sure to get repository synchronization right for every repository as well.

If this is a repeating task, you may want to write a simple Python script to do it all more efficiently.

hasienda
  • 2,390
  • 1
  • 13
  • 16
  • I should have remarked long ago: Since this is the server on which the "central" repo is posted, I just gave Trac read access to the actual repo-in-question and it all just works. No need for any commit hooks. All the branches are there, etc. Pretty obvious in retrospect. Your response was on the mark, though. – Captain Midday Apr 10 '13 at 03:17