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".

drh 2010-11-02 00:07 UTC trunk
Commit 24636f7057238a8feba2c6f0008abc8eb5d4726d
1 file changed +15 -2
+15 -2
--- src/allrepo.c
+++ src/allrepo.c
@@ -60,10 +60,13 @@
6060
** On Win32 systems, the file is named "_fossil" and is located in
6161
** %LOCALAPPDATA%, %APPDATA% or %HOMEPATH%.
6262
**
6363
** Available operations are:
6464
**
65
+** ignore Arguments are repositories that should be ignored
66
+** by subsequent list, pull, push, rebuild, and sync.
67
+**
6568
** list | ls Display the location of all repositories
6669
**
6770
** pull Run a "pull" operation on all repositories
6871
**
6972
** push Run a "push" on all repositories
@@ -72,11 +75,12 @@
7275
**
7376
** sync Run a "sync" on all repositories
7477
**
7578
** Respositories are automatically added to the set of known repositories
7679
** 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.
7882
*/
7983
void all_cmd(void){
8084
int n;
8185
Stmt q;
8286
const char *zCmd;
@@ -99,13 +103,22 @@
99103
zCmd = "pull -autourl -R";
100104
}else if( strncmp(zCmd, "rebuild", n)==0 ){
101105
zCmd = "rebuild";
102106
}else if( strncmp(zCmd, "sync", n)==0 ){
103107
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;
104117
}else{
105118
fossil_fatal("\"all\" subcommand should be one of: "
106
- "list ls push pull rebuild sync");
119
+ "ignore list ls push pull rebuild sync");
107120
}
108121
zFossil = quoteFilename(g.argv[0]);
109122
nMissing = 0;
110123
db_prepare(&q,
111124
"SELECT DISTINCT substr(name, 6) COLLATE nocase"
112125
--- 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

Keyboard Shortcuts

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