Fossil SCM
Add the "ignore" subcommand to the "all" command. Useful for causing testing and debugging repositories from being bypassed for "fossil all rebuild" or "fossil all sync".
Commit
24636f7057238a8feba2c6f0008abc8eb5d4726d
Parent
bd68e4172d7e6be…
1 file changed
+15
-2
+15
-2
| --- src/allrepo.c | ||
| +++ src/allrepo.c | ||
| @@ -60,10 +60,13 @@ | ||
| 60 | 60 | ** On Win32 systems, the file is named "_fossil" and is located in |
| 61 | 61 | ** %LOCALAPPDATA%, %APPDATA% or %HOMEPATH%. |
| 62 | 62 | ** |
| 63 | 63 | ** Available operations are: |
| 64 | 64 | ** |
| 65 | +** ignore Arguments are repositories that should be ignored | |
| 66 | +** by subsequent list, pull, push, rebuild, and sync. | |
| 67 | +** | |
| 65 | 68 | ** list | ls Display the location of all repositories |
| 66 | 69 | ** |
| 67 | 70 | ** pull Run a "pull" operation on all repositories |
| 68 | 71 | ** |
| 69 | 72 | ** push Run a "push" on all repositories |
| @@ -72,11 +75,12 @@ | ||
| 72 | 75 | ** |
| 73 | 76 | ** sync Run a "sync" on all repositories |
| 74 | 77 | ** |
| 75 | 78 | ** Respositories are automatically added to the set of known repositories |
| 76 | 79 | ** when one of the following commands against the repository: clone, info, |
| 77 | -** pull, push, or sync | |
| 80 | +** pull, push, or sync. Even previously ignored repositories are added back | |
| 81 | +** to the list of repositories by these commands. | |
| 78 | 82 | */ |
| 79 | 83 | void all_cmd(void){ |
| 80 | 84 | int n; |
| 81 | 85 | Stmt q; |
| 82 | 86 | const char *zCmd; |
| @@ -99,13 +103,22 @@ | ||
| 99 | 103 | zCmd = "pull -autourl -R"; |
| 100 | 104 | }else if( strncmp(zCmd, "rebuild", n)==0 ){ |
| 101 | 105 | zCmd = "rebuild"; |
| 102 | 106 | }else if( strncmp(zCmd, "sync", n)==0 ){ |
| 103 | 107 | zCmd = "sync -autourl -R"; |
| 108 | + }else if( strncmp(zCmd, "ignore", n)==0 ){ | |
| 109 | + int j; | |
| 110 | + db_begin_transaction(); | |
| 111 | + for(j=3; j<g.argc; j++){ | |
| 112 | + db_multi_exec("DELETE FROM global_config WHERE name GLOB 'repo:%q'", | |
| 113 | + g.argv[j]); | |
| 114 | + } | |
| 115 | + db_end_transaction(0); | |
| 116 | + return; | |
| 104 | 117 | }else{ |
| 105 | 118 | fossil_fatal("\"all\" subcommand should be one of: " |
| 106 | - "list ls push pull rebuild sync"); | |
| 119 | + "ignore list ls push pull rebuild sync"); | |
| 107 | 120 | } |
| 108 | 121 | zFossil = quoteFilename(g.argv[0]); |
| 109 | 122 | nMissing = 0; |
| 110 | 123 | db_prepare(&q, |
| 111 | 124 | "SELECT DISTINCT substr(name, 6) COLLATE nocase" |
| 112 | 125 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -60,10 +60,13 @@ | |
| 60 | ** On Win32 systems, the file is named "_fossil" and is located in |
| 61 | ** %LOCALAPPDATA%, %APPDATA% or %HOMEPATH%. |
| 62 | ** |
| 63 | ** Available operations are: |
| 64 | ** |
| 65 | ** list | ls Display the location of all repositories |
| 66 | ** |
| 67 | ** pull Run a "pull" operation on all repositories |
| 68 | ** |
| 69 | ** push Run a "push" on all repositories |
| @@ -72,11 +75,12 @@ | |
| 72 | ** |
| 73 | ** sync Run a "sync" on all repositories |
| 74 | ** |
| 75 | ** Respositories are automatically added to the set of known repositories |
| 76 | ** when one of the following commands against the repository: clone, info, |
| 77 | ** pull, push, or sync |
| 78 | */ |
| 79 | void all_cmd(void){ |
| 80 | int n; |
| 81 | Stmt q; |
| 82 | const char *zCmd; |
| @@ -99,13 +103,22 @@ | |
| 99 | zCmd = "pull -autourl -R"; |
| 100 | }else if( strncmp(zCmd, "rebuild", n)==0 ){ |
| 101 | zCmd = "rebuild"; |
| 102 | }else if( strncmp(zCmd, "sync", n)==0 ){ |
| 103 | zCmd = "sync -autourl -R"; |
| 104 | }else{ |
| 105 | fossil_fatal("\"all\" subcommand should be one of: " |
| 106 | "list ls push pull rebuild sync"); |
| 107 | } |
| 108 | zFossil = quoteFilename(g.argv[0]); |
| 109 | nMissing = 0; |
| 110 | db_prepare(&q, |
| 111 | "SELECT DISTINCT substr(name, 6) COLLATE nocase" |
| 112 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -60,10 +60,13 @@ | |
| 60 | ** On Win32 systems, the file is named "_fossil" and is located in |
| 61 | ** %LOCALAPPDATA%, %APPDATA% or %HOMEPATH%. |
| 62 | ** |
| 63 | ** Available operations are: |
| 64 | ** |
| 65 | ** ignore Arguments are repositories that should be ignored |
| 66 | ** by subsequent list, pull, push, rebuild, and sync. |
| 67 | ** |
| 68 | ** list | ls Display the location of all repositories |
| 69 | ** |
| 70 | ** pull Run a "pull" operation on all repositories |
| 71 | ** |
| 72 | ** push Run a "push" on all repositories |
| @@ -72,11 +75,12 @@ | |
| 75 | ** |
| 76 | ** sync Run a "sync" on all repositories |
| 77 | ** |
| 78 | ** Respositories are automatically added to the set of known repositories |
| 79 | ** when one of the following commands against the repository: clone, info, |
| 80 | ** pull, push, or sync. Even previously ignored repositories are added back |
| 81 | ** to the list of repositories by these commands. |
| 82 | */ |
| 83 | void all_cmd(void){ |
| 84 | int n; |
| 85 | Stmt q; |
| 86 | const char *zCmd; |
| @@ -99,13 +103,22 @@ | |
| 103 | zCmd = "pull -autourl -R"; |
| 104 | }else if( strncmp(zCmd, "rebuild", n)==0 ){ |
| 105 | zCmd = "rebuild"; |
| 106 | }else if( strncmp(zCmd, "sync", n)==0 ){ |
| 107 | zCmd = "sync -autourl -R"; |
| 108 | }else if( strncmp(zCmd, "ignore", n)==0 ){ |
| 109 | int j; |
| 110 | db_begin_transaction(); |
| 111 | for(j=3; j<g.argc; j++){ |
| 112 | db_multi_exec("DELETE FROM global_config WHERE name GLOB 'repo:%q'", |
| 113 | g.argv[j]); |
| 114 | } |
| 115 | db_end_transaction(0); |
| 116 | return; |
| 117 | }else{ |
| 118 | fossil_fatal("\"all\" subcommand should be one of: " |
| 119 | "ignore list ls push pull rebuild sync"); |
| 120 | } |
| 121 | zFossil = quoteFilename(g.argv[0]); |
| 122 | nMissing = 0; |
| 123 | db_prepare(&q, |
| 124 | "SELECT DISTINCT substr(name, 6) COLLATE nocase" |
| 125 |