Fossil SCM

Fixed omitsign discrepancies. Windows version now looks for USERNAME instead of USER when creating new database.

jnc 2007-10-07 14:38 trunk
Commit a21806dcf394d6b99c775fa5f3daccab091d1795
3 files changed +1 -1 +1 -1 +7 -3
+1 -1
--- src/branch.c
+++ src/branch.c
@@ -37,11 +37,11 @@
3737
Blob cksum1, cksum2; /* Before and after commit checksums */
3838
Blob cksum1b; /* Checksum recorded in the manifest */
3939
4040
noSign = find_option("nosign","",0)!=0;
4141
db_must_be_within_tree();
42
- noSign = db_get_int("omit-sign", 0)|noSign;
42
+ noSign = db_get_int("omitsign", 0)|noSign;
4343
zColor = find_option("bgcolor","c",1);
4444
4545
verify_all_options();
4646
4747
/* fossil branch new name */
4848
--- src/branch.c
+++ src/branch.c
@@ -37,11 +37,11 @@
37 Blob cksum1, cksum2; /* Before and after commit checksums */
38 Blob cksum1b; /* Checksum recorded in the manifest */
39
40 noSign = find_option("nosign","",0)!=0;
41 db_must_be_within_tree();
42 noSign = db_get_int("omit-sign", 0)|noSign;
43 zColor = find_option("bgcolor","c",1);
44
45 verify_all_options();
46
47 /* fossil branch new name */
48
--- src/branch.c
+++ src/branch.c
@@ -37,11 +37,11 @@
37 Blob cksum1, cksum2; /* Before and after commit checksums */
38 Blob cksum1b; /* Checksum recorded in the manifest */
39
40 noSign = find_option("nosign","",0)!=0;
41 db_must_be_within_tree();
42 noSign = db_get_int("omitsign", 0)|noSign;
43 zColor = find_option("bgcolor","c",1);
44
45 verify_all_options();
46
47 /* fossil branch new name */
48
+1 -1
--- src/checkin.c
+++ src/checkin.c
@@ -335,11 +335,11 @@
335335
336336
noSign = find_option("nosign","",0)!=0;
337337
zComment = find_option("comment","m",1);
338338
forceFlag = find_option("force", "r", 0)!=0;
339339
db_must_be_within_tree();
340
- noSign = db_get_int("omit-sign", 0)|noSign;
340
+ noSign = db_get_int("omitsign", 0)|noSign;
341341
verify_all_options();
342342
343343
/*
344344
** Autosync if requested.
345345
*/
346346
--- src/checkin.c
+++ src/checkin.c
@@ -335,11 +335,11 @@
335
336 noSign = find_option("nosign","",0)!=0;
337 zComment = find_option("comment","m",1);
338 forceFlag = find_option("force", "r", 0)!=0;
339 db_must_be_within_tree();
340 noSign = db_get_int("omit-sign", 0)|noSign;
341 verify_all_options();
342
343 /*
344 ** Autosync if requested.
345 */
346
--- src/checkin.c
+++ src/checkin.c
@@ -335,11 +335,11 @@
335
336 noSign = find_option("nosign","",0)!=0;
337 zComment = find_option("comment","m",1);
338 forceFlag = find_option("force", "r", 0)!=0;
339 db_must_be_within_tree();
340 noSign = db_get_int("omitsign", 0)|noSign;
341 verify_all_options();
342
343 /*
344 ** Autosync if requested.
345 */
346
+7 -3
--- src/db.c
+++ src/db.c
@@ -698,11 +698,15 @@
698698
if( !db_is_global("autosync") ) db_set_int("autosync", 1, 0);
699699
if( !db_is_global("safemerge") ) db_set_int("safemerge", 0, 0);
700700
if( !db_is_global("localauth") ) db_set_int("localauth", 0, 0);
701701
zUser = db_get("default-user", 0);
702702
if( zUser==0 ){
703
+#ifdef __MINGW32__
704
+ zUser = getenv("USERNAME");
705
+#else
703706
zUser = getenv("USER");
707
+#endif
704708
}
705709
if( zUser==0 ){
706710
zUser = "root";
707711
}
708712
db_multi_exec(
@@ -972,21 +976,21 @@
972976
**
973977
** autosync If enabled, automatically pull prior to
974978
** commit or update and automatically push
975979
** after commit or tag or branch creation.
976980
**
977
-** clear-sign Command used to clear-sign manifests at check-in.
981
+** clearsign Command used to clear-sign manifests at check-in.
978982
** The default is "gpg --clearsign -o ".
979983
**
980984
** editor Text editor command used for check-in comments.
981985
**
982986
** localauth If enabled, require that HTTP connections from
983987
** 127.0.0.1 be authenticated by password. If
984988
** false, all HTTP requests from localhost have
985989
** unrestricted access to the repository.
986990
**
987
-** omit-sign When enabled, fossil will not attempt to sign any
991
+** omitsign When enabled, fossil will not attempt to sign any
988992
** commit with gpg. All commits will be unsigned.
989993
**
990994
** safemerge If enabled, when commit will cause a fork, the
991995
** commit will not abort with warning. Also update
992996
** will not be allowed if local changes exist.
@@ -995,11 +999,11 @@
995999
static const char *azName[] = {
9961000
"autosync",
9971001
"clearsign",
9981002
"editor",
9991003
"localauth",
1000
- "omitsig",
1004
+ "omitsign",
10011005
"safemerge",
10021006
};
10031007
int i;
10041008
int globalFlag = find_option("global","g",0)!=0;
10051009
db_find_and_open_repository();
10061010
--- src/db.c
+++ src/db.c
@@ -698,11 +698,15 @@
698 if( !db_is_global("autosync") ) db_set_int("autosync", 1, 0);
699 if( !db_is_global("safemerge") ) db_set_int("safemerge", 0, 0);
700 if( !db_is_global("localauth") ) db_set_int("localauth", 0, 0);
701 zUser = db_get("default-user", 0);
702 if( zUser==0 ){
 
 
 
703 zUser = getenv("USER");
 
704 }
705 if( zUser==0 ){
706 zUser = "root";
707 }
708 db_multi_exec(
@@ -972,21 +976,21 @@
972 **
973 ** autosync If enabled, automatically pull prior to
974 ** commit or update and automatically push
975 ** after commit or tag or branch creation.
976 **
977 ** clear-sign Command used to clear-sign manifests at check-in.
978 ** The default is "gpg --clearsign -o ".
979 **
980 ** editor Text editor command used for check-in comments.
981 **
982 ** localauth If enabled, require that HTTP connections from
983 ** 127.0.0.1 be authenticated by password. If
984 ** false, all HTTP requests from localhost have
985 ** unrestricted access to the repository.
986 **
987 ** omit-sign When enabled, fossil will not attempt to sign any
988 ** commit with gpg. All commits will be unsigned.
989 **
990 ** safemerge If enabled, when commit will cause a fork, the
991 ** commit will not abort with warning. Also update
992 ** will not be allowed if local changes exist.
@@ -995,11 +999,11 @@
995 static const char *azName[] = {
996 "autosync",
997 "clearsign",
998 "editor",
999 "localauth",
1000 "omitsig",
1001 "safemerge",
1002 };
1003 int i;
1004 int globalFlag = find_option("global","g",0)!=0;
1005 db_find_and_open_repository();
1006
--- src/db.c
+++ src/db.c
@@ -698,11 +698,15 @@
698 if( !db_is_global("autosync") ) db_set_int("autosync", 1, 0);
699 if( !db_is_global("safemerge") ) db_set_int("safemerge", 0, 0);
700 if( !db_is_global("localauth") ) db_set_int("localauth", 0, 0);
701 zUser = db_get("default-user", 0);
702 if( zUser==0 ){
703 #ifdef __MINGW32__
704 zUser = getenv("USERNAME");
705 #else
706 zUser = getenv("USER");
707 #endif
708 }
709 if( zUser==0 ){
710 zUser = "root";
711 }
712 db_multi_exec(
@@ -972,21 +976,21 @@
976 **
977 ** autosync If enabled, automatically pull prior to
978 ** commit or update and automatically push
979 ** after commit or tag or branch creation.
980 **
981 ** clearsign Command used to clear-sign manifests at check-in.
982 ** The default is "gpg --clearsign -o ".
983 **
984 ** editor Text editor command used for check-in comments.
985 **
986 ** localauth If enabled, require that HTTP connections from
987 ** 127.0.0.1 be authenticated by password. If
988 ** false, all HTTP requests from localhost have
989 ** unrestricted access to the repository.
990 **
991 ** omitsign When enabled, fossil will not attempt to sign any
992 ** commit with gpg. All commits will be unsigned.
993 **
994 ** safemerge If enabled, when commit will cause a fork, the
995 ** commit will not abort with warning. Also update
996 ** will not be allowed if local changes exist.
@@ -995,11 +999,11 @@
999 static const char *azName[] = {
1000 "autosync",
1001 "clearsign",
1002 "editor",
1003 "localauth",
1004 "omitsign",
1005 "safemerge",
1006 };
1007 int i;
1008 int globalFlag = find_option("global","g",0)!=0;
1009 db_find_and_open_repository();
1010

Keyboard Shortcuts

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