2013-04-02 17:49 UTC+0200 Viktor Szakats (harbour syenar.net)

+ bin/check.hb
    + new source verifier. Able to all documented (and more)
      required text file and filename properties.

  * bin/commit.hb
    + added feature to verify all files to be committed to
      conform with certain naming and text file content rules
    + added some more feedback

  * config/postinst.hb
    + include commit.hb and check.hb in 'install'

  * include/extend.h
  * contrib/hbcairo/paths.c
  * contrib/hbcairo/png.c
  * contrib/hbcairo/util.c
  * contrib/hbtpathy/readme.txt
  * tests/harbour.ini
  * tests/parseins.ini
    ! multiple EOL at EOF

  * contrib/hbhpdf/tests/files/cp932.txt
  * contrib/hbhpdf/tests/files/cp936.txt
  * contrib/hbhpdf/tests/files/elic_jp.txt
    ! line ending spaces
    ! missing EOL at EOF

  * contrib/hbhttpd/tests/tpl/app/account/edit.tpl
  * contrib/hbhttpd/tests/tpl/app/login.tpl
  * contrib/hbhttpd/tests/tpl/app/logout.tpl
  * contrib/hbhttpd/tests/tpl/app/main.tpl
  * contrib/hbhttpd/tests/tpl/app/register.tpl
  * lib/3rd/win/bcc/unicows_license.txt
  * lib/3rd/win/mingw/libunicows_license.txt
    ! missing EOL at EOF

  * COPYING.txt
  * src/rtl/gtcrs/hb-charmap.def
  * tests/big5_gen.prg
    ! tabs

  * extras/gfspell/spell.prg
  * src/rtl/gtwin/gtwin.c
    ! ASCII 127

  * src/codepage/cp_tpl.c
    ! converted to UTF-8 (just guessing what the original CP was)

  * src/pp/hbpp.c
    ! do not generate SVN header in hbverbld.h
    + avoid SVN header string in source as is to miss matched
      in source verifier

  * src/vm/extrap.c
    ! do not generate whitespace at EOL in output

  * tests/lang2po.hb
  * tests/po2lang.hb
    + minor improvements
    ! fixed to generate consistent EOL

  * bin/3rdpatch.hb
    * newline at top deleted

  * extras/hbdoc/hbdoc.hbp
  * extras/hbdoc/hbdoc.prg
  * extras/hbdoc/_tmplates.prg -> extras/hbdoc/_tmplate.prg
  * contrib/hbcairo/tests/lightning.prg -> contrib/hbcairo/tests/lightnin.prg
    ! long filename

  * .gitattributes
  * extras/guestbk/guestbk.prg
  * extras/guestbk/guestbk.txt
  * extras/guestbk/guestbk.htm -> extras/guestbk/guestbk.html
    * deleted .htm file, now all HTML has extension .html
    * .exe references in doc made OS neutral
    ; Can only be used on non-MS-DOS systems, so it's okay
This commit is contained in:
Viktor Szakats
2013-04-02 17:50:36 +02:00
parent 77594dd2d6
commit b9d69aa3f5
40 changed files with 662 additions and 175 deletions

View File

@@ -1,3 +1,4 @@
#!/usr/bin/hbmk2
/*
* Harbour Project source code:
* Commit preparer
@@ -33,7 +34,8 @@ PROCEDURE Main()
LOCAL cVCS := VCSDetect()
LOCAL aChanges := DoctorChanges( cVCS, Changes( cVCS ) )
LOCAL aFiles := {}
LOCAL aChanges := DoctorChanges( cVCS, Changes( cVCS ), aFiles )
LOCAL cLog
LOCAL cLogNew
LOCAL cLine
@@ -45,7 +47,7 @@ PROCEDURE Main()
LOCAL cLogName
IF Empty( aChanges )
OutStd( hb_ProgName() + ": no changes" + hb_eol() )
OutStd( hb_ProgName() + ": " + "no changes" + hb_eol() )
RETURN
ENDIF
@@ -80,28 +82,35 @@ PROCEDURE Main()
IF ! hb_FileExists( cLogName := "ChangeLog.txt" )
IF ! hb_FileExists( cLogName := "ChangeLog" )
OutStd( hb_ProgName() + ": can't find ChangeLog file" + hb_eol() )
OutStd( hb_ProgName() + ": " + "can't find ChangeLog file" + hb_eol() )
RETURN
ENDIF
ENDIF
cLog := MemoRead( cLogName )
cOldLang := hb_cdpSelect( "EN" )
cHit := hb_AtX( "\n[1-2][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9] [0-2][0-9]:[0-5][0-9] UTC[\-+][0-1][0-9][0-5][0-9] ", cLog )
IF Empty( cHit )
cHit := ""
ENDIF
hb_cdpSelect( cOldLang )
IF CheckFileList( aFiles )
nPos := At( AllTrim( cHit ), cLog )
IF nPos > 0
cLog := Left( cLog, nPos - 1 ) + cLogNew + hb_eol() + SubStr( cLog, nPos )
cLog := MemoRead( cLogName )
cOldLang := hb_cdpSelect( "EN" )
cHit := hb_AtX( "\n[1-2][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9] [0-2][0-9]:[0-5][0-9] UTC[\-+][0-1][0-9][0-5][0-9] ", cLog )
IF Empty( cHit )
cHit := ""
ENDIF
hb_cdpSelect( cOldLang )
nPos := At( AllTrim( cHit ), cLog )
IF nPos > 0
cLog := Left( cLog, nPos - 1 ) + cLogNew + hb_eol() + SubStr( cLog, nPos )
ELSE
cLog += hb_eol() + cLogNew
ENDIF
hb_MemoWrit( cLogName, cLog )
OutStd( hb_ProgName() + ": " + hb_StrFormat( "Edit %1$s and commit", cLogName ) + hb_eol() )
ELSE
cLog += hb_eol() + cLogNew
OutStd( hb_ProgName() + ": " + "Please correct errors listed above and re-run" + hb_eol() )
ENDIF
hb_MemoWrit( cLogName, cLog )
RETURN
STATIC FUNCTION VCSDetect()
@@ -113,7 +122,7 @@ STATIC FUNCTION VCSDetect()
RETURN ""
STATIC FUNCTION DoctorChanges( cVCS, aChanges )
STATIC FUNCTION DoctorChanges( cVCS, aChanges, aFiles )
LOCAL cLine
LOCAL cStart
@@ -146,6 +155,7 @@ STATIC FUNCTION DoctorChanges( cVCS, aChanges )
ENDSWITCH
IF ! Empty( cStart )
AAdd( aNew, " " + cStart + " " + StrTran( SubStr( cLine, 8 + 1 ), "\", "/" ) )
AAdd( aFiles, SubStr( cLine, 8 + 1 ) )
ENDIF
ENDIF
NEXT
@@ -181,6 +191,7 @@ STATIC FUNCTION DoctorChanges( cVCS, aChanges )
ENDSWITCH
IF ! Empty( cStart )
AAdd( aNew, " " + cStart + " " + StrTran( SubStr( cLine, 3 + 1 ), "\", "/" ) )
AAdd( aFiles, SubStr( cLine, 3 + 1 ) )
ENDIF
ENDIF
NEXT
@@ -239,3 +250,5 @@ STATIC FUNCTION GitUser()
RETURN hb_StrFormat( "%s (%s)", ;
AllTrim( hb_StrReplace( cName, Chr( 10 ) + Chr( 13 ), "" ) ), ;
StrTran( AllTrim( hb_StrReplace( cEMail, Chr( 10 ) + Chr( 13 ), "" ) ), "@", " " ) )
#include "check.hb"