Often I want to diff a source file that has no changes, i.e. I want to diff the
last commit on that file. This requires a fossil finfo followed by fossil diff
and I have to type a ten digit hex checkin id. For example:
PS C:\rev\src\sqlite3> fossil finfo src/mem2.c --limit 2
History of src/mem2.c
2010-03-08 [1a88e31b03] Correct an assert() in mem2.c (test code only). (user:
dan, artifact: [ee75229765])
2010-01-06 [541e2b488e] Update the OS-X branch to include all trunk changes
through version 3.6.22. (user: drh, artifact: [92b4f772b1])
PS C:\rev\src\sqlite3> fossil diff src/mem2.c --from 541e2b488e
--- src/mem2.c
+++ src/mem2.c
@@ -298,11 +298,12 @@
*/
static void sqlite3MemFree(void *pPrior){
struct MemBlockHdr *pHdr;
void **pBt;
char *z;
- assert( sqlite3GlobalConfig.bMemstat || mem.mutex!=0 );
+ assert( sqlite3GlobalConfig.bMemstat || sqlite3GlobalConfig.bCoreMutex==0
+ || mem.mutex!=0 );
pHdr = sqlite3MemsysGetHeader(pPrior);
pBt = (void**)pHdr;
pBt -= pHdr->nBacktraceSlots;
sqlite3_mutex_enter(mem.mutex);
if( pHdr->pPrev ){
It would be nice to be able to just request a diff from the Nth previous
commit. Fossil could do the lookup of checkin ids for me, because frankly, I
don't think in 10 digit hex checkin ids but fossil does. I propose the
following syntax:
fossil diff --nfrom X --nto Y ?FILE?
where X and Y are integer counts backwards from the current checked in version
(X=0 is the latest committed version). Omitting --nto means you want to diff
the current source on disk. For example:
fossil diff src/mem2.c --nfrom 1 --nto 0
Hypothetically, this would give me a diff from the current committed version to
the version just prior to that. Or, if the file has no changes, the --nto
option could be omitted.
Does that resonate with anyone?
RW
Ron Wilson, Engineering Project Lead
(o) 434.455.6453, (m) 434.851.1612, www.harris.com
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users