From 1b1882018d92cb83517f61dd8583c8b53cbd1b8a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 5 Jun 2012 12:17:58 +0000 Subject: [PATCH] 2012-06-05 14:17 UTC+0200 Viktor Szakats (harbour syenar.net) * utils/hbmk2/hbmk2.prg + added extra protection to not delete the VCS revision information when it already exist but current VCS revision extraction command didn't return any results. This often happens with new SVN 1.7.5, which fails with internal sqlite error nearly always unless 'svn cleanup' is issued. --- harbour/ChangeLog | 8 ++++++++ harbour/utils/hbmk2/hbmk2.prg | 8 ++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5320beaccc..9e00d9713e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,14 @@ The license applies to all entries newer than 2009-04-28. */ +2012-06-05 14:17 UTC+0200 Viktor Szakats (harbour syenar.net) + * utils/hbmk2/hbmk2.prg + + added extra protection to not delete the VCS revision + information when it already exist but current VCS revision + extraction command didn't return any results. This often + happens with new SVN 1.7.5, which fails with internal sqlite + error nearly always unless 'svn cleanup' is issued. + 2012-06-05 11:52 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/hbqt/qtgui/hbqt_errorsys.prg ! HB_ISCHAR() -> HB_ISSTRING(). Never use HB_ISCHAR() in diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 7a3f465f92..fe083bd0f5 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -5112,8 +5112,12 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel ) tmp := "/* Automatically generated by hbmk2. Do not edit. */" + Chr( 10 ) +; "#define _HBMK_VCS_TYPE_ " + '"' + tmp2 + '"' + Chr( 10 ) +; "#define _HBMK_VCS_ID_ " + '"' + tmp1 + '"' + Chr( 10 ) - /* Update only if something changed to trigger rebuild only if really needed */ - IF hbmk[ _HBMK_lREBUILD ] .OR. !( hb_MemoRead( l_cVCSHEAD ) == tmp ) + /* Update only if something changed to trigger rebuild only if really needed. + Do not update if the VCS header is already present, but currently extracted + VCS information is empty (this is sign of extraction command failure). */ + tmp2 := hb_MemoRead( l_cVCSHEAD ) + IF ( Empty( tmp2 ) .OR. ! Empty( tmp1 ) ) .AND. ; + ( hbmk[ _HBMK_lREBUILD ] .OR. !( tmp2 == tmp ) ) IF hbmk[ _HBMK_lInfo ] hbmk_OutStd( hbmk, hb_StrFormat( I_( "Creating VCS header: %1$s" ), l_cVCSHEAD ) ) ENDIF