Import a Snapshot of the Latest Heads into AccuRev

Note: This section is for system administrators only.
If you do not care about capturing the repo history, the process can be as simple as making a copy of the repository under the GitCentric repo storage directory. The next time you restart the GitCentric server, the repo will be visible through the GitCentric GUI.

To import a repository and just capture its current state:

  1. Create a copy of the repo in your GitCentric repository home.
    cd <gc_repo_home> (For example, /home/<gc_installer>/AccuRevGitCentric/site/git)
    cp -r <orig_repo>/<new_repo_name>
  2. Restart the GitCentric server. You have two options to accomplish this:
    1. Stopping and restarting the Tomcat web server:
      cd <ac_home>/WebUI/tomcat/bin
      Note: Make sure that the user starting Tomcat web server has write access to the logs, temp, webapps, and work directories in <ac_home>/WebUI/tomcat. This user should have read access to all other Tomcat web server directories and files.
    2. Flushing the cache with an SSH command (entered on a single line):
      ssh -p 29418 <username>@<gc_server> gerrit flush-caches --cache projects --cache project_list
  3. Configure the repository through GitCentric and allow users to clone it as necessary as described in the other sections of this chapter.