diff options
author | phk <phk@FreeBSD.org> | 2000-01-15 19:45:18 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2000-01-15 19:45:18 +0000 |
commit | 573e577b6fdd9128ba293a8bd68b8648fd0bf704 (patch) | |
tree | 3ca5d5c33a5b891235262fc422464e405de15eb7 /usr.sbin/ctm | |
parent | 71ddc094786915d61c422e38dab1eb7a81e25daf (diff) | |
download | FreeBSD-src-573e577b6fdd9128ba293a8bd68b8648fd0bf704.zip FreeBSD-src-573e577b6fdd9128ba293a8bd68b8648fd0bf704.tar.gz |
|Since I had suffered from partially applied CTM deltas, some time ago,
|I made ctm ignore deltas for files that match the "after edit" MD5.
|(In one case, I had the compiler fill all temporary space while CTM
|was editing files.)
Submitted by: se
Reviewed by: phk
Diffstat (limited to 'usr.sbin/ctm')
-rw-r--r-- | usr.sbin/ctm/ctm/ctm_pass2.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/usr.sbin/ctm/ctm/ctm_pass2.c b/usr.sbin/ctm/ctm/ctm_pass2.c index ea29895..be4dbf2 100644 --- a/usr.sbin/ctm/ctm/ctm_pass2.c +++ b/usr.sbin/ctm/ctm/ctm_pass2.c @@ -154,7 +154,12 @@ Pass2(FILE *fd) strcmp(tmp,p)) { fprintf(stderr," %s: %s md5 mismatch.\n", sp->Key,name); - if(j & CTM_Q_MD5_Force) { + GETFIELDCOPY(md5,sep); + if(md5 != NULL && strcmp(tmp,md5) == 0) { + fprintf(stderr," %s: %s already applied.\n", + sp->Key,name); + match = CTM_FILTER_DISABLE; + } else if(j & CTM_Q_MD5_Force) { if(Force) fprintf(stderr," Can and will force.\n"); else @@ -165,9 +170,10 @@ Pass2(FILE *fd) } } break; - } - if(j & CTM_Q_MD5_After) { - GETFIELDCOPY(md5,sep); + } else if(j & CTM_Q_MD5_After) { + if(md5 == NULL) { + GETFIELDCOPY(md5,sep); + } break; } /* Unqualified MD5 */ |