Megatest

View Ticket
Login
Ticket Hash: 8179e10483d73a7a1ebfdd702d34c8cc8a49434d
Title: refdb: set appends changes but does not replace
Status: Open Type: Code_Defect
Severity: Important Priority: Immediate
Subsystem: Resolution: Open
Last Modified: 2016-08-30 09:32:57
Version Found In:
Description:
refdb set command does not replace existing lines in the .dat file when updating existing keys:

refdb set db row col data

[]
[col]
row data

...

refdb set db row col data
[]
[col]
row data
row data
User Comments:
tyardeni added on 2016-08-29 23:45:55: (text/html)
See below for sample of the behavior. Opening with "refdb edit" cleans up the extra lines...

<verbatim>
refdb set db row col data

[] 
[col] 
row data

...

refdb set db row col data 
[] 
[col] 
row data 
row data
</verbatim>

tyardeni added on 2016-08-30 15:29:19: (text/html)
On refdb set command if sheet-names.cfg is missing:

<verbatim>
$ refdb set db sheet col row data

Error: (open-output-file) cannot open file - No such file or directory: "db/sheet-names.cfg"

        Call history:

        refdb.scm:149: main
        refdb.scm:136: argv
        refdb.scm:64: string->symbol
        refdb-module.scm:702: ##sys#get-keyword
        refdb-module.scm:703: conc
        refdb-module.scm:706: refdb#conf-get-record
        refdb-module.scm:775: conc
        refdb-module.scm:775: file-exists?
        refdb-module.scm:778: dat-lookup
        refdb-module.scm:472: filter
        refdb-module.scm:707: file-exists?
        refdb-module.scm:711: add-sheet
        refdb-module.scm:608: refdb#list-sheets
        refdb-module.scm:603: file-exists?
        refdb-module.scm:609: conc
        refdb-module.scm:609: with-output-to-file               <--

</verbatim>

tyardeni added on 2016-08-30 15:32:57: (text/x-fossil-plain)
The last update belonged on a different ticket :(