Fossil SCM
Added --admin-user flag to the import command.
Commit
6c0dfc8cc51e23adb0c78ce41265f47723b169e28f162f37ecfdd846896c4cd9
Parent
ce0bce90cf31cae…
1 file changed
+5
-2
+5
-2
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -1639,14 +1639,16 @@ | ||
| 1639 | 1639 | ** --no-rebuild skip the "rebuilding metadata" step |
| 1640 | 1640 | ** --no-vacuum skip the final VACUUM of the database file |
| 1641 | 1641 | ** --rename-trunk NAME use NAME as name of imported trunk branch |
| 1642 | 1642 | ** --rename-branch PAT rename all branch names using PAT pattern |
| 1643 | 1643 | ** --rename-tag PAT rename all tag names using PAT pattern |
| 1644 | +** --admin-user|-A NAME use NAME for the admin user | |
| 1644 | 1645 | ** |
| 1645 | 1646 | ** The --incremental option allows an existing repository to be extended |
| 1646 | 1647 | ** 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. | |
| 1648 | 1650 | ** |
| 1649 | 1651 | ** The argument to --rename-* contains one "%" character to be replaced |
| 1650 | 1652 | ** with the original name. For example, "--rename-tag svn-%-tag" renames |
| 1651 | 1653 | ** the tag called "release" to "svn-release-tag". |
| 1652 | 1654 | ** |
| @@ -1663,10 +1665,11 @@ | ||
| 1663 | 1665 | int forceFlag = find_option("force", "f", 0)!=0; |
| 1664 | 1666 | int svnFlag = find_option("svn", 0, 0)!=0; |
| 1665 | 1667 | int gitFlag = find_option("git", 0, 0)!=0; |
| 1666 | 1668 | int omitRebuild = find_option("no-rebuild",0,0)!=0; |
| 1667 | 1669 | int omitVacuum = find_option("no-vacuum",0,0)!=0; |
| 1670 | + const char *zDefaultUser = find_option("admin-user","A",1); | |
| 1668 | 1671 | |
| 1669 | 1672 | /* Options common to all input formats */ |
| 1670 | 1673 | int incrFlag = find_option("incremental", "i", 0)!=0; |
| 1671 | 1674 | |
| 1672 | 1675 | /* Options for --svn only */ |
| @@ -1759,11 +1762,11 @@ | ||
| 1759 | 1762 | db_open_repository(g.argv[2]); |
| 1760 | 1763 | db_open_config(0, 0); |
| 1761 | 1764 | |
| 1762 | 1765 | db_begin_transaction(); |
| 1763 | 1766 | if( !incrFlag ){ |
| 1764 | - db_initial_setup(0, 0, 0); | |
| 1767 | + db_initial_setup(0, 0, zDefaultUser); | |
| 1765 | 1768 | db_set("main-branch", gimport.zTrunkName, 0); |
| 1766 | 1769 | } |
| 1767 | 1770 | |
| 1768 | 1771 | if( svnFlag ){ |
| 1769 | 1772 | db_multi_exec( |
| 1770 | 1773 |
| --- 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 |