Fossil SCM
Make [/help?cmd=new|fossil new --empty] the default way to create a new repository. THIS COMMIT WILL BE REVERTED BEFORE FOSSIL 1.30 IS BEING RELEASED, (UNLESS RICHARD DECIDES OTHERWISE AT THAT TIME). The intent of this commit is to expose [/help?cmd=new|fossil new --empty] to more field-testing. It should be 100% upwards/downwards compatible, but if there still turn out to be some corner-cases, now is the right time to find out (I am not aware of any!).
Commit
8364065c45ec839d01e0a0535ebd754f81e9cac4
Parent
32205fdc41a725e…
2 files changed
+2
-7
+5
M
src/db.c
+2
-7
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -1465,29 +1465,24 @@ | ||
| 1465 | 1465 | ** |
| 1466 | 1466 | ** Options: |
| 1467 | 1467 | ** --template FILE copy settings from repository file |
| 1468 | 1468 | ** --admin-user|-A USERNAME select given USERNAME as admin user |
| 1469 | 1469 | ** --date-override DATETIME use DATETIME as time of the initial checkin |
| 1470 | -** (overrides --empty as well) | |
| 1471 | -** --empty Do not create an initial empty checkin. | |
| 1470 | +** (default: do not create an initial checkin) | |
| 1472 | 1471 | ** |
| 1473 | 1472 | ** See also: clone |
| 1474 | 1473 | */ |
| 1475 | 1474 | void create_repository_cmd(void){ |
| 1476 | 1475 | char *zPassword; |
| 1477 | 1476 | const char *zTemplate; /* Repository from which to copy settings */ |
| 1478 | 1477 | const char *zDate; /* Date of the initial check-in */ |
| 1479 | 1478 | const char *zDefaultUser; /* Optional name of the default user */ |
| 1480 | - char const *zCreateEmpty; /* --empty flag set? */ | |
| 1481 | 1479 | |
| 1482 | 1480 | zTemplate = find_option("template",0,1); |
| 1483 | 1481 | zDate = find_option("date-override",0,1); |
| 1484 | 1482 | zDefaultUser = find_option("admin-user","A",1); |
| 1485 | - zCreateEmpty = find_option("empty", 0, 0); | |
| 1486 | - if( !zDate && !zCreateEmpty ){ | |
| 1487 | - zDate = "now"; | |
| 1488 | - } | |
| 1483 | + find_option("empty", 0, 0); /* deprecated */ | |
| 1489 | 1484 | if( g.argc!=3 ){ |
| 1490 | 1485 | usage("REPOSITORY-NAME"); |
| 1491 | 1486 | } |
| 1492 | 1487 | db_create_repository(g.argv[2]); |
| 1493 | 1488 | db_open_repository(g.argv[2]); |
| 1494 | 1489 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1465,29 +1465,24 @@ | |
| 1465 | ** |
| 1466 | ** Options: |
| 1467 | ** --template FILE copy settings from repository file |
| 1468 | ** --admin-user|-A USERNAME select given USERNAME as admin user |
| 1469 | ** --date-override DATETIME use DATETIME as time of the initial checkin |
| 1470 | ** (overrides --empty as well) |
| 1471 | ** --empty Do not create an initial empty checkin. |
| 1472 | ** |
| 1473 | ** See also: clone |
| 1474 | */ |
| 1475 | void create_repository_cmd(void){ |
| 1476 | char *zPassword; |
| 1477 | const char *zTemplate; /* Repository from which to copy settings */ |
| 1478 | const char *zDate; /* Date of the initial check-in */ |
| 1479 | const char *zDefaultUser; /* Optional name of the default user */ |
| 1480 | char const *zCreateEmpty; /* --empty flag set? */ |
| 1481 | |
| 1482 | zTemplate = find_option("template",0,1); |
| 1483 | zDate = find_option("date-override",0,1); |
| 1484 | zDefaultUser = find_option("admin-user","A",1); |
| 1485 | zCreateEmpty = find_option("empty", 0, 0); |
| 1486 | if( !zDate && !zCreateEmpty ){ |
| 1487 | zDate = "now"; |
| 1488 | } |
| 1489 | if( g.argc!=3 ){ |
| 1490 | usage("REPOSITORY-NAME"); |
| 1491 | } |
| 1492 | db_create_repository(g.argv[2]); |
| 1493 | db_open_repository(g.argv[2]); |
| 1494 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1465,29 +1465,24 @@ | |
| 1465 | ** |
| 1466 | ** Options: |
| 1467 | ** --template FILE copy settings from repository file |
| 1468 | ** --admin-user|-A USERNAME select given USERNAME as admin user |
| 1469 | ** --date-override DATETIME use DATETIME as time of the initial checkin |
| 1470 | ** (default: do not create an initial checkin) |
| 1471 | ** |
| 1472 | ** See also: clone |
| 1473 | */ |
| 1474 | void create_repository_cmd(void){ |
| 1475 | char *zPassword; |
| 1476 | const char *zTemplate; /* Repository from which to copy settings */ |
| 1477 | const char *zDate; /* Date of the initial check-in */ |
| 1478 | const char *zDefaultUser; /* Optional name of the default user */ |
| 1479 | |
| 1480 | zTemplate = find_option("template",0,1); |
| 1481 | zDate = find_option("date-override",0,1); |
| 1482 | zDefaultUser = find_option("admin-user","A",1); |
| 1483 | find_option("empty", 0, 0); /* deprecated */ |
| 1484 | if( g.argc!=3 ){ |
| 1485 | usage("REPOSITORY-NAME"); |
| 1486 | } |
| 1487 | db_create_repository(g.argv[2]); |
| 1488 | db_open_repository(g.argv[2]); |
| 1489 |
+5
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -15,10 +15,15 @@ | ||
| 15 | 15 | to TH1, primarily for use by TH1 hooks. |
| 16 | 16 | * Bring in the latest version of autosetup from upstream. |
| 17 | 17 | * When committing a (non-binary) file which contains bytes forming an |
| 18 | 18 | invalid UTF-8 stream, fossil now adds the possibility to convert it |
| 19 | 19 | to a valid UTF-8 stream ('c') if you like. |
| 20 | + * Let [/help?cmd=new|fossil new] no longer create an initial empty commit | |
| 21 | + by default. The first commit after checking out an empty repository will | |
| 22 | + become the initial commit. (NOT PLANNED FOR 1.30, BUT DONE TO EXPOSE | |
| 23 | + [/help?cmd=new|fossil new --empty] TO MORE FIELD TESTING BEFORE | |
| 24 | + MAKING ANY DECISION ON IT!) | |
| 20 | 25 | |
| 21 | 26 | <h2>Changes For Version 1.29 (2014-06-12)</h2> |
| 22 | 27 | * Add the ability to display content, diffs and annotations for UTF16 |
| 23 | 28 | text files in the web interface. |
| 24 | 29 | * Add the "SaveAs..." and "Invert" buttons |
| 25 | 30 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -15,10 +15,15 @@ | |
| 15 | to TH1, primarily for use by TH1 hooks. |
| 16 | * Bring in the latest version of autosetup from upstream. |
| 17 | * When committing a (non-binary) file which contains bytes forming an |
| 18 | invalid UTF-8 stream, fossil now adds the possibility to convert it |
| 19 | to a valid UTF-8 stream ('c') if you like. |
| 20 | |
| 21 | <h2>Changes For Version 1.29 (2014-06-12)</h2> |
| 22 | * Add the ability to display content, diffs and annotations for UTF16 |
| 23 | text files in the web interface. |
| 24 | * Add the "SaveAs..." and "Invert" buttons |
| 25 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -15,10 +15,15 @@ | |
| 15 | to TH1, primarily for use by TH1 hooks. |
| 16 | * Bring in the latest version of autosetup from upstream. |
| 17 | * When committing a (non-binary) file which contains bytes forming an |
| 18 | invalid UTF-8 stream, fossil now adds the possibility to convert it |
| 19 | to a valid UTF-8 stream ('c') if you like. |
| 20 | * Let [/help?cmd=new|fossil new] no longer create an initial empty commit |
| 21 | by default. The first commit after checking out an empty repository will |
| 22 | become the initial commit. (NOT PLANNED FOR 1.30, BUT DONE TO EXPOSE |
| 23 | [/help?cmd=new|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 24 | MAKING ANY DECISION ON IT!) |
| 25 | |
| 26 | <h2>Changes For Version 1.29 (2014-06-12)</h2> |
| 27 | * Add the ability to display content, diffs and annotations for UTF16 |
| 28 | text files in the web interface. |
| 29 | * Add the "SaveAs..." and "Invert" buttons |
| 30 |