Overview
Comment: | fossil rebase basically working |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.66 |
Files: | files | file ages | folders |
SHA1: |
3e683f6d9f56690c88e228e377596636 |
User & Date: | matt on 2020-05-29 09:51:58 |
Other Links: | branch diff | manifest | tags |
Context
2020-05-29
| ||
16:02 | Added COMMIT protection to rebase script. check-in: 65ed339ae6 user: mrwellan tags: v1.66 | |
09:51 | fossil rebase basically working check-in: 3e683f6d9f user: matt tags: v1.66 | |
00:20 | Added rebase info for v1.65-newview check-in: 21aa6b995f user: matt tags: v1.66 | |
Changes
Modified fossil-utils/fossilrebase.scm from [7fd6410b95] to [099aa193d9].
|
| | | 1 2 3 4 5 6 7 8 | (use yaml matchable srfi-1 sqlite3) (define (get-timeline) (let* ((inp (open-input-pipe "fossil json timeline checkin -n 0")) (res (yaml-load inp))) (close-input-pipe inp) res)) |
︙ | ︙ | |||
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | (refdb-set-value dbname "timeline" uuid key (any->string (get-val rec key)))) '("user" "comment")) (refdb-set-value dbname "extra" uuid "parents" (string-intersperse (get-val rec "parents") ",")) (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 help "fossilrebase - register commits in a refdb, edit them by hand then execute them WARNING: It is highly recommended you do this on a disconnected copy of your fossil database!! Usage: fossilrebase cmd [params ...] where cmd is one of: genrefdb fname b1,b2... : generate a refdb of all the commits for branches matching patterns listed, edit with \"refdb edit fname\" dumpcmds fname : from refdb fname dump fossil commands to implement the rebase you want to do. ") (define (main) (if (< (length (command-line-arguments)) 1) (begin (print help) (exit 1)) (match (command-line-arguments) (("genrefdb" fname branches) (gen-refdb fname branches)) | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | (refdb-set-value dbname "timeline" uuid key (any->string (get-val rec key)))) '("user" "comment")) (refdb-set-value dbname "extra" uuid "parents" (string-intersperse (get-val rec "parents") ",")) (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)))) ;; tag0 tag1 tag2 cherrypick backout hide usedate recomment user ;; comment timestamp timestamp_sec ;; (define (get-node-details db node-id) (let* ((result #f) (count 0)) (for-each-row (lambda (rowkey tag0 cherrypick do-commit backout hide usedate recomment user comment timestamp timestamp_sec) (set! result `((uuid . ,rowkey) (tag0 . ,tag0) (cherrypick . ,cherrypick) (do-commit . ,do-commit) (backout . ,backout) (hide . ,hide) (usedate . ,usedate) (recomment . ,recomment) (user . ,user) (comment . ,comment) (timestamp . ,timestamp) (timestamp_sec . ,timestamp_sec))) (set! count (+ count 1))) db "SELECT rowkey,tag0,cherrypick,do_commit,backout,hide,usedate,recomment,user,comment,timestamp,timestamp_sec FROM timeline WHERE rowkey LIKE ?;" node-id) (if (> count 1) (print "WARNING: more than one node matches " node-id ", found " count " nodes")) result)) ;; get branches to create ;; (define (get-new-branches db) (let* ((res '())) (for-each-row (lambda (rowkey node mode) (set! res (cons `((branch . ,rowkey) (node . ,node) (mode . ,mode)) res))) db "SELECT rowkey,node,mode FROM branches;") res)) ;; get cherrypicks ;; (define (get-cherry-picks db) (let* ((res '())) (for-each-row (lambda (rowkey tag0 cherrypick do-commit usedate comment recomment) (set! res (cons `((uuid . ,rowkey) (tag0 . ,tag0) (cherrypick . ,cherrypick) (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;") res)) ;; always private and same time as parent node + 1 second ;; ;; fossil branch new BRANCH-NAME BASIS ?OPTIONS? ;; ;; Create a new branch BRANCH-NAME off of check-in BASIS. ;; Supported options for this subcommand include: ;; --private branch is private (i.e., remains local) ;; --bgcolor COLOR use COLOR instead of automatic background ;; --nosign do not sign contents on this branch ;; --date-override DATE DATE to use instead of 'now' ;; --user-override USER USER to use instead of the current default ;; ;; DATE may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in ;; year-month-day form, it may be truncated, the "T" may be ;; replaced by a space, and it may also name a timezone offset ;; from UTC as "-HH:MM" (westward) or "+HH:MM" (eastward). ;; Either no timezone suffix or "Z" means UTC. ;; (define (create-branch db branch-name parent-node) (let* ((parent-info (get-node-details db (conc parent-node "%")))) (if (not parent-info) (print "ERROR: no info found for node " parent-node) (let* ((parent-date (alist-ref 'timestamp parent-info)) (parent-user (alist-ref 'user parent-info))) (print "fossil branch new " branch-name " " parent-node " --private --date-override '" parent-date "'") ;; (print "Creating private branch " branch-name " from node " parent-node) ;; (pp parent-info) ;; (print "") )))) (define (do-cherrypick db cherrypick) (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)) (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 "fossil up " targ) (print "fossil merge --cherrypick " uuid) (if (member do-commit '("x" "yes")) (print "fossil commit -m '" comment "' " (if (equal? usedate "no") "" (conc " --date-override '" nodedate "'")) " --user-override " user " --private")))) ;; (define (gen-rebase-commands dbname) (let* ((sqldbname (conc dbname ".db"))) (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))) ;; create the branches (for-each (lambda (branchdat) (create-branch db (alist-ref 'branch branchdat) (alist-ref 'node branchdat))) branches) ;; create the cherrypicks (for-each (lambda (cherrypick) (do-cherrypick db cherrypick)) cherrypicks) ))) (define help "fossilrebase - register commits in a refdb, edit them by hand then execute them WARNING: It is highly recommended you do this on a disconnected copy of your fossil database!! Usage: fossilrebase cmd [params ...] where cmd is one of: genrefdb fname b1,b2... : generate a refdb of all the commits for branches matching patterns listed, edit with \"refdb edit fname\" dumpcmds fname : from refdb fname dump fossil commands to implement the rebase you want to do. ") (define (main) (if (< (length (command-line-arguments)) 1) (begin (print help) (exit 1)) (match (command-line-arguments) (("genrefdb" fname branches) (gen-refdb fname branches)) (("dumpcmds" fname) (gen-rebase-commands fname)) (else (print "Sorry, didn't know what to do with \"" (string-intersperse (command-line-arguments) " ") "\"") (exit 1))))) (main) |
Modified fossil-utils/justtesting/sheet-names.cfg from [5f652e740e] to [24fcf858b3].
1 2 | timeline extra | > | 1 2 3 | timeline extra branches |
Modified fossil-utils/justtesting/sxml/_sheets.sxml from [06e5a8dca1] to [978ea67d12].
︙ | ︙ | |||
27 28 29 30 31 32 33 | "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 | | | | > > > > | | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | "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"))) (http://www.gnumeric.org/v10.dtd:Calculation (@ (MaxIterations "100") (ManualRecalc "0") (IterationTolerance "0.001") (FloatRadix "2") (FloatDigits "53") (EnableIteration "1"))) (http://www.gnumeric.org/v10.dtd:SheetNameIndex (http://www.gnumeric.org/v10.dtd:SheetName (@ (http://www.gnumeric.org/v10.dtd:Rows "65536") (http://www.gnumeric.org/v10.dtd:Cols "256")) "timeline") (http://www.gnumeric.org/v10.dtd:SheetName (@ (http://www.gnumeric.org/v10.dtd:Rows "65536") (http://www.gnumeric.org/v10.dtd:Cols "256")) "extra") (http://www.gnumeric.org/v10.dtd:SheetName (@ (http://www.gnumeric.org/v10.dtd:Rows "65536") (http://www.gnumeric.org/v10.dtd:Cols "256")) "branches")) (http://www.gnumeric.org/v10.dtd:Geometry (@ (Width "1440") (Height "647"))) (http://www.gnumeric.org/v10.dtd:UIData (@ (SelectedTab "0")))) |
Modified fossil-utils/justtesting/sxml/timeline.sxml from [740175bf37] to [3f38d58862].
1 2 3 4 5 6 7 8 9 10 11 | (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")) | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | (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 "14") (http://www.gnumeric.org/v10.dtd:MaxRow "65535") (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!") |
︙ | ︙ | |||
108 109 110 111 112 113 114 | (@ (Unit "89.25") (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 | > > | | | | | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | (@ (Unit "89.25") (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 "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 (@ (Unit "198.8") (No "12") (HardSize "1"))) (http://www.gnumeric.org/v10.dtd:ColInfo (@ (Unit "104.2") (No "13"))) (http://www.gnumeric.org/v10.dtd:ColInfo (@ (Unit "78.75") (No "14")))) (http://www.gnumeric.org/v10.dtd:Rows (@ (DefaultSizePts "12.1")) (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "13.5") (No "0"))) (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "13.5") (No "1") |
︙ | ︙ | |||
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | (@ (Unit "13.5") (No "444"))) (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "12.1") (No "445") (Hidden "1") (Count "11"))) (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "12.1") (No "457") (Hidden "1") (Count "3"))) (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "12.1") (No "463") (Hidden "1") (Count "4"))) (http://www.gnumeric.org/v10.dtd:RowInfo | > > > > | > > | | > > > > | | | | | | | | | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | (@ (Unit "13.5") (No "444"))) (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "12.1") (No "445") (Hidden "1") (Count "11"))) (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "13.5") (No "456"))) (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "12.1") (No "457") (Hidden "1") (Count "3"))) (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "13.5") (No "460") (Count "3"))) (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "12.1") (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 "13.5") (No "470") (Count "9"))) (http://www.gnumeric.org/v10.dtd:RowInfo (@ (Unit "13.5") (No "483"))) (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 "13.5") (No "492"))) (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 "503") (Hidden "1") (Count "65033")))) (http://www.gnumeric.org/v10.dtd:Selections (@ (CursorRow "421") (CursorCol "6")) (http://www.gnumeric.org/v10.dtd:Selection (@ (startRow "421") (startCol "6") (endRow "421") (endCol "6")))) (http://www.gnumeric.org/v10.dtd:SheetLayout (@ (TopLeft "A422")) (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")) (http://www.gnumeric.org/v10.dtd:Field (@ (ValueType0 "v1.65-newview") (Value0 "60") (Type "expr") (Op0 "eq") (Index "1"))))) (http://www.gnumeric.org/v10.dtd:Solver |
︙ | ︙ |
Modified fossil-utils/justtesting/timeline.dat from [1a505b2cd3] to [2301a416d9].
cannot compute difference between binary files