Fossil SCM

Stash doesn't save files without using "fossil changes" before

Fixed

bfef8e4f89cd4b1… · opened 15 years, 2 months ago

Type
Code_Defect
Priority
Severity
Critical
Resolution
Fixed
Subsystem
Created
Jan. 18, 2011 1:05 a.m.

After making changes, doing "fossil stash", and looking into FOSSIL with SQLite, I can't find entries for changed files in stashfile table.

I think vfile_check_signature(vid, 0, 0); should be put somewhere in stash_create.


dmitry added on 2011-01-18 01:08:35 UTC: Hm... shouldn't revert_cmd also update vfile? Seems like it's not. I'll get back with details.


dmitry added on 2011-01-18 01:21:52 UTC: Test case:



$ mkdir test
$ fossil new test.fossil
project-id: 755eae875fa636930aa6632774b6efd6a3dfaac2
server-id:  9f8a7e68aad9f9a841f2bc50f8cbba69686473a7
admin-user: dmitry (initial password is "0378ff")
$ cd test
$ fossil open ../test.fossil 
$ echo "Hello" > file.txt
$ fossil add file.txt 
ADDED  file.txt
$ fossil commit -m "Initial commit"
New_Version: 05ac6ff529aaea66a245e4caef85f74d11cf06e2
$ echo "edited" >> file.txt
$ fossil stash
REVERTED: file.txt
$ fossil stash diff
(nothing)
$ sqlite3 _FOSSIL_ "SELECT * FROM stashfile"
(nothing)
$ sqlite3 _FOSSIL_ "SELECT * FROM stash"
1|3||2455579.55262627

Now, using fossil changes before stashing, which works:

$ cd ..
$ rm -r test.fossil test
$ mkdir test
$ fossil new test.fossil
project-id: eb268780a7e272e2d24a9a5aef50daf95f1ea057
server-id:  58b2e74f0c914e8bd01d7f336e59c619b8eb17c6
admin-user: dmitry (initial password is "49059c")
$ cd test
$ fossil open ../test.fossil 
$ echo "Hello" > file.txt
$ fossil add file.txt 
ADDED  file.txt
$ fossil commit -m "Initial commit"
New_Version: 71d5025350f6c4501816229f04ed85d6c9be61e7
$ echo "edited" >> file.txt
$ fossil changes
EDITED     file.txt
$ fossil stash
REVERTED: file.txt
$ fossil stash diff
CHANGED file.txt
--- file.txt
+++ file.txt
@@ -1,1 +1,2 @@
 Hello
+edited

$ sqlite3 _FOSSIL_ "SELECT * FROM stashfile"
1|2|0|0||file.txt|file.txt|D
D:Hello
edited
fu3Sp;

dmitry added on 2011-01-18 01:44:02 UTC: Got it. This is because revert_cmd clears chnged and deleted bits after reverting, so my original proposal to include vfile_check_signature(vid, 0, 0) in stash_create stands. Sorry for the monologue.


dmitry added on 2011-01-18 02:03:39 UTC: Disregard my last comment this being because of revert, it's called after stashing :-)



Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button