Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8101413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:58:33+00:00 2026-06-05T22:58:33+00:00

So I have trac installed with the trac-git plugin on Bitnami trac stack on

  • 0

So I have trac installed with the trac-git plugin on Bitnami trac stack on windows. All is working fine however whenever I commit to my git repo I have to open use_trac.bat and then call trac-admin ProjectName repository resync before I can see the changes in trac.

Now what I want to do is call this line in the post-receive hook of the repository but I’m struggling with how to call this from a bat file.

Anyone have any ideas how I can do this?

EDIT:
So far I have this in my post-receive

echo "Resync repo"
"C:/path/to/repos/resync_git.bat"

Calling this bat file I wrote manually works but this isn’t calling. I wonder if its because the hook isn’t setup right for win?

Here’s the contents of that file:

@echo off
CALL "C:\PROGRA~1\Trac\scripts\setenv.bat"
cd "C:\Program Files\Trac"
START "BitNami Trac Stack Environment" cmd
trac-admin C:/path/to/project changeset added "prjname"

I may use trac-admin C:/path/to/project repository resync "prjname" here later…

This is what happens when that calls:

remote: Resync repo
remote: ./resync_git.bat: line 1: @echo: command not found
remote: ./resync_git.bat: line 2: CALL: command not found
remote: ./resync_git.bat: line 5: trac-admin: command not found
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:58:34+00:00Added an answer on June 5, 2026 at 10:58 pm

    For one thing, the slashes in your pathname are backwards for a Windows system. That’s probably not enough to derail the script, though.

    When I’ve had issues with hook scripts failing but working when run manually, it’s often come down to one of two things: what the script sees as the “current working directory” at the time it’s executed, and the user account under which the script runs. You can solve the first problem by using absolute paths inside the script or by explicitly changing to a specific directory as the first line of the script. The second problem can be a bit trickier. Sometimes it’s caused by permissions issues, and sometimes it’s caused by the script running as a user that has a different PATH.

    Either way, you need some more debugging information in order to figure out exactly what’s going on here. In the command that launches the script, redirect stdout and stderr to log files so that you can capture any relevant output. Add the result into your question and I should be able to give you a more specific answer.

    Another possibility worth trying is to eliminate the extra .bat file and simply place the ‘trac-admin’ call directly into the hook script.

    Are you certain that your post-commit hook is running at all? Try adding a command like “echo [%TIME%] Hook script running >>C:\test.txt” to the top of the hook script and verify that something actually gets logged. If not, then git might not be seeing your hook script at all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have trac installed and running great using apache2 and mod_wsgi. However when ever
Can I have two AuthUserFile directives in an apache2/sites-enabled/000-default configuration file? <Location /repo/trac> AuthType
I just installed trac for this project I'm working on, since it's turned out
I have a system with windows server 2008 , Apache httpd 2.2 and trac
Is there a trac plugin for automatically closing tickets that have remained open for
I have got python2.6 installed on my windows machine. tried to install twisted package
Hey all, I have the following setup in my webroot: /issues (Trac install) /myapp
I have read all over the place how WordPress is only capable of working
I want to list all components we have in our trac system on a
FYI: all work can be seen in the trac repo @ http://matthewh.me/scripts/browser/c/shared_library?order=name The original

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.