src/main.cpp

changeset 21
bc8b76ca9ee9
parent 20
8639ccd855ba
child 23
b4979c194dc8
equal deleted inserted replaced
20:8639ccd855ba 21:bc8b76ca9ee9
201 for (auto &&repo : repos.list()) { 201 for (auto &&repo : repos.list()) {
202 proc.chdir(repo.path); 202 proc.chdir(repo.path);
203 if (repo.type == fm::HG) { 203 if (repo.type == fm::HG) {
204 proc.setbin(settings.hg); 204 proc.setbin(settings.hg);
205 if (proc.exec({"pull", "-y"})) { 205 if (proc.exec({"pull", "-y"})) {
206 fprintf(stderr, "Pulling repo '%s' failed!\nMaybe there is no remote?\n", repo.path.c_str()); 206 fprintf(stderr, "Pulling repo '%s' failed - continue without pull.\n", repo.path.c_str());
207 } else if (proc.exec({"update"})) { 207 } else if (proc.exec({"update"})) {
208 fprintf(stderr, "Updating repo '%s' failed!\nMaybe there are local changes?\n", repo.path.c_str()); 208 fprintf(stderr, "Updating repo '%s' failed!\nMaybe there are local changes?\n", repo.path.c_str());
209 } 209 }
210 } else { 210 } else {
211 proc.setbin(settings.git); 211 proc.setbin(settings.git);
212 if (proc.exec({"pull", "-q"})) { 212 if (proc.exec({"pull", "-q"})) {
213 fprintf(stderr, "Pulling repo '%s' failed!\nMaybe there is no remote or there are local changes?\n", repo.path.c_str()); 213 fprintf(stderr, "Pulling repo '%s' failed - continue without pull.\n", repo.path.c_str());
214 } 214 }
215 } 215 }
216 } 216 }
217 } 217 }
218 218

mercurial