1

I'm trying to trigger mailer.py as a post-commit, for code committed to a specific sub-folder e.g. My hierarchy is svn/trunk/gui, "trunk" is the repo. and gui is a sub folder, and I want to limit mailer.py for commits to "gui" only.

I tried to look at mailer.py code, but I haven't found the variable that point to the commit sub folder.

Any help would be appreciated, thanks!

BlackBeret
  • 11
  • 1

1 Answers1

0

The path is passed to the mailer.py by the first command line argument.

REPOS="$1" REV="$2"

mailer.py commit "$REPOS" "$REV" /path/to/mailer.conf

This parameter is then retrieved in the main function of the mailer.py:

def main(pool, cmd, config_fname, *repos_dir*, cmd_args):

BenMorel
  • 34,448
  • 50
  • 182
  • 322
TonySalimi
  • 8,257
  • 4
  • 33
  • 62
  • Thanks. repos_dir contains the repo. path, but doesn't contain the sub folder name. in my case it contains "trunk" but not "gui". I'm looking for the var that contains the sub folder name. – BlackBeret Nov 14 '11 at 13:17