SVN Checkout with @version $Id$ set

2019-03-05 06:21发布

问题:

I develop in Subversion, and at the top of each and every PHP file I have the following comment block;

<?php 

if(!defined('BASEPATH')) die('Direct Script Access is not allowed.');

/**
 * Project Name
 *
 * @author Sheldon Lendrum
 * @version $Id$
 * @copyright __MyCompanyName__, 29 January, 2011
 * @package default
 **/

What I would like to do is when exporting it( or even checking out on the main server, to set that $Id$ of the current head ?

I use Subversion on OSX and Debian for my primary web servers.

回答1:

You need to set the svn:keywords property on your files in your repository.

Check out keyword documentation from the subversion book.

Other Stack Overflow questions you might find useful:

  • Fill @version tag with subversion in Eclipse
  • How to use custom keywords in SVN


标签: php svn version