Recovering from failed commits in Git and Gitweb

If a Git commit fails to create a specified link to a Rational Team Concert™ work item, this information is recorded in a log file on the Git server. As an administrator, you can use the reprocess.pl command to reprocess these commits to create the link.

Use these steps to reprocess the commit operation. You must have administrator privileges:

  1. Examine the log file for failed commits. The file is in the <shared_git_repo_root>/hooks/rtchookreprocess directory. File names are of the form yyyymmdd-hh-mmssmicros-n.log, where yyyymmdd-hh-mmssmicros is a time stamp and n is the number of times commit processing failed. The number 1 indicates that it failed once in the hook. A higher number means one or more attempts at reprocessing also failed.
  2. From a command prompt, in the shared_git_repo_root/hooks directory, type perl reprocess.pl. The command reads the logs and reprocesses the commits. If any errors persist, new log files are created. The old log files are removed.

Sample log files

If the hook failure occurs before the commit message processing completes, the log file contains all the parameters that are passed to the hook. Reprocessing includes analyzing the commit messages. Each Git reference that is passed to the hook is on a separate line and the fields (the hook parameters are one field) are tab delimited.

Sample log file for a commit that fails before commit message processing completes.

If the hook failure occurs after the commit message processing completes, the log file identifies the target work item and the Rational® Team Concert project name or hook-configured abbreviation, if known. Each commit is on a separate line and the fields are tab delimited.

Sample log file for a commit that fails after message processing is complete.


Feedback