Skip to content

Commit ae5bca1

Browse files
author
nomadbyte
committed
Release version 0.9.0
1 parent 0a64223 commit ae5bca1

File tree

4 files changed

+94
-15
lines changed

4 files changed

+94
-15
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,21 @@ cms-export ChangeLog {#xcmschangelog}
22
====================
33

44

5+
## 0.9.0 - 2017-02-21
6+
7+
- Update docs
8+
- Bugfixes
9+
- __ISSUE-FIX__:Multi-line generation/commit remarks break the export process.
10+
- Commit remarks are truncated to a single line.
11+
12+
- __ISSUE-FIX__:Blob byte-size is one block off when it's exact block multiple.
13+
14+
515
## 0.8.0 - 2015-01-13
616

717
- Update docs
18+
- __ISSUE__:Multi-line generation/commit remarks break the export process.
19+
- __ISSUE__:Blob byte-size is one block off when it is exact block multiple.
820

921

1022
## 0.7.0 - 2015-01-09

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ tests and user-documentation:
9898
do a logged build (all messages are redirected to a log-file):
9999

100100
define err_output log_output
101-
pipe @[-]build clean all test 2>&1 >build.log
101+
pipe @[-]build clean all test >build.log 2>&1
102102

103103

104104
- On successful completion all tests have passed and the `cms-export` utility
@@ -129,7 +129,7 @@ tests and user-documentation:
129129
redirect messages to a log-file:
130130

131131
define err_output log_output
132-
pipe EXPORTCMS 2>&1 >exportcms.log
132+
pipe EXPORTCMS >exportcms.log 2>&1
133133

134134

135135
> __NOTE__: For better use of system resources it is recommended to run export

build.com

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,12 @@ Build utility for CMS-EXPORT project.
256256

257257
DETAILS:
258258
- Supports building of a single target or a target list (space-separated)
259-
- Targets are done in the listed order left-to-right
259+
- Targets are made in the listed order left-to-right
260260
- Each target must have a corresponding GOSUB_DO_<target> to execute
261261
- Listed targets may be ordinary targets or target-groups
262262
- Target group is a target sub-list
263-
- For a target group: first all targets in the group are done,
264-
then the group's own target is done
263+
- For a target group: first all targets in the group are made,
264+
then the group's own target is made
265265

266266
RETURNS:
267267
On successful completion of the requested targets $STATUS is set as:

src/exportcms-git.com

Lines changed: 77 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ $!===========================================================================
22
$ THIS_FILE = f$elem(0,";",f$env("procedure"))
33
$ USAGE_ARGS = "[libPath] [outFile] [elemList] [classList] [classBranchXref]"
44
$ THIS_FACILITY = "EXPORTCMS"
5-
$ VERSION = "0.8.0"
5+
$ VERSION = "0.9.0"
66
$ COPYRIGHT = "Copyright (c) 2015, Artur Shepilko, <[email protected]>."
77
$!---------------------------------------------------------------------------
88
$! For Usage -- run with ? (?? for usage details and license)
@@ -107,11 +107,23 @@ $ libPath = ""
107107
$ goto EXIT_GET_ARGS
108108
$ endif
109109
$
110-
$ libName = f$edit(libPath,"LOWERCASE") - "]" -
111-
- f$edit( f$parse(libPath - "]" + ".-]") - "].;", "LOWERCASE" ) - "."
110+
$ !!-- Get CMS lib name from path (DEV:[LIBNAME] or DEV:[DIR.LIBNAME])
111+
$ !!-- OR get it from device name when a terminal device (DEV: or DEV:[000000])
112+
$ !!--
113+
$ if (libPath - "]" .eqs. libPath -
114+
.or. libPath - "[000000]" .nes. libPath)
115+
$ then
116+
$ libDirName = f$edit(libPath, "LOWERCASE") - "[000000]" - ":"
117+
$ else
118+
$ libDirName = f$edit(libPath, "LOWERCASE") - "]" -
119+
- f$edit(f$parse(libPath - "]" + ".-]",,,,"SYNTAX_ONLY") -
120+
- "000000].;" - "].;", "LOWERCASE") - "000000." - "."
121+
$ endif
112122
$!
113123
$ expFile = p2
114-
$ if (expFile .eqs. "") then expFile = f$parse(libName, DEFAULT_EXP_FILE) - ";"
124+
$ if (expFile .eqs. "" -
125+
.or. f$parse(expFile,,,"TYPE") .eqs. ".") then -
126+
expFile = f$parse(libName, DEFAULT_EXP_FILE) - ";"
115127
$!
116128
$ elemList = p3
117129
$ if (elemList .eqs. "") then elemList = DEFAULT_ELEM_LIST
@@ -761,12 +773,22 @@ $ return !GOSUB_WRITE_GIT_TAG
761773
$!-------------------------------
762774
$GOSUB_WRITE_GIT_BLOB:
763775
$ dbgtrace "GOSUB_WRITE_GIT_BLOB"
764-
$!! ARGS: histBlobId,
776+
$!! ARGS: curHistElem,
777+
$!! curHistGen,
778+
$!! histBlobId,
765779
$!! blobFile
766780
$!
767781
$
768-
$ gitBlobDataSize = (f$file(blobFile, "EOF") - 1) * f$file(blobFile,"BLS") -
769-
+ f$file(blobFile,"FFB")
782+
$ blockSize = f$file(blobFile,"BLS")
783+
$ firstFreeByte = f$file(blobFile,"FFB")
784+
$
785+
$ gitBlobDataSize = f$file(blobFile, "EOF") * blockSize
786+
$ if (firstFreeByte .gt. 0) then -
787+
gitBlobDataSize = gitBlobDataSize - blockSize + firstFreeByte
788+
$
789+
$ if (gitBlobDataSize .eq. 0) then -
790+
logmsg "W|EMPTYFILE: exporting a zero-size generation ",-
791+
curHistElem," /GEN=", curHistGen
770792
$!
771793
$ !!-- git-fast blob
772794
$ !!--
@@ -853,10 +875,21 @@ $
853875
$ g_libPath == f$edit(f$elem(0,CHAR_DBLQUOTE,g_libhistCommand),"TRIM,UPCASE") -
854876
- "CREATE LIBRARY "
855877
$!
856-
$ libDirName = g_libPath - "]" -
857-
- (f$parse(g_libPath - "]" + ".-]",,,,"SYNTAX_ONLY") - "].;") - "."
878+
$ !!-- Get CMS lib name from path (DEV:[LIBNAME] or DEV:[DIR.LIBNAME])
879+
$ !!-- OR get it from device name when a terminal device (DEV: or DEV:[000000])
880+
$ !!--
881+
$ if (g_libPath - "]" .eqs. g_libPath -
882+
.or. g_libPath - "[000000]" .nes. g_libPath)
883+
$ then
884+
$ libDirName = f$edit(g_libPath, "LOWERCASE") - "[000000]" - ":"
885+
$ else
886+
$ libDirName = f$edit(g_libPath, "LOWERCASE") - "]" -
887+
- f$edit(f$parse(g_libPath - "]" + ".-]",,,,"SYNTAX_ONLY") -
888+
- "000000].;" - "].;", "LOWERCASE") - "000000." - "."
889+
$ endif
858890
$
859-
$ g_lib == f$edit(libDirName,"TRIM,LOWERCASE")
891+
$ g_lib == f$edit(libDirName,"TRIM")
892+
$ if (g_lib .eqs. "") then g_lib == "cmslib" !!-- DEFAULT
860893
$
861894
$ call GET_SEQTIME "''g_libTime'"
862895
$ g_libSeqKey == g_seqTime
@@ -909,13 +942,29 @@ $ read/end=ENDDO_DESCGEN fDescGen line
909942
$ read/end=ENDDO_DESCGEN fDescGen line
910943
$ read/end=ENDDO_DESCGEN fDescGen line
911944
$!
945+
$ g_genIsMultilineRemark == ".FALSE."
946+
$
912947
$DO_DESCGEN:
913948
$ line=""
914949
$ read/end=ENDDO_DESCGEN fDescGen line
915950
$ if (line .eqs. "") then goto NEXT_DESCGEN
916951
$!
952+
$ !! -- Truncate multi-line remarks to a single line
953+
$ !! --
954+
$ if (g_genIsMultilineRemark)
955+
$ then
956+
$ g_genIsMultilineRemark == (f$extr(f$len(line)-1, 1, line) .nes. CHAR_DBLQUOTE)
957+
$ goto DO_DESCGEN
958+
$ endif
959+
$!
917960
$ call PARSE_GEN_REC
918961
$ if (g_genIsElem) then elem = g_genElem
962+
$ if (g_genIsMultilineRemark)
963+
$ then
964+
$ logmsg "W|TRUNCATED: multiline remark truncated for generation ",-
965+
g_genElem, " /GEN=",g_gen
966+
$ goto DO_DESCGEN
967+
$ endif
919968
$ if (g_gen .eqs. "") then goto NEXT_DESCGEN
920969
$!
921970
$ dbgmsg "DBG|DESC:genElem:",g_genElem,"|gen:",g_gen,"|",g_genUser,"|",g_genTime,"|",g_genRemark
@@ -1197,14 +1246,29 @@ $ read/end=ENDDO_ANCGEN fAncGen line
11971246
$ read/end=ENDDO_ANCGEN fAncGen line
11981247
$!
11991248
$ genIdx = 0
1249+
$ g_genIsMultilineRemark == ".FALSE."
12001250
$
12011251
$DO_ANCGEN:
12021252
$ line=""
12031253
$ read/end=ENDDO_ANCGEN fAncGen line
12041254
$ if (line .eqs. "") then goto NEXT_ANCGEN
12051255
$!
1256+
$ !! -- Truncate multi-line remarks to a single line
1257+
$ !! --
1258+
$ if (g_genIsMultilineRemark)
1259+
$ then
1260+
$ g_genIsMultilineRemark == (f$extr(f$len(line)-1, 1, line) .nes. CHAR_DBLQUOTE)
1261+
$ goto DO_ANCGEN
1262+
$ endif
1263+
$!
12061264
$ call PARSE_GEN_REC
12071265
$ if (g_genIsElem) then elem = g_genElem
1266+
$ if (g_genIsMultilineRemark)
1267+
$ then
1268+
$ logmsg "W|TRUNCATED: multiline remark truncated for generation ",-
1269+
g_genElem, " /GEN=",g_gen
1270+
$ goto DO_ANCGEN
1271+
$ endif
12081272
$ if (g_gen .eqs. "") then goto NEXT_ANCGEN
12091273
$!
12101274
$ dbgmsg "DBG|ANC:genElem:",g_genElem,"|gen:",g_gen,"|",g_genUser,"|",g_genTime,"|",g_genRemark
@@ -1526,6 +1590,7 @@ $ g_gen == ""
15261590
$ g_genTime == ""
15271591
$ g_genUser == ""
15281592
$ g_genRemark == ""
1593+
$ g_genIsMultilineRemark == ".FALSE."
15291594
$
15301595
$ g_genIsElem == ( f$extr(0, 1, genRec) .nes. CHAR_SPACE )
15311596
$!
@@ -1546,6 +1611,8 @@ $ g_genTime == f$elem(2, CHAR_SPACE, xline) -
15461611
+ ":" + f$elem(3, CHAR_SPACE, xline)
15471612
$ g_genUser == f$elem(4, CHAR_SPACE, xline)
15481613
$ g_genRemark == f$elem(1, CHAR_DBLQUOTE, xline)
1614+
$
1615+
$ g_genIsMultilineRemark == (f$extr(f$len(genRec)-1, 1, genRec) .nes. CHAR_DBLQUOTE)
15491616
$!
15501617
$EXIT:
15511618
$ exit !PARSE_GEN_REC

0 commit comments

Comments
 (0)