Fossil SCM

The 'new' and 'init' commands again create an initial checkin unless the (new) --empty flag is given or (as before) --date-override is used.

stephan 2014-05-31 19:37 trunk
Commit 3b66804d3f10f9ba23d7f83170b77306905a32e9
1 file changed +5
+5
--- src/db.c
+++ src/db.c
@@ -1450,14 +1450,19 @@
14501450
void create_repository_cmd(void){
14511451
char *zPassword;
14521452
const char *zTemplate; /* Repository from which to copy settings */
14531453
const char *zDate; /* Date of the initial check-in */
14541454
const char *zDefaultUser; /* Optional name of the default user */
1455
+ char const *zCreateEmpty; /* --empty flag set? */
14551456
14561457
zTemplate = find_option("template",0,1);
14571458
zDate = find_option("date-override",0,1);
14581459
zDefaultUser = find_option("admin-user","A",1);
1460
+ zCreateEmpty = find_option("empty", 0, 0);
1461
+ if(!zDate && !zCreateEmpty){
1462
+ zDate = "now";
1463
+ }
14591464
if( g.argc!=3 ){
14601465
usage("REPOSITORY-NAME");
14611466
}
14621467
db_create_repository(g.argv[2]);
14631468
db_open_repository(g.argv[2]);
14641469
--- src/db.c
+++ src/db.c
@@ -1450,14 +1450,19 @@
1450 void create_repository_cmd(void){
1451 char *zPassword;
1452 const char *zTemplate; /* Repository from which to copy settings */
1453 const char *zDate; /* Date of the initial check-in */
1454 const char *zDefaultUser; /* Optional name of the default user */
 
1455
1456 zTemplate = find_option("template",0,1);
1457 zDate = find_option("date-override",0,1);
1458 zDefaultUser = find_option("admin-user","A",1);
 
 
 
 
1459 if( g.argc!=3 ){
1460 usage("REPOSITORY-NAME");
1461 }
1462 db_create_repository(g.argv[2]);
1463 db_open_repository(g.argv[2]);
1464
--- src/db.c
+++ src/db.c
@@ -1450,14 +1450,19 @@
1450 void create_repository_cmd(void){
1451 char *zPassword;
1452 const char *zTemplate; /* Repository from which to copy settings */
1453 const char *zDate; /* Date of the initial check-in */
1454 const char *zDefaultUser; /* Optional name of the default user */
1455 char const *zCreateEmpty; /* --empty flag set? */
1456
1457 zTemplate = find_option("template",0,1);
1458 zDate = find_option("date-override",0,1);
1459 zDefaultUser = find_option("admin-user","A",1);
1460 zCreateEmpty = find_option("empty", 0, 0);
1461 if(!zDate && !zCreateEmpty){
1462 zDate = "now";
1463 }
1464 if( g.argc!=3 ){
1465 usage("REPOSITORY-NAME");
1466 }
1467 db_create_repository(g.argv[2]);
1468 db_open_repository(g.argv[2]);
1469

Keyboard Shortcuts

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