Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Show an error if unrecognized command-line options appear on the commit command. Also add the (undocumented) "omit-ci-sig" configuration option on the database. Setting omit-ci-sig omits the PGP signature on check-in. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
6aff11f03f25f00b6ec3c3233fb6426f |
| User & Date: | drh 2007-08-03 23:30:52.000 |
Context
|
2007-08-04
| ||
| 00:08 | Merge in and correct the changes to the new repository initialization. Also fix other misc bugs seen while testing. ... (check-in: f5e8b1d736 user: drh tags: trunk) | |
|
2007-08-03
| ||
| 23:30 | Show an error if unrecognized command-line options appear on the commit command. Also add the (undocumented) "omit-ci-sig" configuration option on the database. Setting omit-ci-sig omits the PGP signature on check-in. ... (check-in: 6aff11f03f user: drh tags: trunk) | |
| 15:31 | Extend the commit command so that specific files can be committed. There are still some problems with doing this after a merge. ... (check-in: 22552fb803 user: dan tags: trunk) | |
Changes
Changes to src/checkin.c.
| ︙ | ︙ | |||
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
void commit_cmd(void){
int rc;
int vid, nrid, nvid;
Blob comment;
Stmt q;
Stmt q2;
char *zUuid, *zDate;
char *zManifestFile; /* Name of the manifest file */
Blob manifest;
Blob mcksum; /* Self-checksum on the manifest */
Blob cksum1, cksum2; /* Before and after commit checksums */
Blob cksum1b; /* Checksum recorded in the manifest */
db_must_be_within_tree();
/* There are two ways this command may be executed. If there are
** no arguments following the word "commit", then all modified files
** in the checked out directory are committed. If one or more arguments
** follows "commit", then only those files are committed.
**
** After the following function call has returned, the Global.aCommitFile[]
| > > > | 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
void commit_cmd(void){
int rc;
int vid, nrid, nvid;
Blob comment;
Stmt q;
Stmt q2;
char *zUuid, *zDate;
int noSign = 0; /* True to omit signing the manifest using GPG */
char *zManifestFile; /* Name of the manifest file */
Blob manifest;
Blob mcksum; /* Self-checksum on the manifest */
Blob cksum1, cksum2; /* Before and after commit checksums */
Blob cksum1b; /* Checksum recorded in the manifest */
db_must_be_within_tree();
noSign = db_get_int("omit-ci-sig", 0);
verify_all_options();
/* There are two ways this command may be executed. If there are
** no arguments following the word "commit", then all modified files
** in the checked out directory are committed. If one or more arguments
** follows "commit", then only those files are committed.
**
** After the following function call has returned, the Global.aCommitFile[]
|
| ︙ | ︙ | |||
375 376 377 378 379 380 381 |
blob_appendf(&manifest, "\n");
blob_appendf(&manifest, "R %b\n", &cksum1);
blob_appendf(&manifest, "U %F\n", g.zLogin);
md5sum_blob(&manifest, &mcksum);
blob_appendf(&manifest, "Z %b\n", &mcksum);
zManifestFile = mprintf("%smanifest", g.zLocalRoot);
| | | 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 |
blob_appendf(&manifest, "\n");
blob_appendf(&manifest, "R %b\n", &cksum1);
blob_appendf(&manifest, "U %F\n", g.zLogin);
md5sum_blob(&manifest, &mcksum);
blob_appendf(&manifest, "Z %b\n", &mcksum);
zManifestFile = mprintf("%smanifest", g.zLocalRoot);
if( !noSign && clearsign(&manifest, &manifest) ){
Blob ans;
blob_zero(&ans);
prompt_user("unable to sign manifest. continue [y/N]? ", &ans);
if( blob_str(&ans)[0]!='y' ){
db_end_transaction(1);
exit(1);
}
|
| ︙ | ︙ |
Changes to src/main.c.
| ︙ | ︙ | |||
295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
zReturn = g.argv[i+hasArg];
remove_from_argv(i, 1+hasArg);
break;
}
}
return zReturn;
}
/*
** Print a list of words in multiple columns.
*/
static void multi_column_list(const char **azWord, int nWord){
int i, j, len;
int mxLen = 0;
| > > > > > > > > > > > > > > | 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
zReturn = g.argv[i+hasArg];
remove_from_argv(i, 1+hasArg);
break;
}
}
return zReturn;
}
/*
** Verify that there are no processed command-line options. If
** Any remaining command-line argument begins with "-" print
** an error message and quit.
*/
void verify_all_options(void){
int i;
for(i=1; i<g.argc; i++){
if( g.argv[i][0]=='-' ){
fossil_fatal("unrecognized command-line option: %s", g.argv[i]);
}
}
}
/*
** Print a list of words in multiple columns.
*/
static void multi_column_list(const char **azWord, int nWord){
int i, j, len;
int mxLen = 0;
|
| ︙ | ︙ |