Small patch to add -A/--admin-user flag to the `fossil import` command. Found that I needed it, maybe someone else will find it use for it.
Index: src/import.c
==================================================================
--- src/import.c
+++ src/import.c
** --no-rebuild skip the "rebuilding metadata" step
** --no-vacuum skip the final VACUUM of the database file
** --rename-trunk NAME use NAME as name of imported trunk branch
** --rename-branch PAT rename all branch names using PAT pattern
** --rename-tag PAT rename all tag names using PAT pattern
+** --admin-user|-A USERNAME select given USERNAME as admin user
**
** The --incremental option allows an existing repository to be extended
** with new content. The --rename-* options may be useful to avoid name
** conflicts when using the --incremental option.
**
@@ -1663,10 +1664,11 @@
int forceFlag = find_option("force", "f", 0)!=0;
int svnFlag = find_option("svn", 0, 0)!=0;
int gitFlag = find_option("git", 0, 0)!=0;
int omitRebuild = find_option("no-rebuild",0,0)!=0;
int omitVacuum = find_option("no-vacuum",0,0)!=0;
+ const char *zDefaultUser = find_option("admin-user","A",1);
/* Options common to all input formats */
int incrFlag = find_option("incremental", "i", 0)!=0;
/* Options for --svn only */
@@ -1759,11 +1761,11 @@
db_open_repository(g.argv[2]);
db_open_config(0, 0);
db_begin_transaction();
if( !incrFlag ){
- db_initial_setup(0, 0, 0);
+ db_initial_setup(0, 0, zDefaultUser);
db_set("main-branch", gimport.zTrunkName, 0);
}
if( svnFlag ){
db_multi_exec(