Fossil SCM

Added --admin-user flag to the import command.

drh 2020-02-25 20:04 trunk merge
Commit 6c0dfc8cc51e23adb0c78ce41265f47723b169e28f162f37ecfdd846896c4cd9
1 file changed +5 -2
+5 -2
--- src/import.c
+++ src/import.c
@@ -1639,14 +1639,16 @@
16391639
** --no-rebuild skip the "rebuilding metadata" step
16401640
** --no-vacuum skip the final VACUUM of the database file
16411641
** --rename-trunk NAME use NAME as name of imported trunk branch
16421642
** --rename-branch PAT rename all branch names using PAT pattern
16431643
** --rename-tag PAT rename all tag names using PAT pattern
1644
+** --admin-user|-A NAME use NAME for the admin user
16441645
**
16451646
** The --incremental option allows an existing repository to be extended
16461647
** with new content. The --rename-* options may be useful to avoid name
1647
-** conflicts when using the --incremental option.
1648
+** conflicts when using the --incremental option. The --admin-user
1649
+** option is ignored if --incremental is specified.
16481650
**
16491651
** The argument to --rename-* contains one "%" character to be replaced
16501652
** with the original name. For example, "--rename-tag svn-%-tag" renames
16511653
** the tag called "release" to "svn-release-tag".
16521654
**
@@ -1663,10 +1665,11 @@
16631665
int forceFlag = find_option("force", "f", 0)!=0;
16641666
int svnFlag = find_option("svn", 0, 0)!=0;
16651667
int gitFlag = find_option("git", 0, 0)!=0;
16661668
int omitRebuild = find_option("no-rebuild",0,0)!=0;
16671669
int omitVacuum = find_option("no-vacuum",0,0)!=0;
1670
+ const char *zDefaultUser = find_option("admin-user","A",1);
16681671
16691672
/* Options common to all input formats */
16701673
int incrFlag = find_option("incremental", "i", 0)!=0;
16711674
16721675
/* Options for --svn only */
@@ -1759,11 +1762,11 @@
17591762
db_open_repository(g.argv[2]);
17601763
db_open_config(0, 0);
17611764
17621765
db_begin_transaction();
17631766
if( !incrFlag ){
1764
- db_initial_setup(0, 0, 0);
1767
+ db_initial_setup(0, 0, zDefaultUser);
17651768
db_set("main-branch", gimport.zTrunkName, 0);
17661769
}
17671770
17681771
if( svnFlag ){
17691772
db_multi_exec(
17701773
--- src/import.c
+++ src/import.c
@@ -1639,14 +1639,16 @@
1639 ** --no-rebuild skip the "rebuilding metadata" step
1640 ** --no-vacuum skip the final VACUUM of the database file
1641 ** --rename-trunk NAME use NAME as name of imported trunk branch
1642 ** --rename-branch PAT rename all branch names using PAT pattern
1643 ** --rename-tag PAT rename all tag names using PAT pattern
 
1644 **
1645 ** The --incremental option allows an existing repository to be extended
1646 ** with new content. The --rename-* options may be useful to avoid name
1647 ** conflicts when using the --incremental option.
 
1648 **
1649 ** The argument to --rename-* contains one "%" character to be replaced
1650 ** with the original name. For example, "--rename-tag svn-%-tag" renames
1651 ** the tag called "release" to "svn-release-tag".
1652 **
@@ -1663,10 +1665,11 @@
1663 int forceFlag = find_option("force", "f", 0)!=0;
1664 int svnFlag = find_option("svn", 0, 0)!=0;
1665 int gitFlag = find_option("git", 0, 0)!=0;
1666 int omitRebuild = find_option("no-rebuild",0,0)!=0;
1667 int omitVacuum = find_option("no-vacuum",0,0)!=0;
 
1668
1669 /* Options common to all input formats */
1670 int incrFlag = find_option("incremental", "i", 0)!=0;
1671
1672 /* Options for --svn only */
@@ -1759,11 +1762,11 @@
1759 db_open_repository(g.argv[2]);
1760 db_open_config(0, 0);
1761
1762 db_begin_transaction();
1763 if( !incrFlag ){
1764 db_initial_setup(0, 0, 0);
1765 db_set("main-branch", gimport.zTrunkName, 0);
1766 }
1767
1768 if( svnFlag ){
1769 db_multi_exec(
1770
--- src/import.c
+++ src/import.c
@@ -1639,14 +1639,16 @@
1639 ** --no-rebuild skip the "rebuilding metadata" step
1640 ** --no-vacuum skip the final VACUUM of the database file
1641 ** --rename-trunk NAME use NAME as name of imported trunk branch
1642 ** --rename-branch PAT rename all branch names using PAT pattern
1643 ** --rename-tag PAT rename all tag names using PAT pattern
1644 ** --admin-user|-A NAME use NAME for the admin user
1645 **
1646 ** The --incremental option allows an existing repository to be extended
1647 ** with new content. The --rename-* options may be useful to avoid name
1648 ** conflicts when using the --incremental option. The --admin-user
1649 ** option is ignored if --incremental is specified.
1650 **
1651 ** The argument to --rename-* contains one "%" character to be replaced
1652 ** with the original name. For example, "--rename-tag svn-%-tag" renames
1653 ** the tag called "release" to "svn-release-tag".
1654 **
@@ -1663,10 +1665,11 @@
1665 int forceFlag = find_option("force", "f", 0)!=0;
1666 int svnFlag = find_option("svn", 0, 0)!=0;
1667 int gitFlag = find_option("git", 0, 0)!=0;
1668 int omitRebuild = find_option("no-rebuild",0,0)!=0;
1669 int omitVacuum = find_option("no-vacuum",0,0)!=0;
1670 const char *zDefaultUser = find_option("admin-user","A",1);
1671
1672 /* Options common to all input formats */
1673 int incrFlag = find_option("incremental", "i", 0)!=0;
1674
1675 /* Options for --svn only */
@@ -1759,11 +1762,11 @@
1762 db_open_repository(g.argv[2]);
1763 db_open_config(0, 0);
1764
1765 db_begin_transaction();
1766 if( !incrFlag ){
1767 db_initial_setup(0, 0, zDefaultUser);
1768 db_set("main-branch", gimport.zTrunkName, 0);
1769 }
1770
1771 if( svnFlag ){
1772 db_multi_exec(
1773

Keyboard Shortcuts

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