Fossil SCM

Change "fossil knows nothing about" fatal into a warning.

jan.nijtmans 2013-02-08 08:21 trunk
Commit 7a8808b2206630acc6e2e1ae60d263ba847436a1
1 file changed +5 -4
+5 -4
--- src/checkin.c
+++ src/checkin.c
@@ -619,26 +619,27 @@
619619
** allocated and remains NULL. Other parts of the code interpret this
620620
** to mean "all files".
621621
*/
622622
void select_commit_files(void){
623623
if( g.argc>2 ){
624
- int ii;
624
+ int ii, jj=0;
625625
Blob b;
626626
blob_zero(&b);
627627
g.aCommitFile = fossil_malloc(sizeof(int)*(g.argc-1));
628628
629629
for(ii=2; ii<g.argc; ii++){
630630
int iId;
631631
file_tree_name(g.argv[ii], &b, 1);
632632
iId = db_int(-1, "SELECT id FROM vfile WHERE pathname=%Q", blob_str(&b));
633633
if( iId<0 ){
634
- fossil_fatal("fossil knows nothing about: %s", g.argv[ii]);
634
+ fossil_warning("fossil knows nothing about: %s", g.argv[ii]);
635
+ } else {
636
+ g.aCommitFile[jj++] = iId;
635637
}
636
- g.aCommitFile[ii-2] = iId;
637638
blob_reset(&b);
638639
}
639
- g.aCommitFile[ii-2] = 0;
640
+ g.aCommitFile[jj] = 0;
640641
}
641642
}
642643
643644
/*
644645
** Make sure the current check-in with timestamp zDate is younger than its
645646
--- src/checkin.c
+++ src/checkin.c
@@ -619,26 +619,27 @@
619 ** allocated and remains NULL. Other parts of the code interpret this
620 ** to mean "all files".
621 */
622 void select_commit_files(void){
623 if( g.argc>2 ){
624 int ii;
625 Blob b;
626 blob_zero(&b);
627 g.aCommitFile = fossil_malloc(sizeof(int)*(g.argc-1));
628
629 for(ii=2; ii<g.argc; ii++){
630 int iId;
631 file_tree_name(g.argv[ii], &b, 1);
632 iId = db_int(-1, "SELECT id FROM vfile WHERE pathname=%Q", blob_str(&b));
633 if( iId<0 ){
634 fossil_fatal("fossil knows nothing about: %s", g.argv[ii]);
 
 
635 }
636 g.aCommitFile[ii-2] = iId;
637 blob_reset(&b);
638 }
639 g.aCommitFile[ii-2] = 0;
640 }
641 }
642
643 /*
644 ** Make sure the current check-in with timestamp zDate is younger than its
645
--- src/checkin.c
+++ src/checkin.c
@@ -619,26 +619,27 @@
619 ** allocated and remains NULL. Other parts of the code interpret this
620 ** to mean "all files".
621 */
622 void select_commit_files(void){
623 if( g.argc>2 ){
624 int ii, jj=0;
625 Blob b;
626 blob_zero(&b);
627 g.aCommitFile = fossil_malloc(sizeof(int)*(g.argc-1));
628
629 for(ii=2; ii<g.argc; ii++){
630 int iId;
631 file_tree_name(g.argv[ii], &b, 1);
632 iId = db_int(-1, "SELECT id FROM vfile WHERE pathname=%Q", blob_str(&b));
633 if( iId<0 ){
634 fossil_warning("fossil knows nothing about: %s", g.argv[ii]);
635 } else {
636 g.aCommitFile[jj++] = iId;
637 }
 
638 blob_reset(&b);
639 }
640 g.aCommitFile[jj] = 0;
641 }
642 }
643
644 /*
645 ** Make sure the current check-in with timestamp zDate is younger than its
646

Keyboard Shortcuts

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