Ticket UUID: | 5cc33a6aa0621be8936f7b34b8c8e0e8f16f9ce7 | ||
Title: | Committing one file while another is pending delete will commit both files. | ||
Status: | Fixed | Type: | Code_Defect |
Severity: | Important | Priority: | |
Subsystem: | Resolution: | Fixed | |
Last Modified: | 2010-11-25 01:30:16 | ||
Version Found In: | cf178577ec | ||
Description & Comments: | |||
It seems that I have found a bug in fossil. I found this as I was trying to add a file but a diff of my commit shows that I removed one as well. However when I committed, I only specified the file that I wanted to add:
# fossil commit path/to/file_to_add -m "Added file." I performed the following operations to test and reproduce the bug: # mkdir /tmp/fossilbug # cd /tmp/fossilbug # fossil new my.fossil project-id: 2b1773e0efaf0a28844f51226f4dcf88ff7ed73b server-id: 1b7807e55a0d9c863b0e47063d59ef700d7f03cc admin-user: admin (initial password is "15b831") # fossil open my.fossil # date > file1 # date > file2 # date > file3 # date > file4 # fossil add file* ADDED file1 ADDED file2 ADDED file3 ADDED file4 # fossil commit -m "Added 4 test files" New_Version: 181cd0b02dfd84476e804eb9230e87c7ff26bdcb # fossil delete file1 DELETED file1 # date > file4 # fossil changes DELETED file1 EDITED file4 # fossil commit file4 -m "committing ONLY the modified while a file is pending deleted" New_Version: 98de35d30e35a6a206c943b7b34afbe4744db2cf # fossil changes DELETED file1 As you can see, I created a new fossil repo for my test. Added 4 files with random content and committed. Then I removed one file and I modified another. I commit the file that I modified but not the file that I removed. In my local folder, the deleted file is still pending. However... if you use finfo or diff.. you will see that the file WAS deleted on my commit. # fossil finfo file1 History of file1 2010-11-23 [98de35d30e] DELETED test modified while a file is pending deleted (user: roychri) 2010-11-23 [181cd0b02d] test 1 (user: roychri, artifact: [99d7a1f973]) # fossil diff --from 181cd0b02dfd84476e804eb9230e87c7ff26bdcb --to 98de35d30e35a6a206c943b7b34afbe4744db2cf DELETED file1 CHANGED file4 Index: file4 =================================================================== --- file4 +++ file4 @@ -1,1 +1,1 @@ -Tue 23 Nov 2010 10:14:01 EST +Tue 23 Nov 2010 10:14:32 EST Then when I commit the deleted file, it creates an empty commit (diff empty and not files in list). CONCLUSION: I cannot perform a partial commit (where I specify each file on the command line) when I have pending deleted files that I am NOT ready to commit. anonymous added on 2010-11-24 14:06:58: You can view source to see it well. The admins of this site can put a "pre" HTML tag around my text so the formatting is better. I cannot seem to be able to edit my previous entry. anonymous added on 2010-11-25 01:30:16: Thanks |