Index: VERSION ================================================================== --- VERSION +++ VERSION @@ -1,1 +1,1 @@ -2.25 +2.24 Index: src/add.c ================================================================== --- src/add.c +++ src/add.c @@ -1057,11 +1057,11 @@ fossil_fatal("no check-out in which to rename files"); } if( g.argc<4 ){ usage("OLDNAME NEWNAME"); } - zDest = file_case_preferred_name(".",g.argv[g.argc-1]); + zDest = g.argv[g.argc-1]; db_begin_transaction(); if( g.argv[1][0]=='r' ){ /* i.e. "rename" */ moveFiles = 0; }else if( softFlag ){ moveFiles = 0; @@ -1143,15 +1143,14 @@ } db_finalize(&q); undo_reset(); db_end_transaction(0); if( moveFiles ) process_files_to_move(dryRunFlag); - fossil_free(zDest); } /* ** Function for stash_apply to be able to restore a file and indicate ** newly ADDED state. */ int stash_add_files_in_sfile(int vid){ return add_files_in_sfile(vid); } Index: src/graph.c ================================================================== --- src/graph.c +++ src/graph.c @@ -979,14 +979,11 @@ if( nTimewarp==0 ){ /* Priority bits: ** ** 0x04 The preferred branch ** - ** 0x02 A merge rail - a rail that contains merge lines into - ** the preferred branch. Only applies if a preferred branch - ** is defined. This improves the display of r=BRANCH - ** options to /timeline. + ** 0x02 A merge rail - a rail that contains merge lines ** ** 0x01 A rail that merges with the preferred branch */ u8 aPriority[GR_MAX_RAIL]; memset(aPriority, 0, p->mxRail+1); @@ -999,15 +996,10 @@ if( pRow->mergeIn[i] ) aPriority[i] |= 1; } if( pRow->mergeOut>=0 ) aPriority[pRow->mergeOut] |= 1; } } - for(i=0; i<=p->mxRail; i++){ - if( p->mergeRail & BIT(i) ){ - aPriority[i] |= 2; - } - } }else{ j = 1; aPriority[0] = 4; for(pRow=p->pFirst; pRow; pRow=pRow->pNext){ if( pRow->iRail==0 ){ @@ -1015,10 +1007,15 @@ if( pRow->mergeIn[i] ) aPriority[i] |= 1; } if( pRow->mergeOut>=0 ) aPriority[pRow->mergeOut] |= 1; } } + } + for(i=0; i<=p->mxRail; i++){ + if( p->mergeRail & BIT(i) ){ + aPriority[i] |= 2; + } } #if 0 fprintf(stderr,"mergeRail: 0x%llx\n", p->mergeRail); fprintf(stderr,"Priority:"); Index: test/amend.test ================================================================== --- test/amend.test +++ test/amend.test @@ -296,19 +296,20 @@ set tc 0 foreach {tagt result} $tagtests { incr tc set tags {} set cancels {} - set t1exp [join $result ", "] + set t1exp "" set t2exp "*" set t3exp "*" set t5exp "*" foreach tag $tagt { lappend tags -tag $tag lappend cancels -cancel $tag } foreach res $result { + append t1exp ", $res" append t3exp "Add*tag*\"$res\".*" append t5exp "Cancel*tag*\"$res\".*" } foreach res [lsort -nocase $result] { append t2exp "sym-$res*" Index: test/merge5.test ================================================================== --- test/merge5.test +++ test/merge5.test @@ -23,11 +23,11 @@ } protOut { fossil sqlite3 --no-repository reacts badly to SQL dumped from repositories created from fossil older than version 2.0. } -#test merge5-sqlite3-issue false knownBug +test merge5-sqlite3-issue false knownBug test_cleanup_then_return # Verify the results of a check-out # proc checkout-test {testid expected_content} { Index: test/stash.test ================================================================== --- test/stash.test +++ test/stash.test @@ -168,14 +168,14 @@ ######## # fossil stash show|cat ?STASHID? ?DIFF-OPTIONS? # fossil stash [g]diff ?STASHID? ?DIFF-OPTIONS? -#fossil stash show -#test stash-1-show {[normalize_result] eq $diff_stash_1} -#fossil stash diff -#test stash-1-diff {[normalize_result] eq $diff_stash_1} knownBug +fossil stash show +test stash-1-show {[normalize_result] eq $diff_stash_1} +fossil stash diff +test stash-1-diff {[normalize_result] eq $diff_stash_1} knownBug ######## # fossil stash pop stash-test 2 pop { @@ -206,16 +206,16 @@ # fossil: ./src/delta.c:231: checksum: Assertion '...' failed. # Should be triggered by this stash-WY-1 test. fossil checkout --force c1 fossil clean fossil mv --soft f1 f1new -#stash-test WY-1 {-expectError save -m "Reported 2016-02-09"} { -# REVERT f1 -# DELETE f1new -#} -changes { -#} -addremove { -#} -exists {f1 f2 f3} -notexists {f1new} -knownbugs {-code -result} +stash-test WY-1 {-expectError save -m "Reported 2016-02-09"} { + REVERT f1 + DELETE f1new +} -changes { +} -addremove { +} -exists {f1 f2 f3} -notexists {f1new} -knownbugs {-code -result} # TODO: add tests that verify the saved stash is sensible. Possibly # by applying it and checking results. But until the SQLITE_CONSTRAINT # error is fixed, there is nothing stashed to test. @@ -296,17 +296,16 @@ }] -changes { RENAMED f2 -> f2n } -addremove { } -exists {f1 f2n} -notexists {f2} -fossil stash save -m f2n -#stash-test 3-2 {save -m f2n} { -# REVERT f2 -# DELETE f2n -#} -exists {f1 f2} -notexists {f2n} -knownbugs {-result} +stash-test 3-2 {save -m f2n} { + REVERT f2 + DELETE f2n +} -exists {f1 f2} -notexists {f2n} -knownbugs {-result} fossil stash show -#test stash-3-2-show-1 {![regexp {\sf1} $RESULT]} knownBug +test stash-3-2-show-1 {![regexp {\sf1} $RESULT]} knownBug test stash-3-2-show-2 {[regexp {\sf2n} $RESULT]} stash-test 3-2-pop {pop} { UPDATE f1 UPDATE f2n } -changes { Index: test/tester.tcl ================================================================== --- test/tester.tcl +++ test/tester.tcl @@ -308,11 +308,10 @@ comment-format \ crlf-glob \ crnl-glob \ default-csp \ default-perms \ - default-skin \ diff-binary \ diff-command \ dont-commit \ dont-push \ dotfiles \ Index: test/utf.test ================================================================== --- test/utf.test +++ test/utf.test @@ -35,11 +35,11 @@ set i 1 foreach {fileName result} $args { set fileName [file join $tempPath $fileName] fossil test-looks-like-utf $fileName set result [string map [list %TEMP% $tempPath \r\n \n] $result] - # if {$::RESULT ne $result} {puts stdout $::RESULT; exit} + # if {$::RESULT ne $result} {puts stdout $::RESULT} test utf-check-$testname.$i {$::RESULT eq $result} incr i } } @@ -17609,25 +17609,25 @@ Has flag LOOK_LONG: no Has flag LOOK_INVALID: no Has flag LOOK_ODD: no Has flag LOOK_SHORT: no} -#utf-check 1179 utf-check-1179-2-129-1.jnk \ -#{File "%TEMP%/utf-check-1179-2-129-1.jnk" has 7 bytes. -#Starts with UTF-8 BOM: no -#Starts with UTF-16 BOM: yes -#Looks like UTF-8: yes -#Has flag LOOK_NUL: no -#Has flag LOOK_CR: no -#Has flag LOOK_LONE_CR: no -#Has flag LOOK_LF: no -#Has flag LOOK_LONE_LF: no -#Has flag LOOK_CRLF: no -#Has flag LOOK_LONG: no -#Has flag LOOK_INVALID: yes -#Has flag LOOK_ODD: no -#Has flag LOOK_SHORT: no} +utf-check 1179 utf-check-1179-2-129-1.jnk \ +{File "%TEMP%/utf-check-1179-2-129-1.jnk" has 7 bytes. +Starts with UTF-8 BOM: no +Starts with UTF-16 BOM: yes +Looks like UTF-8: no +Has flag LOOK_NUL: yes +Has flag LOOK_CR: no +Has flag LOOK_LONE_CR: no +Has flag LOOK_LF: no +Has flag LOOK_LONE_LF: no +Has flag LOOK_CRLF: no +Has flag LOOK_LONG: no +Has flag LOOK_INVALID: yes +Has flag LOOK_ODD: no +Has flag LOOK_SHORT: no} utf-check 1180 utf-check-1180-2-130-0.jnk \ {File "%TEMP%/utf-check-1180-2-130-0.jnk" has 4 bytes. Starts with UTF-8 BOM: no Starts with UTF-16 BOM: yes @@ -24121,41 +24121,41 @@ Has flag LOOK_LONG: no Has flag LOOK_INVALID: yes Has flag LOOK_ODD: no Has flag LOOK_SHORT: no} -#utf-check 1586 utf-check-1586-3-128-0.jnk \ -#{File "%TEMP%/utf-check-1586-3-128-0.jnk" has 6 bytes. -#Starts with UTF-8 BOM: no -#Starts with UTF-16 BOM: reversed -#Looks like UTF-16: no -#Has flag LOOK_NUL: yes -#Has flag LOOK_CR: no -#Has flag LOOK_LONE_CR: no -#Has flag LOOK_LF: no -#Has flag LOOK_LONE_LF: no -#Has flag LOOK_CRLF: no -#Has flag LOOK_LONG: no -#Has flag LOOK_INVALID: no -#Has flag LOOK_ODD: no -#Has flag LOOK_SHORT: no} - -#utf-check 1587 utf-check-1587-3-128-1.jnk \ -#{File "%TEMP%/utf-check-1587-3-128-1.jnk" has 7 bytes. -#Starts with UTF-8 BOM: no -#Starts with UTF-16 BOM: reversed -#Looks like UTF-8: no -#Has flag LOOK_NUL: yes -#Has flag LOOK_CR: no -#Has flag LOOK_LONE_CR: no -#Has flag LOOK_LF: no -#Has flag LOOK_LONE_LF: no -#Has flag LOOK_CRLF: no -#Has flag LOOK_LONG: no -#Has flag LOOK_INVALID: yes -#Has flag LOOK_ODD: no -#Has flag LOOK_SHORT: no} +utf-check 1586 utf-check-1586-3-128-0.jnk \ +{File "%TEMP%/utf-check-1586-3-128-0.jnk" has 6 bytes. +Starts with UTF-8 BOM: no +Starts with UTF-16 BOM: no +Looks like UTF-8: no +Has flag LOOK_NUL: yes +Has flag LOOK_CR: no +Has flag LOOK_LONE_CR: no +Has flag LOOK_LF: no +Has flag LOOK_LONE_LF: no +Has flag LOOK_CRLF: no +Has flag LOOK_LONG: no +Has flag LOOK_INVALID: yes +Has flag LOOK_ODD: no +Has flag LOOK_SHORT: no} + +utf-check 1587 utf-check-1587-3-128-1.jnk \ +{File "%TEMP%/utf-check-1587-3-128-1.jnk" has 7 bytes. +Starts with UTF-8 BOM: no +Starts with UTF-16 BOM: no +Looks like UTF-8: no +Has flag LOOK_NUL: yes +Has flag LOOK_CR: no +Has flag LOOK_LONE_CR: no +Has flag LOOK_LF: no +Has flag LOOK_LONE_LF: no +Has flag LOOK_CRLF: no +Has flag LOOK_LONG: no +Has flag LOOK_INVALID: yes +Has flag LOOK_ODD: no +Has flag LOOK_SHORT: no} utf-check 1588 utf-check-1588-3-129-0.jnk \ {File "%TEMP%/utf-check-1588-3-129-0.jnk" has 6 bytes. Starts with UTF-8 BOM: no Starts with UTF-16 BOM: no Index: www/changes.wiki ================================================================== --- www/changes.wiki +++ www/changes.wiki @@ -1,15 +1,15 @@
https://fossil-scm.org/home/doc/2010-01-01/www/index.wiki +https://fossil-scm.org/home/doc/2010-01-01/www/index.wikiThe file that encodes this document is stored in the fossil source tree under the name "www/embeddeddoc.wiki" and so that name forms the last part of the URL for this document. Index: www/gitusers.md ================================================================== --- www/gitusers.md +++ www/gitusers.md @@ -139,13 +139,13 @@ #### Closing a Check-Out The [`fossil close`][close] command dissociates a check-out directory from the -Fossil repository database, _nondestructively_ inverting [`fossil open`][open]. -(Contrast Git’s [closest alternative](#worktree), `git worktree remove`, which *is* -destructive!) This Fossil command does not +Fossil repository database, nondestructively inverting [`fossil open`][open]. +(Contrast [its closest inverse](#worktree), `git worktree remove`, which *is* +destructive in Git!) This Fossil command does not remove the managed files, and unless you give the `--force` option, it won’t let you close the check-out with uncommitted changes to those managed files. The `close` command also refuses to run without `--force` when you have @@ -300,15 +300,15 @@ Yet the constants are *not* equal because Fossil reads from a single disk file rather than visit potentially many files in sequence as Git must, so the OS’s buffer cache can result in [still better performance][35pct]. -Unlike Git’s log, Fossil’s timeline shows info across all branches by -default, a feature for maintaining better situational awareness. -It is possible to restrict the timeline to a single branch using `fossil timeline -b`. -Similarly, to restrict the timeline using the web UI equivalent, -click the name of a branch on the `/timeline` or `/brlist` page. (Or +Unlike Git’s log, Fossil’s timeline shows info across branches by +default, a feature for maintaining better situational awareness. Although the +`fossil timeline` command has no way to show a single branch’s commits, +you can restrict your view like this using the web UI equivalent by +clicking the name of a branch on the `/timeline` or `/brlist` page. (Or manually, by adding the `r=` query parameter.) Note that even in this case, the Fossil timeline still shows other branches where they interact with the one you’ve referenced in this way; again, better situational awareness. @@ -457,67 +457,28 @@ [cskin]: ./customskin.md [lsl]: https://chris.beams.io/posts/git-commit/#limit-50 - -## Fossil Never Auto-Commits - -There are several features in Git besides its `commit` command that -produce a new commit to the repository, and by default, they do it -without prompting or even asking for a commit message. These include -Git’s [`rebase`](#rebase), `merge`, and [`cherrypick`](#cpickrev) -commands, plus the [commit splitting](#comsplit) sub-feature -“`git commit -p`”. - -Fossil never does this, on firm philosophical grounds: we wish to be -able to test that each potentially repository-changing command does not -break anything _before_ freezing it immutably into the [Merkle -tree](./blockchain.md). Where Fossil has equivalent commands, they -modify the checkout tree alone, requiring a separate `commit` command -afterward, withheld until the user has satisfied themselves that the -command’s result is correct. - -We believe this is the main reason Git lacks an [autosync](#autosync) -feature: making push a manual step gives the user a chance to rewrite -history after triggering one of these autocommits locally, should the -automatic commit fail to work out as expected. Fossil chooses the -inverse path under the philosophy that commits are *commitments,* not -something you’re allowed to go back and rewrite later. - -This is also why there is no automatic commit message writing feature in -Fossil, as in these autocommit-triggering Git commands. The user is -meant to write the commit message by hand after they are sure it’s -correct, in clear-headed retrospective fashion. Having the tool do it -prospectively before one can test the result is simply backwards. - ## There Is No Staging Area Fossil omits the "Git index" or "staging area" concept. When you type "`fossil commit`" _all_ changes in your check-out are committed, -by default. There is no need for the "-a" option as with Git. +automatically. There is no need for the "-a" option as with Git. If you only want to commit _some_ of the changes, list the names of the files or directories you want to commit as arguments, like this: fossil commit src/feature.c doc/feature.md examples/feature Note that the last element is a directory name, meaning “any changed file under the `examples/feature` directory.” - - -## Commit Splitting - -[Git’s commit splitting features][gcspl] rely on -other features of Git that Fossil purposefully lacks, as covered in the -prior two sections: [autocommit](#autocommit) and [the staging -area](#staging). - -While there is no direct Fossil equivalent for +Although there are currently no +[commit splitting][gcspl] features in Fossil like `git add -p`, `git commit -p`, or `git rebase -i`, you can get the same effect by converting an uncommitted change set to a patch and then running it through [Patchouli]. Rather than use `fossil diff -i` to produce such a patch, a safer and @@ -533,17 +494,28 @@ hunks already applied. In this way, the combination of working tree and stash replaces the need for Git’s index feature. -We believe we know how to do commit splitting in a way compatible with -the Fossil philosophy, without following Git’s ill-considered design -leads. It amounts to automating the above process through an interactive -variant of [`fossil stash apply`][stash], as currently prototyped in the -third-party tool [`fnc`][fnc] and [its interactive `stash` -command][fncsta]. We merely await someone’s [contribution][ctrb] of this -feature into Fossil proper. +This also solves a philosophical problem with `git commit -p`: how can +you test that a split commit doesn’t break anything if you do it as part +of the commit action? Git’s lack of an autosync feature means you can +commit locally and then rewrite history if the commit doesn’t work out, +but we’d rather make changes only to the working directory, test the +changes there, and only commit once we’re sure it’s right. + +This also explains why we don’t have anything like `git rebase -i` +to split an existing commit: in Fossil, commits are *commitments,* not +something you’re allowed to go back and rewrite later. + +If someone does [contribute][ctrb] a commit splitting feature to Fossil, +we’d expect it to be an interactive form of +[`fossil stash apply`][stash], rather than follow Git’s ill-considered +design leads. + +Until then, there’s the third-party tool [`fnc`][fnc] and +[its interactive `stash` command][fncsta]. [ctrb]: https://fossil-scm.org/fossil/doc/trunk/www/contribute.wiki [fnc]: https://fnc.bsdbox.org/ [fncsta]: https://fnc.bsdbox.org/uv/doc/fnc.1.html#stash [gcspl]: https://git-scm.com/docs/git-rebase#_splitting_commits @@ -845,27 +817,57 @@ come up with a new objection that we haven’t already considered and addressed there. There is only one sub-feature of `git rebase` that is philosophically compatible with Fossil yet which currently has no functional equivalent. -We [covered this and the workaround for its lack](#comsplit) above. +We [covered this and the workaround for its lack](#csplit) above. [3]: ./rebaseharm.md - -## Colorized Diffs +## Colorized Diffs When you run `git diff` on an ANSI X3.64 capable terminal, it uses color to distinguish insertions, deletions, and replacements, but as of this writing, `fossil diff` produces traditional uncolored [unified diff format][udiff] output, suitable for producing a [patch file][pfile]. -There are [many methods](./colordiff.md) for solving this. +Nevertheless, there are multiple ways to get colorized diff output from +Fossil: + +* The most direct method is to delegate diff behavior back to Git: + + fossil set --global diff-command 'git diff --no-index' + + The flag permits it to diff files that aren’t inside a Git repository. + +* Another method is to install [`colordiff`][cdiff] — included in + [many package systems][cdpkg] — then say: + + fossil set --global diff-command 'colordiff -wu' + + Because this is unconditional, unlike `git diff --color=auto`, you + will then have to remember to add the `-i` option to `fossil diff` + commands when you want color disabled, such as when producing + `patch(1)` files or piping diff output to another command that + doesn’t understand ANSI escape sequences. There’s an example of this + [below](#dstat). + +* Use the Fossil web UI to diff existing commits. + +* To diff the current working directory contents against some parent + instead, Fossil’s diff command can produce + colorized HTML output and open it in the OS’s default web browser. + For example, `fossil diff -by` will show side-by-side diffs. + +* Use the older `fossil diff --tk` option to do much the same using + Tcl/Tk instead of a browser. + Viewed this way, Fossil doesn’t lack colorized diffs, it simply has *one* method where they *aren’t* colorized. +[cdpkg]: https://repology.org/project/colordiff/versions [pfile]: https://en.wikipedia.org/wiki/Patch_(Unix) [udiff]: https://en.wikipedia.org/wiki/Diff#Unified_format ## Showing Information About Commits @@ -934,17 +936,19 @@ a histogram in its default output mode rather than bare integers: fossil diff -i -v --from 2020-04-01 | diffstat We gave the `-i` flag in both cases to force Fossil to use its internal -diff implementation, bypassing [your local `diff-command` setting][dcset] -since the `--numstat` option has no effect when you have an external diff -command set. +diff implementation, bypassing [your local `diff-command` setting][dcset]. +The `--numstat` option has no effect when you have an external diff +command set, and some diff command alternatives like +[`colordiff`][cdiff] (covered [above](#cdiff)) produce output that confuses `diffstat`. If you leave off the `-v` flag in the second example, the `diffstat` output won’t include info about any newly-added files. +[cdiff]: https://www.colordiff.org/ [dcset]: https://fossil-scm.org/home/help?cmd=diff-command [dst]: https://invisible-island.net/diffstat/diffstat.html Index: www/hints.wiki ================================================================== --- www/hints.wiki +++ www/hints.wiki @@ -1,11 +1,9 @@Fossil Tips And Usage Hints -A collection of useful hints and tricks in no particular order: - - 1. Click on two nodes of any timeline graph in succession - to see a diff between the two versions. + 1. Click on nodes of any timeline graph to see diffs between the two + selected versions. 2. Add the "--tk" option to "[/help?cmd=diff | fossil diff]" commands to get a pop-up window containing a complete side-by-side diff. (NB: The pop-up window is run as a separate Tcl/Tk process, so you will need to @@ -60,15 +58,5 @@ 10. When editing documentation to be checked in as managed files, you can preview what the documentation will look like by using the special "ckout" branch name in the "doc" URL while running "fossil ui". See the [./embeddeddoc.wiki | embedded documentation] for details. - - 11. Use the "[/help?cmd=ui|fossil ui /]" command to bring up a menu of - all of your local Fossil repositories in your web browser. - - 12. If you have a bunch of Fossil repositories living on a remote machine - that you are able to access using ssh using a command like - "ssh login@remote", then you can bring up a user interface for all - those remote repositories using the command: - "[/help?cmd=ui|fossil ui login@remote:/]". This works by tunneling - all HTTP traffic through SSH to the remote machine. Index: www/index.wiki ================================================================== --- www/index.wiki +++ www/index.wiki @@ -84,16 +84,16 @@ the repository are consistent prior to each commit. 8. Free and Open-Source — [../COPYRIGHT-BSD2.txt|2-clause BSD license].
-Latest Release: 2.24 ([/timeline?c=version-2.24|2024-04-23])
+Latest Release: 2.23 ([/timeline?c=version-2.23|2023-11-01])
* [/uv/download.html|Download] - * [./changes.wiki#v2_24|Change Summary] - * [/timeline?p=version-2.24&bt=version-2.23&y=ci|Check-ins in version 2.24] - * [/timeline?df=version-2.24&y=ci|Check-ins derived from the 2.24 release] + * [./changes.wiki#v2_23|Change Summary] + * [/timeline?p=version-2.23&bt=version-2.22&y=ci|Check-ins in version 2.23] + * [/timeline?df=version-2.23&y=ci|Check-ins derived from the 2.23 release] * [/timeline?t=release|Timeline of all past releases]
Quick Start
Index: www/mkindex.tcl ================================================================== --- www/mkindex.tcl +++ www/mkindex.tcl @@ -35,11 +35,10 @@ checkin.wiki {Check-in Checklist} childprojects.wiki {Child Projects} chroot.md {Server Chroot Jail} ckout-workflows.md {Check-Out Workflows} co-vs-up.md {Checkout vs Update} - colordiff.md {Colorized Diffs} copyright-release.html {Contributor License Agreement} concepts.wiki {Fossil Core Concepts} contact.md {Developer Contact Information} containers.md {OCI Containers} contribute.wiki {Contributing Code or Documentation To The Fossil Project} Index: www/permutedindex.html ================================================================== --- www/permutedindex.html +++ www/permutedindex.html @@ -35,11 +35,10 @@