Fossil SCM
Inconsistency between commands ls and changes
92fedcbc7de6ae7…
· opened 11 years, 2 months ago
- Type
- Code_Defect
- Priority
- —
- Severity
- Minor
- Resolution
- Open
- Subsystem
- —
- Created
- Feb. 8, 2015 5:17 p.m.
Files added (not yet committed) and deleted outside fossil are reported by 'fossil status' and 'fossil changes' as MISSING, while 'fossil ls -v' shows them as ADDED.
I think 'fossil ls' gets it wrong.
The difference originates in checkin.c -- 'status' and 'changes' call status_report() while 'ls' calls ls_cmd(). Both functions do almost the same but in a different sequence:
status_report()
...
if( isDeleted ){
...
}else if( !file_wd_isfile_or_link(zFullName) ){
...
}else if( isNew ){
...
}else if( isChnged ){
...
ls_cmd()
...
if( isNew ){
...
}else if( isDeleted ){
...
}else if( !file_wd_isfile_or_link(zFullName) ){
...
}else if( chnged ){
...
The "isNew"-Check really should be done after file_wd_isfile_or_link()
Comments (2)
Files added (not yet committed) and deleted outside fossil are reported by 'fossil status' and 'fossil changes' as MISSING, while 'fossil ls -v' shows them as ADDED.
I think 'fossil ls' gets it wrong.
The difference originates in checkin.c -- 'status' and 'changes' call status_report() while 'ls' calls ls_cmd(). Both functions do almost the same but in a different sequence:
status_report()
...
if( isDeleted ){
...
}else if( !file_wd_isfile_or_link(zFullName) ){
...
}else if( isNew ){
...
}else if( isChnged ){
...
ls_cmd()
...
if( isNew ){
...
}else if( isDeleted ){
...
}else if( !file_wd_isfile_or_link(zFullName) ){
...
}else if( chnged ){
...
The "isNew"-Check really should be done after file_wd_isfile_or_link()
json_page_status() has -- besides of a different wording/casefolding -- yet another sequence of checking:
# isDeleted # isNew # isRenamed # file exists # isChanged
I think a MISSING file needs attention and really should be on position #2 in all three reporting functions.