2012-10-07 23:38 UTC+0200 Viktor Szakats (vszakats syenar.net)

* doc/Makefile
  - doc/howtosvn.txt
  + doc/howtorep.txt
  * NEWS
  * website/news1.html
    * renamed to neutral name

  * .gitignore
    - deleted .svn

  * bin/commit.hb
    + added support for git

  * config/global.mk
    + added support for git (commented)

  * contrib/hbpost.hbm
    * avoid the word SVN
This commit is contained in:
Viktor Szakats
2012-10-07 21:39:53 +00:00
parent 9d167e87a4
commit f247467d11
9 changed files with 127 additions and 38 deletions

3
harbour/.gitignore vendored
View File

@@ -1,6 +1,3 @@
# legacy
.svn
# build generated files
/include/hbverbld.h
*.hbl

View File

@@ -16,6 +16,26 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-10-07 23:38 UTC+0200 Viktor Szakats (vszakats syenar.net)
* doc/Makefile
- doc/howtosvn.txt
+ doc/howtorep.txt
* NEWS
* website/news1.html
* renamed to neutral name
* .gitignore
- deleted .svn
* bin/commit.hb
+ added support for git
* config/global.mk
+ added support for git (commented)
* contrib/hbpost.hbm
* avoid the word SVN
2012-10-07 22:56 UTC+0200 Viktor Szakats (harbour syenar.net)
* src/common/hbverdsp.c
! fix to previous commit

View File

@@ -861,7 +861,7 @@ Version 1.0.0 rc1 (2008-06-04) tag: 1.0.0rc1
General
=============================
- The SourceForge repository was moved from CVS to SVN
- added docs/howtosvn.txt
- added docs/howtorep.txt
- changed pack_src.sh to extract list of files from local SVN copy using
SVN commands
- improved CYGWIN compatibility

View File

@@ -35,7 +35,9 @@
PROCEDURE Main()
LOCAL aChanges := DoctorChanges( Changes() )
LOCAL cVCS := VCSDetect()
LOCAL aChanges := DoctorChanges( cVCS, Changes( cVCS ) )
LOCAL cLog
LOCAL cLogNew
LOCAL cLine
@@ -88,44 +90,110 @@ PROCEDURE Main()
RETURN
STATIC FUNCTION DoctorChanges( aChanges )
STATIC FUNCTION VCSDetect()
DO CASE
CASE hb_DirExists( ".svn" ) ; RETURN "svn"
CASE hb_DirExists( ".." + hb_ps() + ".git" ) ; RETURN "git"
ENDCASE
RETURN ""
STATIC FUNCTION DoctorChanges( cVCS, aChanges )
LOCAL cLine
LOCAL cStart
LOCAL aNew := {}
ASort( aChanges,,, {| x, y | x < y } )
FOR EACH cLine IN aChanges
IF ! Empty( cLine ) .AND. SubStr( cLine, 8, 1 ) == " "
cStart := Left( cLine, 1 )
SWITCH cStart
CASE "M"
CASE " " /* modified props */
cStart := "*"
EXIT
CASE "A"
cStart := "+"
EXIT
CASE "D"
cStart := "-"
EXIT
CASE "X"
cStart := ""
EXIT
OTHERWISE
cStart := "?"
ENDSWITCH
IF ! Empty( cStart )
AAdd( aNew, " " + cStart + " " + StrTran( SubStr( cLine, 8 + 1 ), "\", "/" ) )
DO CASE
CASE cVCS == "svn"
FOR EACH cLine IN aChanges
IF ! Empty( cLine ) .AND. SubStr( cLine, 8, 1 ) == " "
cStart := Left( cLine, 1 )
SWITCH cStart
CASE "M"
CASE " " /* modified props */
cStart := "*"
EXIT
CASE "A"
cStart := "+"
EXIT
CASE "D"
cStart := "-"
EXIT
CASE "X"
cStart := ""
EXIT
OTHERWISE
cStart := "?"
ENDSWITCH
IF ! Empty( cStart )
AAdd( aNew, " " + cStart + " " + StrTran( SubStr( cLine, 8 + 1 ), "\", "/" ) )
ENDIF
ENDIF
ENDIF
NEXT
NEXT
CASE cVCS == "git"
FOR EACH cLine IN aChanges
IF ! Empty( cLine ) .AND. SubStr( cLine, 3, 1 ) == " "
cStart := Left( cLine, 1 )
SWITCH cStart
CASE " "
CASE "?"
cStart := ""
EXIT
CASE "M"
CASE "R"
CASE "U"
cStart := "*"
EXIT
CASE "A"
CASE "C"
cStart := "+"
EXIT
CASE "D"
cStart := "-"
EXIT
OTHERWISE
cStart := "?"
ENDSWITCH
IF ! Empty( cStart )
AAdd( aNew, " " + cStart + " " + StrTran( SubStr( cLine, 3 + 1 ), "\", "/" ) )
ENDIF
ENDIF
NEXT
ENDCASE
RETURN aNew
STATIC FUNCTION Changes()
LOCAL cStdOut
hb_processRun( "svn status -q",, @cStdOut )
STATIC FUNCTION Shell()
LOCAL cShell
#if defined( __PLATFORM__UNIX )
cShell := hb_GetEnv( "SHELL" )
#else
cShell := hb_GetEnv( "COMSPEC" )
#endif
IF ! Empty( cShell )
#if defined( __PLATFORM__WINDOWS ) .OR. defined( __PLATFORM__DOS )
cShell := cShell + " /c"
#endif
ENDIF
RETURN cShell
STATIC FUNCTION Changes( cVCS )
LOCAL cStdOut := ""
DO CASE
CASE cVCS == "svn" ; hb_processRun( Shell() + " " + "svn status -q",, @cStdOut )
CASE cVCS == "git" ; hb_processRun( Shell() + " " + "git status -s",, @cStdOut )
ENDCASE
RETURN hb_ATokens( StrTran( cStdOut, Chr( 13 ) ), Chr( 10 ) )

View File

@@ -1729,6 +1729,10 @@ ifeq ($(HB_INIT_DONE),)
endif
$(info ! REVISION: $(_tmp))
endif
# ifneq ($(call find_in_path,git),)
# _tmp := $(shell git rev-parse --short HEAD)
# $(info ! REVISION: $(_tmp))
# endif
endif
endif

View File

@@ -2,7 +2,7 @@
# $Id$
#
# These are mandatory in Harbour SVN, they will always
# These are mandatory inside Harbour repository, they will always
# override project options.
"{HB_BUILD_PARTS='lib'&!hblib}-stop=! Skipped because HB_BUILD_PARTS=lib"

View File

@@ -18,7 +18,7 @@ DOC_FILES := \
gtapi.txt \
hdr_tpl.txt \
howtorel.txt \
howtosvn.txt \
howtorep.txt \
inet.txt \
locks.txt \
pcode.txt \

View File

@@ -2,8 +2,8 @@
* $Id$
*/
HOW TO USE THE SVN
------------------
HOW TO USE THE SOURCE REPOSITORY
--------------------------------
First and if your OS doesn't have it by default, download
the client from this link:

View File

@@ -237,7 +237,7 @@ ul {
<span class="title">General</span><br />
</li>
<li><font>The SourceForge repository was moved from CVS to SVN</font></li>
<li><font>added docs/howtosvn.txt</font></li>
<li><font>added docs/howtorep.txt</font></li>
<li><font>changed pack_src.sh to extract list of files from local SVN copy using<br />
SVN commands</font></li>
<li><font>improved CYGWIN compatibility</font></li>