Fossil SCM
Merge in SSH open fossil compatibility changes.
Commit
f4e882f5d3e7be5bf0f833eb886da39083b2eea0
Parent
f38f76cf0155985…
4 files changed
+7
+7
+6
-1
+6
-1
+7
| --- src/sync.c | ||
| +++ src/sync.c | ||
| @@ -48,13 +48,20 @@ | ||
| 48 | 48 | } |
| 49 | 49 | }else{ |
| 50 | 50 | /* Autosync defaults on. To make it default off, "return" here. */ |
| 51 | 51 | } |
| 52 | 52 | url_parse(0, URL_REMEMBER); |
| 53 | + if( g.urlIsSsh ){ | |
| 54 | + clone_ssh_db_options(); | |
| 55 | + } | |
| 53 | 56 | if( g.urlProtocol==0 ) return 0; |
| 54 | 57 | if( ( g.urlUser!=0 || g.zFossilUser!=0 ) && g.urlPasswd==0 ){ |
| 55 | 58 | g.urlPasswd = unobscure(db_get("last-sync-pw", 0)); |
| 59 | + } | |
| 60 | + if( g.urlIsSsh && g.urlPasswd==0 ){ | |
| 61 | + g.urlFlags |= URL_PROMPT_PW; | |
| 62 | + url_prompt_for_password(); | |
| 56 | 63 | } |
| 57 | 64 | #if 0 /* Disabled for now */ |
| 58 | 65 | if( (flags & AUTOSYNC_PULL)!=0 && db_get_boolean("auto-shun",1) ){ |
| 59 | 66 | /* When doing an automatic pull, also automatically pull shuns from |
| 60 | 67 | ** the server if pull_shuns is enabled. |
| 61 | 68 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -48,13 +48,20 @@ | |
| 48 | } |
| 49 | }else{ |
| 50 | /* Autosync defaults on. To make it default off, "return" here. */ |
| 51 | } |
| 52 | url_parse(0, URL_REMEMBER); |
| 53 | if( g.urlProtocol==0 ) return 0; |
| 54 | if( ( g.urlUser!=0 || g.zFossilUser!=0 ) && g.urlPasswd==0 ){ |
| 55 | g.urlPasswd = unobscure(db_get("last-sync-pw", 0)); |
| 56 | } |
| 57 | #if 0 /* Disabled for now */ |
| 58 | if( (flags & AUTOSYNC_PULL)!=0 && db_get_boolean("auto-shun",1) ){ |
| 59 | /* When doing an automatic pull, also automatically pull shuns from |
| 60 | ** the server if pull_shuns is enabled. |
| 61 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -48,13 +48,20 @@ | |
| 48 | } |
| 49 | }else{ |
| 50 | /* Autosync defaults on. To make it default off, "return" here. */ |
| 51 | } |
| 52 | url_parse(0, URL_REMEMBER); |
| 53 | if( g.urlIsSsh ){ |
| 54 | clone_ssh_db_options(); |
| 55 | } |
| 56 | if( g.urlProtocol==0 ) return 0; |
| 57 | if( ( g.urlUser!=0 || g.zFossilUser!=0 ) && g.urlPasswd==0 ){ |
| 58 | g.urlPasswd = unobscure(db_get("last-sync-pw", 0)); |
| 59 | } |
| 60 | if( g.urlIsSsh && g.urlPasswd==0 ){ |
| 61 | g.urlFlags |= URL_PROMPT_PW; |
| 62 | url_prompt_for_password(); |
| 63 | } |
| 64 | #if 0 /* Disabled for now */ |
| 65 | if( (flags & AUTOSYNC_PULL)!=0 && db_get_boolean("auto-shun",1) ){ |
| 66 | /* When doing an automatic pull, also automatically pull shuns from |
| 67 | ** the server if pull_shuns is enabled. |
| 68 |
+7
| --- src/sync.c | ||
| +++ src/sync.c | ||
| @@ -48,13 +48,20 @@ | ||
| 48 | 48 | } |
| 49 | 49 | }else{ |
| 50 | 50 | /* Autosync defaults on. To make it default off, "return" here. */ |
| 51 | 51 | } |
| 52 | 52 | url_parse(0, URL_REMEMBER); |
| 53 | + if( g.urlIsSsh ){ | |
| 54 | + clone_ssh_db_options(); | |
| 55 | + } | |
| 53 | 56 | if( g.urlProtocol==0 ) return 0; |
| 54 | 57 | if( ( g.urlUser!=0 || g.zFossilUser!=0 ) && g.urlPasswd==0 ){ |
| 55 | 58 | g.urlPasswd = unobscure(db_get("last-sync-pw", 0)); |
| 59 | + } | |
| 60 | + if( g.urlIsSsh && g.urlPasswd==0 ){ | |
| 61 | + g.urlFlags |= URL_PROMPT_PW; | |
| 62 | + url_prompt_for_password(); | |
| 56 | 63 | } |
| 57 | 64 | #if 0 /* Disabled for now */ |
| 58 | 65 | if( (flags & AUTOSYNC_PULL)!=0 && db_get_boolean("auto-shun",1) ){ |
| 59 | 66 | /* When doing an automatic pull, also automatically pull shuns from |
| 60 | 67 | ** the server if pull_shuns is enabled. |
| 61 | 68 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -48,13 +48,20 @@ | |
| 48 | } |
| 49 | }else{ |
| 50 | /* Autosync defaults on. To make it default off, "return" here. */ |
| 51 | } |
| 52 | url_parse(0, URL_REMEMBER); |
| 53 | if( g.urlProtocol==0 ) return 0; |
| 54 | if( ( g.urlUser!=0 || g.zFossilUser!=0 ) && g.urlPasswd==0 ){ |
| 55 | g.urlPasswd = unobscure(db_get("last-sync-pw", 0)); |
| 56 | } |
| 57 | #if 0 /* Disabled for now */ |
| 58 | if( (flags & AUTOSYNC_PULL)!=0 && db_get_boolean("auto-shun",1) ){ |
| 59 | /* When doing an automatic pull, also automatically pull shuns from |
| 60 | ** the server if pull_shuns is enabled. |
| 61 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -48,13 +48,20 @@ | |
| 48 | } |
| 49 | }else{ |
| 50 | /* Autosync defaults on. To make it default off, "return" here. */ |
| 51 | } |
| 52 | url_parse(0, URL_REMEMBER); |
| 53 | if( g.urlIsSsh ){ |
| 54 | clone_ssh_db_options(); |
| 55 | } |
| 56 | if( g.urlProtocol==0 ) return 0; |
| 57 | if( ( g.urlUser!=0 || g.zFossilUser!=0 ) && g.urlPasswd==0 ){ |
| 58 | g.urlPasswd = unobscure(db_get("last-sync-pw", 0)); |
| 59 | } |
| 60 | if( g.urlIsSsh && g.urlPasswd==0 ){ |
| 61 | g.urlFlags |= URL_PROMPT_PW; |
| 62 | url_prompt_for_password(); |
| 63 | } |
| 64 | #if 0 /* Disabled for now */ |
| 65 | if( (flags & AUTOSYNC_PULL)!=0 && db_get_boolean("auto-shun",1) ){ |
| 66 | /* When doing an automatic pull, also automatically pull shuns from |
| 67 | ** the server if pull_shuns is enabled. |
| 68 |
+6
-1
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -1743,11 +1743,16 @@ | ||
| 1743 | 1743 | fossil_print("Error: %s\n", zMsg); |
| 1744 | 1744 | if( fossil_strcmp(zMsg, "login failed")==0 ){ |
| 1745 | 1745 | if( nCycle<2 ){ |
| 1746 | 1746 | g.urlPasswd = 0; |
| 1747 | 1747 | go = 1; |
| 1748 | - if( g.cgiOutput==0 ) url_prompt_for_password(); | |
| 1748 | + if( g.cgiOutput==0 ){ | |
| 1749 | + if( g.urlIsSsh ){ | |
| 1750 | + g.urlFlags |= URL_PROMPT_PW; | |
| 1751 | + } | |
| 1752 | + url_prompt_for_password(); | |
| 1753 | + } | |
| 1749 | 1754 | } |
| 1750 | 1755 | }else{ |
| 1751 | 1756 | blob_appendf(&xfer.err, "server says: %s\n", zMsg); |
| 1752 | 1757 | nErr++; |
| 1753 | 1758 | } |
| 1754 | 1759 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1743,11 +1743,16 @@ | |
| 1743 | fossil_print("Error: %s\n", zMsg); |
| 1744 | if( fossil_strcmp(zMsg, "login failed")==0 ){ |
| 1745 | if( nCycle<2 ){ |
| 1746 | g.urlPasswd = 0; |
| 1747 | go = 1; |
| 1748 | if( g.cgiOutput==0 ) url_prompt_for_password(); |
| 1749 | } |
| 1750 | }else{ |
| 1751 | blob_appendf(&xfer.err, "server says: %s\n", zMsg); |
| 1752 | nErr++; |
| 1753 | } |
| 1754 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1743,11 +1743,16 @@ | |
| 1743 | fossil_print("Error: %s\n", zMsg); |
| 1744 | if( fossil_strcmp(zMsg, "login failed")==0 ){ |
| 1745 | if( nCycle<2 ){ |
| 1746 | g.urlPasswd = 0; |
| 1747 | go = 1; |
| 1748 | if( g.cgiOutput==0 ){ |
| 1749 | if( g.urlIsSsh ){ |
| 1750 | g.urlFlags |= URL_PROMPT_PW; |
| 1751 | } |
| 1752 | url_prompt_for_password(); |
| 1753 | } |
| 1754 | } |
| 1755 | }else{ |
| 1756 | blob_appendf(&xfer.err, "server says: %s\n", zMsg); |
| 1757 | nErr++; |
| 1758 | } |
| 1759 |
+6
-1
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -1743,11 +1743,16 @@ | ||
| 1743 | 1743 | fossil_print("Error: %s\n", zMsg); |
| 1744 | 1744 | if( fossil_strcmp(zMsg, "login failed")==0 ){ |
| 1745 | 1745 | if( nCycle<2 ){ |
| 1746 | 1746 | g.urlPasswd = 0; |
| 1747 | 1747 | go = 1; |
| 1748 | - if( g.cgiOutput==0 ) url_prompt_for_password(); | |
| 1748 | + if( g.cgiOutput==0 ){ | |
| 1749 | + if( g.urlIsSsh ){ | |
| 1750 | + g.urlFlags |= URL_PROMPT_PW; | |
| 1751 | + } | |
| 1752 | + url_prompt_for_password(); | |
| 1753 | + } | |
| 1749 | 1754 | } |
| 1750 | 1755 | }else{ |
| 1751 | 1756 | blob_appendf(&xfer.err, "server says: %s\n", zMsg); |
| 1752 | 1757 | nErr++; |
| 1753 | 1758 | } |
| 1754 | 1759 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1743,11 +1743,16 @@ | |
| 1743 | fossil_print("Error: %s\n", zMsg); |
| 1744 | if( fossil_strcmp(zMsg, "login failed")==0 ){ |
| 1745 | if( nCycle<2 ){ |
| 1746 | g.urlPasswd = 0; |
| 1747 | go = 1; |
| 1748 | if( g.cgiOutput==0 ) url_prompt_for_password(); |
| 1749 | } |
| 1750 | }else{ |
| 1751 | blob_appendf(&xfer.err, "server says: %s\n", zMsg); |
| 1752 | nErr++; |
| 1753 | } |
| 1754 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1743,11 +1743,16 @@ | |
| 1743 | fossil_print("Error: %s\n", zMsg); |
| 1744 | if( fossil_strcmp(zMsg, "login failed")==0 ){ |
| 1745 | if( nCycle<2 ){ |
| 1746 | g.urlPasswd = 0; |
| 1747 | go = 1; |
| 1748 | if( g.cgiOutput==0 ){ |
| 1749 | if( g.urlIsSsh ){ |
| 1750 | g.urlFlags |= URL_PROMPT_PW; |
| 1751 | } |
| 1752 | url_prompt_for_password(); |
| 1753 | } |
| 1754 | } |
| 1755 | }else{ |
| 1756 | blob_appendf(&xfer.err, "server says: %s\n", zMsg); |
| 1757 | nErr++; |
| 1758 | } |
| 1759 |