Index: fossil-utils/fossilrebase.scm ================================================================== --- fossil-utils/fossilrebase.scm +++ fossil-utils/fossilrebase.scm @@ -1,6 +1,6 @@ -(use yaml matchable srfi-1 sqlite3) +(use yaml matchable srfi-1 sqlite3 regex) (define (get-timeline) (let* ((inp (open-input-pipe "fossil json timeline checkin -n 0")) (res (yaml-load inp))) (close-input-pipe inp) @@ -65,10 +65,13 @@ (refdb-set-value dbname "timeline" uuid "timestamp" (seconds->std-time-str (get-val rec "timestamp"))) (refdb-set-value dbname "timeline" uuid "timestamp_sec" (any->string (get-val rec "timestamp"))) )))) timeline)))) +(define (escape-string-for-bash str) + (string-substitute "'" "''" str #t)) + ;; tag0 tag1 tag2 cherrypick backout hide usedate recomment user ;; comment timestamp timestamp_sec ;; (define (get-node-details db node-id) (let* ((result #f) @@ -121,12 +124,12 @@ (do-commit . ,do-commit) (usedate . ,usedate) (comment . ,comment) (recomment . ,recomment)) res))) - db - "SELECT rowkey,tag0,cherrypick,do_commit,usedate,comment,recomment FROM timeline WHERE cherrypick != '' AND cherrypick NOT NULL;") + db ;; sort desc and the cons puts it back in correct order + "SELECT rowkey,tag0,cherrypick,do_commit,usedate,comment,recomment FROM timeline WHERE cherrypick != '' AND cherrypick NOT NULL ORDER BY timestamp_sec DESC;") res)) ;; always private and same time as parent node + 1 second ;; ;; fossil branch new BRANCH-NAME BASIS ?OPTIONS? @@ -155,11 +158,11 @@ ;; (print "Creating private branch " branch-name " from node " parent-node) ;; (pp parent-info) ;; (print "") )))) -(define (do-cherrypick db cherrypick) +(define (do-cherrypick db cherrypick dbfname) (let* ((tag0 (alist-ref 'tag0 cherrypick)) (uuid (alist-ref 'uuid cherrypick)) (nodeinf (get-node-details db uuid)) (nodedate (alist-ref 'timestamp nodeinf)) (user (alist-ref 'user nodeinf)) @@ -166,23 +169,35 @@ (targ (alist-ref 'cherrypick cherrypick)) ;; do fossil up to this node (do-commit (alist-ref 'do-commit cherrypick)) ;; if yes do a commit (usedate (alist-ref 'usedate cherrypick)) ;; if no use current time (comment (alist-ref 'comment cherrypick)) (recomment (alist-ref 'recomment cherrypick))) + (print "#======= Start of cherrypick for " uuid "=======") (print "fossil up " targ) (print "fossil merge --cherrypick " uuid) - (if (member do-commit '("x" "yes")) - (print "fossil commit -m '" comment "' " + (if #t ;;(member do-commit '("x" "yes")) + (print "fossil commit -m '" (escape-string-for-bash comment) "' " (if (equal? usedate "no") "" (conc " --date-override '" nodedate "'")) " --user-override " user - " --private")))) + " --private")) + (print "if [[ $(fossil status | grep CONFLICT | wc -l) -gt 0 ]];then") + (print " echo HAVE CONFLICT - STOPPING") + (print " exit 1") + (print "else") + (print " echo GOOD, marking node " uuid " as DONE") + (print " refdb set " dbfname " timeline " uuid " status DONE") + (print "fi") + (print "#======= end of cherrypick for " uuid "=======") + (print "") + )) ;; (define (gen-rebase-commands dbname) - (let* ((sqldbname (conc dbname ".db"))) + (let* ((sqldbname (conc "/tmp/" (current-user-name) "-" dbname ".db")) + (dbfname (conc (current-directory) "/" dbname))) ;; want the fully qualified path so we can call the generated script from anywhere (print "Create sqlite db " sqldbname "...") (system (conc "refdb dump2sqlite3 " dbname " " sqldbname)) (let* ((db (open-database sqldbname)) (branches (get-new-branches db)) (cherrypicks (get-cherry-picks db))) @@ -195,11 +210,11 @@ branches) ;; create the cherrypicks (for-each (lambda (cherrypick) - (do-cherrypick db cherrypick)) + (do-cherrypick db cherrypick dbfname)) cherrypicks) ))) (define help "fossilrebase - register commits in a refdb, edit them by hand then execute them ADDED fossil-utils/justtesting/branches.dat Index: fossil-utils/justtesting/branches.dat ================================================================== --- /dev/null +++ fossil-utils/justtesting/branches.dat @@ -0,0 +1,6 @@ +[node] +v1.65-cbuild 4021551b19 +v1.65-fixes 4021551b19 +[mode] +v1.65-cbuild private +v1.65-fixes private Index: fossil-utils/justtesting/sxml/_sheets.sxml ================================================================== --- fossil-utils/justtesting/sxml/_sheets.sxml +++ fossil-utils/justtesting/sxml/_sheets.sxml @@ -1,41 +1,44 @@ ((@ (http://www.w3.org/2001/XMLSchema-instance:schemaLocation "http://www.gnumeric.org/v9.xsd")) (http://www.gnumeric.org/v10.dtd:Version - (@ (Minor "45") - (Major "12") - (Full "1.12.45") + (@ (Minor "17") + (Major "10") + (Full "1.10.17") (Epoch "1"))) (http://www.gnumeric.org/v10.dtd:Attributes (http://www.gnumeric.org/v10.dtd:Attribute + (http://www.gnumeric.org/v10.dtd:type "4") (http://www.gnumeric.org/v10.dtd:name "WorkbookView::show_horizontal_scrollbar") (http://www.gnumeric.org/v10.dtd:value "TRUE")) (http://www.gnumeric.org/v10.dtd:Attribute + (http://www.gnumeric.org/v10.dtd:type "4") (http://www.gnumeric.org/v10.dtd:name "WorkbookView::show_vertical_scrollbar") (http://www.gnumeric.org/v10.dtd:value "TRUE")) (http://www.gnumeric.org/v10.dtd:Attribute + (http://www.gnumeric.org/v10.dtd:type "4") (http://www.gnumeric.org/v10.dtd:name "WorkbookView::show_notebook_tabs") (http://www.gnumeric.org/v10.dtd:value "TRUE")) (http://www.gnumeric.org/v10.dtd:Attribute + (http://www.gnumeric.org/v10.dtd:type "4") (http://www.gnumeric.org/v10.dtd:name "WorkbookView::do_auto_completion") (http://www.gnumeric.org/v10.dtd:value "TRUE")) (http://www.gnumeric.org/v10.dtd:Attribute + (http://www.gnumeric.org/v10.dtd:type "4") (http://www.gnumeric.org/v10.dtd:name "WorkbookView::is_protected") (http://www.gnumeric.org/v10.dtd:value "FALSE"))) (urn:oasis:names:tc:opendocument:xmlns:office:1.0:document-meta (@ (urn:oasis:names:tc:opendocument:xmlns:office:1.0:version "1.2")) (urn:oasis:names:tc:opendocument:xmlns:office:1.0:meta - (http://purl.org/dc/elements/1.1/:date - "2020-05-29T15:48:39Z") (urn:oasis:names:tc:opendocument:xmlns:meta:1.0:creation-date - "2020-05-29T15:48:27Z"))) + "2020-05-29T22:01:41Z"))) (http://www.gnumeric.org/v10.dtd:Calculation (@ (MaxIterations "100") (ManualRecalc "0") (IterationTolerance "0.001") (FloatRadix "2") ADDED fossil-utils/justtesting/sxml/branches.sxml Index: fossil-utils/justtesting/sxml/branches.sxml ================================================================== --- /dev/null +++ fossil-utils/justtesting/sxml/branches.sxml @@ -0,0 +1,136 @@ +(http://www.gnumeric.org/v10.dtd:Sheet + (@ (Visibility "GNM_SHEET_VISIBILITY_VISIBLE") + (OutlineSymbolsRight "1") + (OutlineSymbolsBelow "1") + (HideZero "0") + (HideRowHeader "0") + (HideGrid "0") + (HideColHeader "0") + (GridColor "0:0:0") + (DisplayOutlines "1") + (DisplayFormulas "0")) + (http://www.gnumeric.org/v10.dtd:MaxCol "8") + (http://www.gnumeric.org/v10.dtd:MaxRow "17") + (http://www.gnumeric.org/v10.dtd:Zoom "1") + (http://www.gnumeric.org/v10.dtd:Names + (http://www.gnumeric.org/v10.dtd:Name + (http://www.gnumeric.org/v10.dtd:name + "Print_Area") + (http://www.gnumeric.org/v10.dtd:value "#REF!") + (http://www.gnumeric.org/v10.dtd:position "A1")) + (http://www.gnumeric.org/v10.dtd:Name + (http://www.gnumeric.org/v10.dtd:name + "Sheet_Title") + (http://www.gnumeric.org/v10.dtd:value + "\"First_Sheet\"") + (http://www.gnumeric.org/v10.dtd:position "A1"))) + (http://www.gnumeric.org/v10.dtd:PrintInformation + (http://www.gnumeric.org/v10.dtd:Margins + (http://www.gnumeric.org/v10.dtd:top + (@ (PrefUnit "mm") (Points "93.26"))) + (http://www.gnumeric.org/v10.dtd:bottom + (@ (PrefUnit "mm") (Points "93.26"))) + (http://www.gnumeric.org/v10.dtd:left + (@ (PrefUnit "mm") (Points "72"))) + (http://www.gnumeric.org/v10.dtd:right + (@ (PrefUnit "mm") (Points "72"))) + (http://www.gnumeric.org/v10.dtd:header + (@ (PrefUnit "mm") (Points "72"))) + (http://www.gnumeric.org/v10.dtd:footer + (@ (PrefUnit "mm") (Points "72")))) + (http://www.gnumeric.org/v10.dtd:Scale + (@ (type "percentage") (percentage "100"))) + (http://www.gnumeric.org/v10.dtd:vcenter + (@ (value "0"))) + (http://www.gnumeric.org/v10.dtd:hcenter + (@ (value "0"))) + (http://www.gnumeric.org/v10.dtd:grid + (@ (value "0"))) + (http://www.gnumeric.org/v10.dtd:even_if_only_styles + (@ (value "0"))) + (http://www.gnumeric.org/v10.dtd:monochrome + (@ (value "0"))) + (http://www.gnumeric.org/v10.dtd:draft + (@ (value "0"))) + (http://www.gnumeric.org/v10.dtd:titles + (@ (value "0"))) + (http://www.gnumeric.org/v10.dtd:do_not_print + (@ (value "0"))) + (http://www.gnumeric.org/v10.dtd:print_range + (@ (value "0"))) + (http://www.gnumeric.org/v10.dtd:order + "d_then_r") + (http://www.gnumeric.org/v10.dtd:orientation + "portrait") + (http://www.gnumeric.org/v10.dtd:Header + (@ (Right "") (Middle "&[tab]") (Left ""))) + (http://www.gnumeric.org/v10.dtd:Footer + (@ (Right "") (Middle "&[page]") (Left ""))) + (http://www.gnumeric.org/v10.dtd:paper + "na_letter") + (http://www.gnumeric.org/v10.dtd:comments + "in_place") + (http://www.gnumeric.org/v10.dtd:errors + "as_displayed")) + (http://www.gnumeric.org/v10.dtd:Styles + (http://www.gnumeric.org/v10.dtd:StyleRegion + (@ (startRow "0") + (startCol "0") + (endRow "65535") + (endCol "255")) + (http://www.gnumeric.org/v10.dtd:Style + (@ (WrapText "0") + (VAlign "2") + (ShrinkToFit "0") + (Shade "0") + (Rotation "0") + (PatternColor "0:0:0") + (Locked "1") + (Indent "0") + (Hidden "0") + (HAlign "1") + (Format "General") + (Fore "0:0:0") + (Back "FFFF:FFFF:FFFF")) + (http://www.gnumeric.org/v10.dtd:Font + (@ (Unit "10") + (Underline "0") + (StrikeThrough "0") + (Script "0") + (Italic "0") + (Bold "0")) + "Sans")))) + (http://www.gnumeric.org/v10.dtd:Cols + (@ (DefaultSizePts "48")) + (http://www.gnumeric.org/v10.dtd:ColInfo + (@ (Unit "61.5") (No "0"))) + (http://www.gnumeric.org/v10.dtd:ColInfo + (@ (Unit "99") (No "1") (HardSize "1"))) + (http://www.gnumeric.org/v10.dtd:ColInfo + (@ (Unit "64.01") (No "2") (Count "7")))) + (http://www.gnumeric.org/v10.dtd:Rows + (@ (DefaultSizePts "12.1")) + (http://www.gnumeric.org/v10.dtd:RowInfo + (@ (Unit "12.64") (No "0"))) + (http://www.gnumeric.org/v10.dtd:RowInfo + (@ (Unit "13.5") (No "1") (Count "17")))) + (http://www.gnumeric.org/v10.dtd:Selections + (@ (CursorRow "7") (CursorCol "2")) + (http://www.gnumeric.org/v10.dtd:Selection + (@ (startRow "7") + (startCol "2") + (endRow "7") + (endCol "2")))) + (http://www.gnumeric.org/v10.dtd:SheetLayout + (@ (TopLeft "A2")) + (http://www.gnumeric.org/v10.dtd:FreezePanes + (@ (UnfrozenTopLeft "A2") (FrozenTopLeft "A1")))) + (http://www.gnumeric.org/v10.dtd:Solver + (@ (ProgramR "0") + (ProblemType "0") + (NonNeg "1") + (ModelType "0") + (MaxTime "60") + (MaxIter "1000") + (Discr "0") + (AutoScale "0")))) Index: fossil-utils/justtesting/sxml/extra.sxml ================================================================== --- fossil-utils/justtesting/sxml/extra.sxml +++ fossil-utils/justtesting/sxml/extra.sxml @@ -55,11 +55,11 @@ (http://www.gnumeric.org/v10.dtd:titles (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:do_not_print (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:print_range - (@ (value "GNM_PRINT_ACTIVE_SHEET"))) + (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:order "d_then_r") (http://www.gnumeric.org/v10.dtd:orientation "portrait") (http://www.gnumeric.org/v10.dtd:Header @@ -66,31 +66,30 @@ (@ (Right "") (Middle "&[tab]") (Left ""))) (http://www.gnumeric.org/v10.dtd:Footer (@ (Right "") (Middle "&[page]") (Left ""))) (http://www.gnumeric.org/v10.dtd:paper "na_letter") - (http://www.gnumeric.org/v10.dtd:comments - (@ (placement "GNM_PRINT_COMMENTS_IN_PLACE"))) + (http://www.gnumeric.org/v10.dtd:comments "none") (http://www.gnumeric.org/v10.dtd:errors - (@ (PrintErrorsAs "GNM_PRINT_ERRORS_AS_DISPLAYED")))) + "as_displayed")) (http://www.gnumeric.org/v10.dtd:Styles (http://www.gnumeric.org/v10.dtd:StyleRegion (@ (startRow "0") (startCol "0") (endRow "65535") (endCol "255")) (http://www.gnumeric.org/v10.dtd:Style (@ (WrapText "0") - (VAlign "GNM_VALIGN_BOTTOM") + (VAlign "2") (ShrinkToFit "0") (Shade "0") (Rotation "0") (PatternColor "0:0:0") (Locked "1") (Indent "0") (Hidden "0") - (HAlign "GNM_HALIGN_GENERAL") + (HAlign "1") (Format "General") (Fore "0:0:0") (Back "FFFF:FFFF:FFFF")) (http://www.gnumeric.org/v10.dtd:Font (@ (Unit "10") @@ -111,11 +110,13 @@ (http://www.gnumeric.org/v10.dtd:Rows (@ (DefaultSizePts "12.1")) (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "12.64") (No "0"))) (http://www.gnumeric.org/v10.dtd:RowInfo - (@ (Unit "13.5") (No "1") (Count "17")))) + (@ (Unit "13.5") (No "1") (Count "17"))) + (http://www.gnumeric.org/v10.dtd:RowInfo + (@ (Unit "12.1") (No "18") (Count "705")))) (http://www.gnumeric.org/v10.dtd:Selections (@ (CursorRow "3") (CursorCol "1")) (http://www.gnumeric.org/v10.dtd:Selection (@ (startRow "3") (startCol "1") @@ -124,14 +125,13 @@ (http://www.gnumeric.org/v10.dtd:SheetLayout (@ (TopLeft "A2")) (http://www.gnumeric.org/v10.dtd:FreezePanes (@ (UnfrozenTopLeft "A2") (FrozenTopLeft "A1")))) (http://www.gnumeric.org/v10.dtd:Solver - (@ (SensitivityR "0") - (ProgramR "0") + (@ (ProgramR "0") (ProblemType "0") (NonNeg "1") (ModelType "0") (MaxTime "60") (MaxIter "1000") (Discr "0") (AutoScale "0")))) Index: fossil-utils/justtesting/sxml/timeline.sxml ================================================================== --- fossil-utils/justtesting/sxml/timeline.sxml +++ fossil-utils/justtesting/sxml/timeline.sxml @@ -55,11 +55,11 @@ (http://www.gnumeric.org/v10.dtd:titles (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:do_not_print (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:print_range - (@ (value "GNM_PRINT_ACTIVE_SHEET"))) + (@ (value "0"))) (http://www.gnumeric.org/v10.dtd:order "d_then_r") (http://www.gnumeric.org/v10.dtd:orientation "portrait") (http://www.gnumeric.org/v10.dtd:Header @@ -66,31 +66,30 @@ (@ (Right "") (Middle "&[tab]") (Left ""))) (http://www.gnumeric.org/v10.dtd:Footer (@ (Right "") (Middle "&[page]") (Left ""))) (http://www.gnumeric.org/v10.dtd:paper "na_letter") - (http://www.gnumeric.org/v10.dtd:comments - (@ (placement "GNM_PRINT_COMMENTS_IN_PLACE"))) + (http://www.gnumeric.org/v10.dtd:comments "none") (http://www.gnumeric.org/v10.dtd:errors - (@ (PrintErrorsAs "GNM_PRINT_ERRORS_AS_DISPLAYED")))) + "as_displayed")) (http://www.gnumeric.org/v10.dtd:Styles (http://www.gnumeric.org/v10.dtd:StyleRegion (@ (startRow "0") (startCol "0") (endRow "65535") (endCol "255")) (http://www.gnumeric.org/v10.dtd:Style (@ (WrapText "0") - (VAlign "GNM_VALIGN_BOTTOM") + (VAlign "2") (ShrinkToFit "0") (Shade "0") (Rotation "0") (PatternColor "0:0:0") (Locked "1") (Indent "0") (Hidden "0") - (HAlign "GNM_HALIGN_GENERAL") + (HAlign "1") (Format "General") (Fore "0:0:0") (Back "FFFF:FFFF:FFFF")) (http://www.gnumeric.org/v10.dtd:Font (@ (Unit "10") @@ -109,10 +108,12 @@ (No "1") (HardSize "1") (Count "3"))) (http://www.gnumeric.org/v10.dtd:ColInfo (@ (Unit "63.75") (No "4"))) + (http://www.gnumeric.org/v10.dtd:ColInfo + (@ (Unit "48") (No "5") (Count "5"))) (http://www.gnumeric.org/v10.dtd:ColInfo (@ (Unit "66.75") (No "10") (HardSize "1"))) (http://www.gnumeric.org/v10.dtd:ColInfo (@ (Unit "140.2") (No "11") (HardSize "1"))) (http://www.gnumeric.org/v10.dtd:ColInfo @@ -185,38 +186,50 @@ (No "463") (Hidden "1") (Count "4"))) (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "13.5") (No "467") (Count "2"))) + (http://www.gnumeric.org/v10.dtd:RowInfo + (@ (Unit "12.1") (No "469"))) (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "13.5") (No "470") (Count "9"))) (http://www.gnumeric.org/v10.dtd:RowInfo + (@ (Unit "12.1") (No "479") (Count "4"))) + (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "13.5") (No "483"))) + (http://www.gnumeric.org/v10.dtd:RowInfo + (@ (Unit "12.1") (No "484") (Count "2"))) (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "13.5") (No "486") (Count "2"))) (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "12.1") (No "488") (Hidden "1"))) (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "13.5") (No "489"))) (http://www.gnumeric.org/v10.dtd:RowInfo + (@ (Unit "12.1") (No "490") (Count "2"))) + (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "13.5") (No "492"))) (http://www.gnumeric.org/v10.dtd:RowInfo + (@ (Unit "12.1") (No "493") (Count "5"))) + (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "13.5") (No "498") (Count "2"))) + (http://www.gnumeric.org/v10.dtd:RowInfo + (@ (Unit "12.1") (No "500") (Count "3"))) (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "12.1") (No "503") (Hidden "1") (Count "65033")))) (http://www.gnumeric.org/v10.dtd:Selections - (@ (CursorRow "421") (CursorCol "6")) + (@ (CursorRow "421") (CursorCol "3")) (http://www.gnumeric.org/v10.dtd:Selection (@ (startRow "421") - (startCol "6") + (startCol "3") (endRow "421") - (endCol "6")))) + (endCol "3")))) (http://www.gnumeric.org/v10.dtd:SheetLayout - (@ (TopLeft "A422")) + (@ (TopLeft "A2")) (http://www.gnumeric.org/v10.dtd:FreezePanes (@ (UnfrozenTopLeft "A2") (FrozenTopLeft "A1")))) (http://www.gnumeric.org/v10.dtd:Filters (http://www.gnumeric.org/v10.dtd:Filter (@ (Area "A1:N65536")) @@ -225,14 +238,13 @@ (Value0 "60") (Type "expr") (Op0 "eq") (Index "1"))))) (http://www.gnumeric.org/v10.dtd:Solver - (@ (SensitivityR "0") - (ProgramR "0") + (@ (ProgramR "0") (ProblemType "0") (NonNeg "1") (ModelType "0") (MaxTime "60") (MaxIter "1000") (Discr "0") (AutoScale "0")))) Index: fossil-utils/justtesting/timeline.dat ================================================================== --- fossil-utils/justtesting/timeline.dat +++ fossil-utils/justtesting/timeline.dat cannot compute difference between binary files