Artifact Content
Not logged in

Artifact 19641d9e3e99df6cde1591e95bdc6d0b8add5b9b

Ticket change [19641d9e3e] - Ticket 2aaa8042ca Option to avoid saving the sync URL status still Open with 2 other changes by dmitry on 2009-11-06 12:27:01.

D 2009-11-06T12:27:01
J +comment \n\n<hr><i>dmitry\sadded\son\s2009-11-06\s12:27:01:</i><br>\nSorry,\sforgot\sto\sadd\s?--once?\sto\ssome\scommands\sdescription.\sHere's\sthe\supdated\sversion:\r\n\r\n<verbatim>\r\n---\ssrc/sync.c\r\n+++\ssrc/sync.c\r\n@@\s-67,14\s+67,17\s@@\r\n\s/*\r\n\s**\sThis\sroutine\sprocesses\sthe\scommand-line\sargument\sfor\spush,\spull,\r\n\s**\sand\ssync.\s\sIf\sa\scommand-line\sargument\sis\sgiven,\sthat\sis\sthe\sURL\r\n\s**\sof\sa\sserver\sto\ssync\sagainst.\s\sIf\sno\sargument\sis\sgiven,\suse\sthe\r\n\s**\smost\srecently\ssynced\sURL.\s\sRemember\sthe\scurrent\sURL\sfor\snext\stime.\r\n+**\r\n+**\sIf\s--once\soption\sis\sspecified,\sdo\snot\sremember\sURL.\r\n\s*/\r\n\svoid\sprocess_sync_args(void){\r\n\s\s\sconst\schar\s*zUrl\s=\s0;\r\n\s\s\sint\surlOptional\s=\sfind_option("autourl",0,0)!=0;\r\n+\s\sint\ssyncOnce\s=\sfind_option("once",0,0)!=0;\r\n\s\s\surl_proxy_options();\r\n\s\s\sdb_find_and_open_repository(1);\r\n\s\s\sif(\sg.argc==2\s){\r\n\s\s\s\s\szUrl\s=\sdb_get("last-sync-url",\s0);\r\n\s\s\s}else\sif(\sg.argc==3\s){\r\n@@\s-83,11\s+86,13\s@@\r\n\s\s\sif(\szUrl==0\s){\r\n\s\s\s\s\sif(\surlOptional\s)\sexit(0);\r\n\s\s\s\s\susage("URL");\r\n\s\s\s}\r\n\s\s\surl_parse(zUrl);\r\n-\s\sdb_set("last-sync-url",\sg.urlIsFile\s?\sg.urlCanonical\s:\szUrl,\s0);\r\n+\s\sif\s(\ssyncOnce==0\s)\s{\r\n+\s\s\s\sdb_set("last-sync-url",\sg.urlIsFile\s?\sg.urlCanonical\s:\szUrl,\s0);\r\n+\s\s}\r\n\s\s\suser_select();\r\n\s\s\sif(\sg.argc==2\s){\r\n\s\s\s\s\sif(\sg.urlPort!=g.urlDfltPort\s){\r\n\s\s\s\s\s\s\sprintf("Server:\s\s\s\s%s://%s:%d%s\\n",\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sg.urlProtocol,\sg.urlName,\sg.urlPort,\sg.urlPath);\r\n@@\s-99,16\s+104,18\s@@\r\n\s}\r\n\s\r\n\s/*\r\n\s**\sCOMMAND:\spull\r\n\s**\r\n-**\sUsage:\s%fossil\spull\s?URL?\s?-R|--respository\sREPOSITORY?\r\n+**\sUsage:\s%fossil\spull\s?URL?\s?-R|--respository\sREPOSITORY?\s?--once?\r\n\s**\r\n\s**\sPull\schanges\sfrom\sa\sremote\srepository\sinto\sthe\slocal\srepository.\r\n\s**\r\n\s**\sIf\sthe\sURL\sis\snot\sspecified,\sthen\sthe\sURL\sfrom\sthe\smost\srecent\r\n\s**\sclone,\spush,\spull,\sremote-url,\sor\ssync\scommand\sis\sused.\r\n+**\r\n+**\sIf\s--once\soption\sis\sspecified,\sdo\snot\sremember\sURL.\r\n\s**\r\n\s**\sSee\salso:\sclone,\spush,\ssync,\sremote-url\r\n\s*/\r\n\svoid\spull_cmd(void){\r\n\s\s\sprocess_sync_args();\r\n@@\s-116,16\s+123,18\s@@\r\n\s}\r\n\s\r\n\s/*\r\n\s**\sCOMMAND:\spush\r\n\s**\r\n-**\sUsage:\s%fossil\spush\s?URL?\s?-R|--repository\sREPOSITORY?\r\n+**\sUsage:\s%fossil\spush\s?URL?\s?-R|--repository\sREPOSITORY?\s?--once?\r\n\s**\r\n\s**\sPush\schanges\sin\sthe\slocal\srepository\sover\sinto\sa\sremote\srepository.\r\n\s**\r\n\s**\sIf\sthe\sURL\sis\snot\sspecified,\sthen\sthe\sURL\sfrom\sthe\smost\srecent\r\n\s**\sclone,\spush,\spull,\sremote-url,\sor\ssync\scommand\sis\sused.\r\n+**\r\n+**\sIf\s--once\soption\sis\sspecified,\sdo\snot\sremember\sURL.\r\n\s**\r\n\s**\sSee\salso:\sclone,\spull,\ssync,\sremote-url\r\n\s*/\r\n\svoid\spush_cmd(void){\r\n\s\s\sprocess_sync_args();\r\n@@\s-134,11\s+143,11\s@@\r\n\s\r\n\s\r\n\s/*\r\n\s**\sCOMMAND:\ssync\r\n\s**\r\n-**\sUsage:\s%fossil\ssync\s?URL?\s?-R|--repository\sREPOSITORY?\r\n+**\sUsage:\s%fossil\ssync\s?URL?\s?-R|--repository\sREPOSITORY?\s?--once?\r\n\s**\r\n\s**\sSynchronize\sthe\slocal\srepository\swith\sa\sremote\srepository.\s\sThis\sis\r\n\s**\sthe\sequivalent\sof\srunning\sboth\s"push"\sand\s"pull"\sat\sthe\ssame\stime.\r\n\s**\r\n\s**\sIf\sa\suser-id\sand\spassword\sare\srequired,\sspecify\sthem\sas\sfollows:\r\n@@\s-145,10\s+154,12\s@@\r\n\s**\r\n\s**\s\s\s\s\shttp://userid:password@www.domain.com:1234/path\r\n\s**\r\n\s**\sIf\sthe\sURL\sis\snot\sspecified,\sthen\sthe\sURL\sfrom\sthe\smost\srecent\ssuccessful\r\n\s**\sclone,\spush,\spull,\sremote-url,\sor\ssync\scommand\sis\sused.\r\n+**\r\n+**\sIf\s--once\soption\sis\sspecified,\sdo\snot\sremember\sURL.\r\n\s**\r\n\s**\sSee\salso:\s\sclone,\spush,\spull,\sremote-url\r\n\s*/\r\n\svoid\ssync_cmd(void){\r\n\s\s\sprocess_sync_args();\r\n\r\n</verbatim>
J resolution Open
K 2aaa8042caec7929f432ce1de37b10563c70dd07
U dmitry
Z f9b17baade1c40094683e50c12fc65de