24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/*
** The list of database user-defined fields in the TICKET table.
** The real table also contains some addition fields for internal
** used. The internal-use fields begin with "tkt_".
*/
static int nField = 0;
static char **azField = 0; /* Names of database fields */
static char **azValue = 0; /* Original values */
static char **azAppend = 0; /* Value to be appended */
/*
** Compare two entries in azField for sorting purposes
*/
static int nameCmpr(const void *a, const void *b){
return fossil_strcmp(*(char**)a, *(char**)b);
}
|
|
|
|
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/*
** The list of database user-defined fields in the TICKET table.
** The real table also contains some addition fields for internal
** used. The internal-use fields begin with "tkt_".
*/
static int nField = 0;
static const char **azField = 0; /* Names of database fields */
static const char **azValue = 0; /* Original values */
static const char **azAppend = 0; /* Value to be appended */
/*
** Compare two entries in azField for sorting purposes
*/
static int nameCmpr(const void *a, const void *b){
return fossil_strcmp(*(char**)a, *(char**)b);
}
|
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
|
/* read all given ticket field/value pairs from command line */
if( i==g.argc ){
fossil_fatal("empty %s command aborted!",g.argv[2]);
}
getAllTicketFields();
/* read commandline and assign fields in the azValue array */
while( i<g.argc ){
char *zFName;
char *zFValue;
int j;
int append = 0;
zFName = g.argv[i++];
if( i==g.argc ){
fossil_fatal("missing value for '%s'!",zFName);
}
zFValue = g.argv[i++];
if( tktEncoding == tktFossilize ){
zFValue=mprintf("%s",zFValue);
defossilize(zFValue);
}
append = (zFName[0] == '+');
if (append){
zFName++;
}
j = fieldId(zFName);
if( j == -1 ){
|
|
|
|
|
>
|
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
|
/* read all given ticket field/value pairs from command line */
if( i==g.argc ){
fossil_fatal("empty %s command aborted!",g.argv[2]);
}
getAllTicketFields();
/* read commandline and assign fields in the azValue array */
while( i<g.argc ){
const char *zFName;
const char *zFValue;
int j;
int append = 0;
zFName = g.argv[i++];
if( i==g.argc ){
fossil_fatal("missing value for '%s'!",zFName);
}
zFValue = g.argv[i++];
if( tktEncoding == tktFossilize ){
char *z = mprintf("%s",zFValue);
defossilize(z);
zFValue = z;
}
append = (zFName[0] == '+');
if (append){
zFName++;
}
j = fieldId(zFName);
if( j == -1 ){
|
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
|
/* now add the needed artifacts to the repository */
blob_zero(&tktchng);
/* add the time to the ticket manifest */
blob_appendf(&tktchng, "D %s\n", zDate);
/* append defined elements */
for(i=0; i<nField; i++){
char *zValue = 0;
char *zPfx;
if (azAppend[i] && azAppend[i][0] ){
zPfx = " +";
zValue = azAppend[i];
} else if( azValue[i] && azValue[i][0] ){
zPfx = " ";
zValue = azValue[i];
|
|
|
|
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
|
/* now add the needed artifacts to the repository */
blob_zero(&tktchng);
/* add the time to the ticket manifest */
blob_appendf(&tktchng, "D %s\n", zDate);
/* append defined elements */
for(i=0; i<nField; i++){
const char *zValue = 0;
const char *zPfx;
if (azAppend[i] && azAppend[i][0] ){
zPfx = " +";
zValue = azAppend[i];
} else if( azValue[i] && azValue[i][0] ){
zPfx = " ";
zValue = azValue[i];
|