29 |
/* GNULIB headers. */ |
/* GNULIB headers. */ |
30 |
|
|
31 |
/* CVS headers. */ |
/* CVS headers. */ |
32 |
|
#include "server.h" |
33 |
#include "subr.h" |
#include "subr.h" |
34 |
#include "cvs.h" /* For CVSADM_BASE. */ |
#include "cvs.h" /* For CVSADM_BASE. */ |
35 |
|
|
242 |
{ |
{ |
243 |
base_walk (BASE_DEREGISTER, update_dir, file, NULL); |
base_walk (BASE_DEREGISTER, update_dir, file, NULL); |
244 |
} |
} |
245 |
|
|
246 |
|
|
247 |
|
|
248 |
|
int |
249 |
|
base_checkout (RCSNode *rcs, struct file_info *finfo, |
250 |
|
const char *prev, const char *rev, const char *tag, |
251 |
|
const char *options, bool writable) |
252 |
|
{ |
253 |
|
int status; |
254 |
|
|
255 |
|
mkdir_if_needed (CVSADM_BASE); |
256 |
|
|
257 |
|
if (!current_parsed_root->isremote) |
258 |
|
{ |
259 |
|
char *basefile = make_base_file_name (finfo->file, rev); |
260 |
|
status = RCS_checkout (rcs, basefile, rev, tag, options, |
261 |
|
NULL, NULL, NULL); |
262 |
|
xchmod (basefile, writable); |
263 |
|
free (basefile); |
264 |
|
} |
265 |
|
else |
266 |
|
status = 0; |
267 |
|
|
268 |
|
if (server_active) |
269 |
|
server_base_checkout (finfo, options, prev, rev); |
270 |
|
|
271 |
|
return status; |
272 |
|
} |
273 |
|
|
274 |
|
|
275 |
|
|
276 |
|
void |
277 |
|
base_copy (struct file_info *finfo, const char *rev, const char *exists) |
278 |
|
{ |
279 |
|
char *basefile = make_base_file_name (finfo->file, rev); |
280 |
|
copy_file (basefile, finfo->file); |
281 |
|
free (basefile); |
282 |
|
|
283 |
|
if (server_active) |
284 |
|
server_base_copy (finfo, rev, exists); |
285 |
|
} |