diff --git a/ChangeLog.txt b/ChangeLog.txt index e80f9fbe5f..015654646e 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,15 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-03-15 15:47 UTC+0100 Viktor Szakats (harbour syenar.net) + * src/pp/hbpp.c + * fall-back to revision 0 if there is no numeric + revision information in ChangeLog header (for Git) + Revision is useful, so maybe we should go with one + formed from date/time: YYMMDDhhmm -> '130315.1547' + this is quite universal and has some advantages over + sequential nr. + 2013-03-15 15:17 UTC+0100 Viktor Szakats (harbour syenar.net) * doc/howtorep.txt - deleted section dealing with svn IDs and svn props. diff --git a/src/pp/hbpp.c b/src/pp/hbpp.c index 4db212cfc3..dec8b8e5a8 100644 --- a/src/pp/hbpp.c +++ b/src/pp/hbpp.c @@ -355,8 +355,7 @@ static int hb_pp_generateVerInfo( char * szVerFile, int iSVNID, char * szChangeL " * and is covered by the same license as Harbour PP\n" " */\n\n" ); - if( iSVNID ) - fprintf( fout, "\n#define HB_VER_REVID %d\n", iSVNID ); + fprintf( fout, "\n#define HB_VER_REVID %d\n", iSVNID ); if( szChangeLogID ) { @@ -611,19 +610,10 @@ static int hb_pp_parseChangelog( PHB_PP_STATE pState, const char * pszFileName, } *piSVNID = szFrom ? ( int ) hb_strValInt( szFrom, &iLen ) : 0; - if( *piSVNID ) - { - hb_pp_addDefine( pState, "HB_VER_REVID", szFrom ); + hb_pp_addDefine( pState, "HB_VER_REVID", szFrom ? szFrom : "0" ); #ifdef HB_LEGACY_LEVEL4 - hb_pp_addDefine( pState, "HB_VER_SVNID", szFrom ); + hb_pp_addDefine( pState, "HB_VER_SVNID", szFrom ? szFrom : "0" ); #endif - } - else - { - if( iQuiet < 2 ) - fprintf( stderr, "Unrecognized Id entry in the %s file.\n", pszFileName ); - iResult = 1; - } } }