Fossil SCM

merge trunk

jan.nijtmans 2014-03-18 08:39 UTC pending-review merge
Commit 5efa7d2e62206313ca75f01b3f3ed8bc070a7035
+6 -5
--- src/diff.c
+++ src/diff.c
@@ -32,11 +32,10 @@
3232
#define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */
3333
#define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */
3434
#define DIFF_IGNORE_ALLWS ((u64)0x03000000) /* Ignore all whitespace */
3535
#define DIFF_SIDEBYSIDE ((u64)0x04000000) /* Generate a side-by-side diff */
3636
#define DIFF_VERBOSE ((u64)0x08000000) /* Missing shown as empty files */
37
-#define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */
3837
#define DIFF_BRIEF ((u64)0x10000000) /* Show filenames only */
3938
#define DIFF_HTML ((u64)0x20000000) /* Render for HTML */
4039
#define DIFF_LINENO ((u64)0x40000000) /* Show line numbers */
4140
#define DIFF_NOOPT (((u64)0x01)<<32) /* Suppress optimizations (debug) */
4241
#define DIFF_INVERT (((u64)0x02)<<32) /* Invert the diff (debug) */
@@ -114,11 +113,11 @@
114113
int nEditAlloc; /* Space allocated for aEdit[] */
115114
DLine *aFrom; /* File on left side of the diff */
116115
int nFrom; /* Number of lines in aFrom[] */
117116
DLine *aTo; /* File on right side of the diff */
118117
int nTo; /* Number of lines in aTo[] */
119
- int (*same_fn)(DLine *, DLine *); /* Function to be used for comparing */
118
+ int (*same_fn)(const DLine *, const DLine *); /* Function to be used for comparing */
120119
};
121120
122121
/*
123122
** Return an array of DLine objects containing a pointer to the
124123
** start of each line and a hash of that line. The lower
@@ -167,14 +166,15 @@
167166
168167
/* Fill in the array */
169168
for(i=0; i<nLine; i++){
170169
for(j=0; z[j] && z[j]!='\n'; j++){}
171170
a[i].z = z;
171
+ k = j;
172172
if( diffFlags & DIFF_STRIP_EOLCR ){
173173
if( k>0 && z[k-1]=='\r' ){ k--; }
174174
}
175
- a[i].n = k = j;
175
+ a[i].n = k;
176176
s = 0;
177177
if( diffFlags & DIFF_IGNORE_EOLWS ){
178178
while( k>0 && fossil_isspace(z[k-1]) ){ k--; }
179179
}
180180
if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
@@ -207,21 +207,21 @@
207207
}
208208
209209
/*
210210
** Return true if two DLine elements are identical.
211211
*/
212
-static int same_dline(DLine *pA, DLine *pB){
212
+static int same_dline(const DLine *pA, const DLine *pB){
213213
return pA->h==pB->h && memcmp(pA->z,pB->z, pA->h&LENGTH_MASK)==0;
214214
}
215215
216216
/*
217217
** Return true if two DLine elements are identical, ignoring
218218
** all whitespace. The indent field of pA/pB already points
219219
** to the first non-space character in the string.
220220
*/
221221
222
-static int same_dline_ignore_allws(DLine *pA, DLine *pB){
222
+static int same_dline_ignore_allws(const DLine *pA, const DLine *pB){
223223
int a = pA->indent, b = pB->indent;
224224
if( pA->h==pB->h ){
225225
while( a<pA->n && b<pB->n ){
226226
if( pA->z[a++] != pB->z[b++] ) return 0;
227227
while( a<pA->n && fossil_isspace(pA->z[a])) ++a;
@@ -2189,10 +2189,11 @@
21892189
*/
21902190
unsigned gradient_color(unsigned c1, unsigned c2, int n, int i){
21912191
unsigned c; /* Result color */
21922192
unsigned x1, x2;
21932193
if( i==0 || n==0 ) return c1;
2194
+ else if(i>=n) return c2;
21942195
x1 = (c1>>16)&0xff;
21952196
x2 = (c2>>16)&0xff;
21962197
c = (x1*(n-i) + x2*i)/n<<16 & 0xff0000;
21972198
x1 = (c1>>8)&0xff;
21982199
x2 = (c2>>8)&0xff;
21992200
--- src/diff.c
+++ src/diff.c
@@ -32,11 +32,10 @@
32 #define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */
33 #define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */
34 #define DIFF_IGNORE_ALLWS ((u64)0x03000000) /* Ignore all whitespace */
35 #define DIFF_SIDEBYSIDE ((u64)0x04000000) /* Generate a side-by-side diff */
36 #define DIFF_VERBOSE ((u64)0x08000000) /* Missing shown as empty files */
37 #define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */
38 #define DIFF_BRIEF ((u64)0x10000000) /* Show filenames only */
39 #define DIFF_HTML ((u64)0x20000000) /* Render for HTML */
40 #define DIFF_LINENO ((u64)0x40000000) /* Show line numbers */
41 #define DIFF_NOOPT (((u64)0x01)<<32) /* Suppress optimizations (debug) */
42 #define DIFF_INVERT (((u64)0x02)<<32) /* Invert the diff (debug) */
@@ -114,11 +113,11 @@
114 int nEditAlloc; /* Space allocated for aEdit[] */
115 DLine *aFrom; /* File on left side of the diff */
116 int nFrom; /* Number of lines in aFrom[] */
117 DLine *aTo; /* File on right side of the diff */
118 int nTo; /* Number of lines in aTo[] */
119 int (*same_fn)(DLine *, DLine *); /* Function to be used for comparing */
120 };
121
122 /*
123 ** Return an array of DLine objects containing a pointer to the
124 ** start of each line and a hash of that line. The lower
@@ -167,14 +166,15 @@
167
168 /* Fill in the array */
169 for(i=0; i<nLine; i++){
170 for(j=0; z[j] && z[j]!='\n'; j++){}
171 a[i].z = z;
 
172 if( diffFlags & DIFF_STRIP_EOLCR ){
173 if( k>0 && z[k-1]=='\r' ){ k--; }
174 }
175 a[i].n = k = j;
176 s = 0;
177 if( diffFlags & DIFF_IGNORE_EOLWS ){
178 while( k>0 && fossil_isspace(z[k-1]) ){ k--; }
179 }
180 if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
@@ -207,21 +207,21 @@
207 }
208
209 /*
210 ** Return true if two DLine elements are identical.
211 */
212 static int same_dline(DLine *pA, DLine *pB){
213 return pA->h==pB->h && memcmp(pA->z,pB->z, pA->h&LENGTH_MASK)==0;
214 }
215
216 /*
217 ** Return true if two DLine elements are identical, ignoring
218 ** all whitespace. The indent field of pA/pB already points
219 ** to the first non-space character in the string.
220 */
221
222 static int same_dline_ignore_allws(DLine *pA, DLine *pB){
223 int a = pA->indent, b = pB->indent;
224 if( pA->h==pB->h ){
225 while( a<pA->n && b<pB->n ){
226 if( pA->z[a++] != pB->z[b++] ) return 0;
227 while( a<pA->n && fossil_isspace(pA->z[a])) ++a;
@@ -2189,10 +2189,11 @@
2189 */
2190 unsigned gradient_color(unsigned c1, unsigned c2, int n, int i){
2191 unsigned c; /* Result color */
2192 unsigned x1, x2;
2193 if( i==0 || n==0 ) return c1;
 
2194 x1 = (c1>>16)&0xff;
2195 x2 = (c2>>16)&0xff;
2196 c = (x1*(n-i) + x2*i)/n<<16 & 0xff0000;
2197 x1 = (c1>>8)&0xff;
2198 x2 = (c2>>8)&0xff;
2199
--- src/diff.c
+++ src/diff.c
@@ -32,11 +32,10 @@
32 #define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */
33 #define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */
34 #define DIFF_IGNORE_ALLWS ((u64)0x03000000) /* Ignore all whitespace */
35 #define DIFF_SIDEBYSIDE ((u64)0x04000000) /* Generate a side-by-side diff */
36 #define DIFF_VERBOSE ((u64)0x08000000) /* Missing shown as empty files */
 
37 #define DIFF_BRIEF ((u64)0x10000000) /* Show filenames only */
38 #define DIFF_HTML ((u64)0x20000000) /* Render for HTML */
39 #define DIFF_LINENO ((u64)0x40000000) /* Show line numbers */
40 #define DIFF_NOOPT (((u64)0x01)<<32) /* Suppress optimizations (debug) */
41 #define DIFF_INVERT (((u64)0x02)<<32) /* Invert the diff (debug) */
@@ -114,11 +113,11 @@
113 int nEditAlloc; /* Space allocated for aEdit[] */
114 DLine *aFrom; /* File on left side of the diff */
115 int nFrom; /* Number of lines in aFrom[] */
116 DLine *aTo; /* File on right side of the diff */
117 int nTo; /* Number of lines in aTo[] */
118 int (*same_fn)(const DLine *, const DLine *); /* Function to be used for comparing */
119 };
120
121 /*
122 ** Return an array of DLine objects containing a pointer to the
123 ** start of each line and a hash of that line. The lower
@@ -167,14 +166,15 @@
166
167 /* Fill in the array */
168 for(i=0; i<nLine; i++){
169 for(j=0; z[j] && z[j]!='\n'; j++){}
170 a[i].z = z;
171 k = j;
172 if( diffFlags & DIFF_STRIP_EOLCR ){
173 if( k>0 && z[k-1]=='\r' ){ k--; }
174 }
175 a[i].n = k;
176 s = 0;
177 if( diffFlags & DIFF_IGNORE_EOLWS ){
178 while( k>0 && fossil_isspace(z[k-1]) ){ k--; }
179 }
180 if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
@@ -207,21 +207,21 @@
207 }
208
209 /*
210 ** Return true if two DLine elements are identical.
211 */
212 static int same_dline(const DLine *pA, const DLine *pB){
213 return pA->h==pB->h && memcmp(pA->z,pB->z, pA->h&LENGTH_MASK)==0;
214 }
215
216 /*
217 ** Return true if two DLine elements are identical, ignoring
218 ** all whitespace. The indent field of pA/pB already points
219 ** to the first non-space character in the string.
220 */
221
222 static int same_dline_ignore_allws(const DLine *pA, const DLine *pB){
223 int a = pA->indent, b = pB->indent;
224 if( pA->h==pB->h ){
225 while( a<pA->n && b<pB->n ){
226 if( pA->z[a++] != pB->z[b++] ) return 0;
227 while( a<pA->n && fossil_isspace(pA->z[a])) ++a;
@@ -2189,10 +2189,11 @@
2189 */
2190 unsigned gradient_color(unsigned c1, unsigned c2, int n, int i){
2191 unsigned c; /* Result color */
2192 unsigned x1, x2;
2193 if( i==0 || n==0 ) return c1;
2194 else if(i>=n) return c2;
2195 x1 = (c1>>16)&0xff;
2196 x2 = (c2>>16)&0xff;
2197 c = (x1*(n-i) + x2*i)/n<<16 & 0xff0000;
2198 x1 = (c1>>8)&0xff;
2199 x2 = (c2>>8)&0xff;
2200
+6 -5
--- src/diff.c
+++ src/diff.c
@@ -32,11 +32,10 @@
3232
#define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */
3333
#define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */
3434
#define DIFF_IGNORE_ALLWS ((u64)0x03000000) /* Ignore all whitespace */
3535
#define DIFF_SIDEBYSIDE ((u64)0x04000000) /* Generate a side-by-side diff */
3636
#define DIFF_VERBOSE ((u64)0x08000000) /* Missing shown as empty files */
37
-#define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */
3837
#define DIFF_BRIEF ((u64)0x10000000) /* Show filenames only */
3938
#define DIFF_HTML ((u64)0x20000000) /* Render for HTML */
4039
#define DIFF_LINENO ((u64)0x40000000) /* Show line numbers */
4140
#define DIFF_NOOPT (((u64)0x01)<<32) /* Suppress optimizations (debug) */
4241
#define DIFF_INVERT (((u64)0x02)<<32) /* Invert the diff (debug) */
@@ -114,11 +113,11 @@
114113
int nEditAlloc; /* Space allocated for aEdit[] */
115114
DLine *aFrom; /* File on left side of the diff */
116115
int nFrom; /* Number of lines in aFrom[] */
117116
DLine *aTo; /* File on right side of the diff */
118117
int nTo; /* Number of lines in aTo[] */
119
- int (*same_fn)(DLine *, DLine *); /* Function to be used for comparing */
118
+ int (*same_fn)(const DLine *, const DLine *); /* Function to be used for comparing */
120119
};
121120
122121
/*
123122
** Return an array of DLine objects containing a pointer to the
124123
** start of each line and a hash of that line. The lower
@@ -167,14 +166,15 @@
167166
168167
/* Fill in the array */
169168
for(i=0; i<nLine; i++){
170169
for(j=0; z[j] && z[j]!='\n'; j++){}
171170
a[i].z = z;
171
+ k = j;
172172
if( diffFlags & DIFF_STRIP_EOLCR ){
173173
if( k>0 && z[k-1]=='\r' ){ k--; }
174174
}
175
- a[i].n = k = j;
175
+ a[i].n = k;
176176
s = 0;
177177
if( diffFlags & DIFF_IGNORE_EOLWS ){
178178
while( k>0 && fossil_isspace(z[k-1]) ){ k--; }
179179
}
180180
if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
@@ -207,21 +207,21 @@
207207
}
208208
209209
/*
210210
** Return true if two DLine elements are identical.
211211
*/
212
-static int same_dline(DLine *pA, DLine *pB){
212
+static int same_dline(const DLine *pA, const DLine *pB){
213213
return pA->h==pB->h && memcmp(pA->z,pB->z, pA->h&LENGTH_MASK)==0;
214214
}
215215
216216
/*
217217
** Return true if two DLine elements are identical, ignoring
218218
** all whitespace. The indent field of pA/pB already points
219219
** to the first non-space character in the string.
220220
*/
221221
222
-static int same_dline_ignore_allws(DLine *pA, DLine *pB){
222
+static int same_dline_ignore_allws(const DLine *pA, const DLine *pB){
223223
int a = pA->indent, b = pB->indent;
224224
if( pA->h==pB->h ){
225225
while( a<pA->n && b<pB->n ){
226226
if( pA->z[a++] != pB->z[b++] ) return 0;
227227
while( a<pA->n && fossil_isspace(pA->z[a])) ++a;
@@ -2189,10 +2189,11 @@
21892189
*/
21902190
unsigned gradient_color(unsigned c1, unsigned c2, int n, int i){
21912191
unsigned c; /* Result color */
21922192
unsigned x1, x2;
21932193
if( i==0 || n==0 ) return c1;
2194
+ else if(i>=n) return c2;
21942195
x1 = (c1>>16)&0xff;
21952196
x2 = (c2>>16)&0xff;
21962197
c = (x1*(n-i) + x2*i)/n<<16 & 0xff0000;
21972198
x1 = (c1>>8)&0xff;
21982199
x2 = (c2>>8)&0xff;
21992200
--- src/diff.c
+++ src/diff.c
@@ -32,11 +32,10 @@
32 #define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */
33 #define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */
34 #define DIFF_IGNORE_ALLWS ((u64)0x03000000) /* Ignore all whitespace */
35 #define DIFF_SIDEBYSIDE ((u64)0x04000000) /* Generate a side-by-side diff */
36 #define DIFF_VERBOSE ((u64)0x08000000) /* Missing shown as empty files */
37 #define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */
38 #define DIFF_BRIEF ((u64)0x10000000) /* Show filenames only */
39 #define DIFF_HTML ((u64)0x20000000) /* Render for HTML */
40 #define DIFF_LINENO ((u64)0x40000000) /* Show line numbers */
41 #define DIFF_NOOPT (((u64)0x01)<<32) /* Suppress optimizations (debug) */
42 #define DIFF_INVERT (((u64)0x02)<<32) /* Invert the diff (debug) */
@@ -114,11 +113,11 @@
114 int nEditAlloc; /* Space allocated for aEdit[] */
115 DLine *aFrom; /* File on left side of the diff */
116 int nFrom; /* Number of lines in aFrom[] */
117 DLine *aTo; /* File on right side of the diff */
118 int nTo; /* Number of lines in aTo[] */
119 int (*same_fn)(DLine *, DLine *); /* Function to be used for comparing */
120 };
121
122 /*
123 ** Return an array of DLine objects containing a pointer to the
124 ** start of each line and a hash of that line. The lower
@@ -167,14 +166,15 @@
167
168 /* Fill in the array */
169 for(i=0; i<nLine; i++){
170 for(j=0; z[j] && z[j]!='\n'; j++){}
171 a[i].z = z;
 
172 if( diffFlags & DIFF_STRIP_EOLCR ){
173 if( k>0 && z[k-1]=='\r' ){ k--; }
174 }
175 a[i].n = k = j;
176 s = 0;
177 if( diffFlags & DIFF_IGNORE_EOLWS ){
178 while( k>0 && fossil_isspace(z[k-1]) ){ k--; }
179 }
180 if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
@@ -207,21 +207,21 @@
207 }
208
209 /*
210 ** Return true if two DLine elements are identical.
211 */
212 static int same_dline(DLine *pA, DLine *pB){
213 return pA->h==pB->h && memcmp(pA->z,pB->z, pA->h&LENGTH_MASK)==0;
214 }
215
216 /*
217 ** Return true if two DLine elements are identical, ignoring
218 ** all whitespace. The indent field of pA/pB already points
219 ** to the first non-space character in the string.
220 */
221
222 static int same_dline_ignore_allws(DLine *pA, DLine *pB){
223 int a = pA->indent, b = pB->indent;
224 if( pA->h==pB->h ){
225 while( a<pA->n && b<pB->n ){
226 if( pA->z[a++] != pB->z[b++] ) return 0;
227 while( a<pA->n && fossil_isspace(pA->z[a])) ++a;
@@ -2189,10 +2189,11 @@
2189 */
2190 unsigned gradient_color(unsigned c1, unsigned c2, int n, int i){
2191 unsigned c; /* Result color */
2192 unsigned x1, x2;
2193 if( i==0 || n==0 ) return c1;
 
2194 x1 = (c1>>16)&0xff;
2195 x2 = (c2>>16)&0xff;
2196 c = (x1*(n-i) + x2*i)/n<<16 & 0xff0000;
2197 x1 = (c1>>8)&0xff;
2198 x2 = (c2>>8)&0xff;
2199
--- src/diff.c
+++ src/diff.c
@@ -32,11 +32,10 @@
32 #define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */
33 #define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */
34 #define DIFF_IGNORE_ALLWS ((u64)0x03000000) /* Ignore all whitespace */
35 #define DIFF_SIDEBYSIDE ((u64)0x04000000) /* Generate a side-by-side diff */
36 #define DIFF_VERBOSE ((u64)0x08000000) /* Missing shown as empty files */
 
37 #define DIFF_BRIEF ((u64)0x10000000) /* Show filenames only */
38 #define DIFF_HTML ((u64)0x20000000) /* Render for HTML */
39 #define DIFF_LINENO ((u64)0x40000000) /* Show line numbers */
40 #define DIFF_NOOPT (((u64)0x01)<<32) /* Suppress optimizations (debug) */
41 #define DIFF_INVERT (((u64)0x02)<<32) /* Invert the diff (debug) */
@@ -114,11 +113,11 @@
113 int nEditAlloc; /* Space allocated for aEdit[] */
114 DLine *aFrom; /* File on left side of the diff */
115 int nFrom; /* Number of lines in aFrom[] */
116 DLine *aTo; /* File on right side of the diff */
117 int nTo; /* Number of lines in aTo[] */
118 int (*same_fn)(const DLine *, const DLine *); /* Function to be used for comparing */
119 };
120
121 /*
122 ** Return an array of DLine objects containing a pointer to the
123 ** start of each line and a hash of that line. The lower
@@ -167,14 +166,15 @@
166
167 /* Fill in the array */
168 for(i=0; i<nLine; i++){
169 for(j=0; z[j] && z[j]!='\n'; j++){}
170 a[i].z = z;
171 k = j;
172 if( diffFlags & DIFF_STRIP_EOLCR ){
173 if( k>0 && z[k-1]=='\r' ){ k--; }
174 }
175 a[i].n = k;
176 s = 0;
177 if( diffFlags & DIFF_IGNORE_EOLWS ){
178 while( k>0 && fossil_isspace(z[k-1]) ){ k--; }
179 }
180 if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
@@ -207,21 +207,21 @@
207 }
208
209 /*
210 ** Return true if two DLine elements are identical.
211 */
212 static int same_dline(const DLine *pA, const DLine *pB){
213 return pA->h==pB->h && memcmp(pA->z,pB->z, pA->h&LENGTH_MASK)==0;
214 }
215
216 /*
217 ** Return true if two DLine elements are identical, ignoring
218 ** all whitespace. The indent field of pA/pB already points
219 ** to the first non-space character in the string.
220 */
221
222 static int same_dline_ignore_allws(const DLine *pA, const DLine *pB){
223 int a = pA->indent, b = pB->indent;
224 if( pA->h==pB->h ){
225 while( a<pA->n && b<pB->n ){
226 if( pA->z[a++] != pB->z[b++] ) return 0;
227 while( a<pA->n && fossil_isspace(pA->z[a])) ++a;
@@ -2189,10 +2189,11 @@
2189 */
2190 unsigned gradient_color(unsigned c1, unsigned c2, int n, int i){
2191 unsigned c; /* Result color */
2192 unsigned x1, x2;
2193 if( i==0 || n==0 ) return c1;
2194 else if(i>=n) return c2;
2195 x1 = (c1>>16)&0xff;
2196 x2 = (c2>>16)&0xff;
2197 c = (x1*(n-i) + x2*i)/n<<16 & 0xff0000;
2198 x1 = (c1>>8)&0xff;
2199 x2 = (c2>>8)&0xff;
2200
+4 -7
--- src/info.c
+++ src/info.c
@@ -443,24 +443,20 @@
443443
/*
444444
** Construct an appropriate diffFlag for text_diff() based on query
445445
** parameters and the to boolean arguments.
446446
*/
447447
u64 construct_diff_flags(int verboseFlag, int sideBySide){
448
- u64 diffFlags;
449
- if( verboseFlag==0 ){
450
- diffFlags = 0; /* Zero means do not show any diff */
451
- }else{
448
+ u64 diffFlags = 0; /* Zero means do not show any diff */
449
+ if( verboseFlag!=0 ){
452450
int x;
453451
if( sideBySide ){
454452
diffFlags = DIFF_SIDEBYSIDE;
455453
456454
/* "dw" query parameter determines width of each column */
457455
x = atoi(PD("dw","80"))*(DIFF_CONTEXT_MASK+1);
458456
if( x<0 || x>DIFF_WIDTH_MASK ) x = DIFF_WIDTH_MASK;
459457
diffFlags += x;
460
- }else{
461
- diffFlags = DIFF_INLINE;
462458
}
463459
464460
if( P("w") ){
465461
diffFlags |= DIFF_IGNORE_ALLWS;
466462
}
@@ -469,12 +465,13 @@
469465
if( x<0 || x>DIFF_CONTEXT_MASK ) x = DIFF_CONTEXT_MASK;
470466
diffFlags += x;
471467
472468
/* The "noopt" parameter disables diff optimization */
473469
if( PD("noopt",0)!=0 ) diffFlags |= DIFF_NOOPT;
470
+ diffFlags |= DIFF_STRIP_EOLCR;
474471
}
475
- return diffFlags|DIFF_STRIP_EOLCR;
472
+ return diffFlags;
476473
}
477474
478475
/*
479476
** WEBPAGE: vinfo
480477
** WEBPAGE: ci
481478
--- src/info.c
+++ src/info.c
@@ -443,24 +443,20 @@
443 /*
444 ** Construct an appropriate diffFlag for text_diff() based on query
445 ** parameters and the to boolean arguments.
446 */
447 u64 construct_diff_flags(int verboseFlag, int sideBySide){
448 u64 diffFlags;
449 if( verboseFlag==0 ){
450 diffFlags = 0; /* Zero means do not show any diff */
451 }else{
452 int x;
453 if( sideBySide ){
454 diffFlags = DIFF_SIDEBYSIDE;
455
456 /* "dw" query parameter determines width of each column */
457 x = atoi(PD("dw","80"))*(DIFF_CONTEXT_MASK+1);
458 if( x<0 || x>DIFF_WIDTH_MASK ) x = DIFF_WIDTH_MASK;
459 diffFlags += x;
460 }else{
461 diffFlags = DIFF_INLINE;
462 }
463
464 if( P("w") ){
465 diffFlags |= DIFF_IGNORE_ALLWS;
466 }
@@ -469,12 +465,13 @@
469 if( x<0 || x>DIFF_CONTEXT_MASK ) x = DIFF_CONTEXT_MASK;
470 diffFlags += x;
471
472 /* The "noopt" parameter disables diff optimization */
473 if( PD("noopt",0)!=0 ) diffFlags |= DIFF_NOOPT;
 
474 }
475 return diffFlags|DIFF_STRIP_EOLCR;
476 }
477
478 /*
479 ** WEBPAGE: vinfo
480 ** WEBPAGE: ci
481
--- src/info.c
+++ src/info.c
@@ -443,24 +443,20 @@
443 /*
444 ** Construct an appropriate diffFlag for text_diff() based on query
445 ** parameters and the to boolean arguments.
446 */
447 u64 construct_diff_flags(int verboseFlag, int sideBySide){
448 u64 diffFlags = 0; /* Zero means do not show any diff */
449 if( verboseFlag!=0 ){
 
 
450 int x;
451 if( sideBySide ){
452 diffFlags = DIFF_SIDEBYSIDE;
453
454 /* "dw" query parameter determines width of each column */
455 x = atoi(PD("dw","80"))*(DIFF_CONTEXT_MASK+1);
456 if( x<0 || x>DIFF_WIDTH_MASK ) x = DIFF_WIDTH_MASK;
457 diffFlags += x;
 
 
458 }
459
460 if( P("w") ){
461 diffFlags |= DIFF_IGNORE_ALLWS;
462 }
@@ -469,12 +465,13 @@
465 if( x<0 || x>DIFF_CONTEXT_MASK ) x = DIFF_CONTEXT_MASK;
466 diffFlags += x;
467
468 /* The "noopt" parameter disables diff optimization */
469 if( PD("noopt",0)!=0 ) diffFlags |= DIFF_NOOPT;
470 diffFlags |= DIFF_STRIP_EOLCR;
471 }
472 return diffFlags;
473 }
474
475 /*
476 ** WEBPAGE: vinfo
477 ** WEBPAGE: ci
478
+1 -1
--- src/json_wiki.c
+++ src/json_wiki.c
@@ -542,11 +542,11 @@
542542
543543
blob_init(&w1, pW1->zWiki, -1);
544544
blob_zero(&w2);
545545
blob_init(&w2, pW2->zWiki, -1);
546546
blob_zero(&d);
547
- diffFlags = DIFF_IGNORE_EOLWS | DIFF_STRIP_EOLCR | DIFF_INLINE;
547
+ diffFlags = DIFF_IGNORE_EOLWS | DIFF_STRIP_EOLCR;
548548
text_diff(&w2, &w1, &d, 0, diffFlags);
549549
blob_reset(&w1);
550550
blob_reset(&w2);
551551
552552
pay = cson_new_object();
553553
--- src/json_wiki.c
+++ src/json_wiki.c
@@ -542,11 +542,11 @@
542
543 blob_init(&w1, pW1->zWiki, -1);
544 blob_zero(&w2);
545 blob_init(&w2, pW2->zWiki, -1);
546 blob_zero(&d);
547 diffFlags = DIFF_IGNORE_EOLWS | DIFF_STRIP_EOLCR | DIFF_INLINE;
548 text_diff(&w2, &w1, &d, 0, diffFlags);
549 blob_reset(&w1);
550 blob_reset(&w2);
551
552 pay = cson_new_object();
553
--- src/json_wiki.c
+++ src/json_wiki.c
@@ -542,11 +542,11 @@
542
543 blob_init(&w1, pW1->zWiki, -1);
544 blob_zero(&w2);
545 blob_init(&w2, pW2->zWiki, -1);
546 blob_zero(&d);
547 diffFlags = DIFF_IGNORE_EOLWS | DIFF_STRIP_EOLCR;
548 text_diff(&w2, &w1, &d, 0, diffFlags);
549 blob_reset(&w1);
550 blob_reset(&w2);
551
552 pay = cson_new_object();
553
--- test/merge_renames.test
+++ test/merge_renames.test
@@ -1,9 +1,16 @@
11
#
22
# Tests for merging with renames
33
#
44
#
5
+
6
+catch {exec $::fossilexe info} res
7
+puts res=$res
8
+if {![regexp {use --repository} $res]} {
9
+ puts stderr "Cannot run this test within an open checkout"
10
+ return
11
+}
512
613
######################################
714
# Test 1 #
815
# Reported: Ticket [554f44ee74e3d] #
916
######################################
1017
--- test/merge_renames.test
+++ test/merge_renames.test
@@ -1,9 +1,16 @@
1 #
2 # Tests for merging with renames
3 #
4 #
 
 
 
 
 
 
 
5
6 ######################################
7 # Test 1 #
8 # Reported: Ticket [554f44ee74e3d] #
9 ######################################
10
--- test/merge_renames.test
+++ test/merge_renames.test
@@ -1,9 +1,16 @@
1 #
2 # Tests for merging with renames
3 #
4 #
5
6 catch {exec $::fossilexe info} res
7 puts res=$res
8 if {![regexp {use --repository} $res]} {
9 puts stderr "Cannot run this test within an open checkout"
10 return
11 }
12
13 ######################################
14 # Test 1 #
15 # Reported: Ticket [554f44ee74e3d] #
16 ######################################
17
--- test/revert.test
+++ test/revert.test
@@ -36,10 +36,17 @@
3636
test revert-$testid$key $passed
3737
}
3838
3939
fossil undo
4040
}
41
+
42
+catch {exec $::fossilexe info} res
43
+puts res=$res
44
+if {![regexp {use --repository} $res]} {
45
+ puts stderr "Cannot run this test within an open checkout"
46
+ return
47
+}
4148
4249
repo_init
4350
4451
# Prepare first commit
4552
#
4653
--- test/revert.test
+++ test/revert.test
@@ -36,10 +36,17 @@
36 test revert-$testid$key $passed
37 }
38
39 fossil undo
40 }
 
 
 
 
 
 
 
41
42 repo_init
43
44 # Prepare first commit
45 #
46
--- test/revert.test
+++ test/revert.test
@@ -36,10 +36,17 @@
36 test revert-$testid$key $passed
37 }
38
39 fossil undo
40 }
41
42 catch {exec $::fossilexe info} res
43 puts res=$res
44 if {![regexp {use --repository} $res]} {
45 puts stderr "Cannot run this test within an open checkout"
46 return
47 }
48
49 repo_init
50
51 # Prepare first commit
52 #
53

Keyboard Shortcuts

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