diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2008-03-01 20:45:42 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2008-03-01 20:45:42 +0000 |
commit | a7f0244710dc793631d76a238d1c03d51715a2b1 (patch) | |
tree | 71e71d3e5dfa36b52caf1e8e220c0378a8682f5a /usr.bin | |
parent | e5f2cf21623ce053a57222c328a376b878dda387 (diff) |
allow dry-runs (-n) to work properly;
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/import.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/usr.bin/cvs/import.c b/usr.bin/cvs/import.c index 7fe760ef03e..adf66d02097 100644 --- a/usr.bin/cvs/import.c +++ b/usr.bin/cvs/import.c @@ -1,4 +1,4 @@ -/* $OpenBSD: import.c,v 1.85 2008/02/27 22:34:04 joris Exp $ */ +/* $OpenBSD: import.c,v 1.86 2008/03/01 20:45:41 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -307,13 +307,26 @@ import_update(struct cvs_file *cf) if (ret == 0) { import_tag(cf, brev, rev); rcsnum_free(brev); - rcs_write(cf->file_rcs); + if (cvs_noexec != 1) + rcs_write(cf->file_rcs); + cvs_printf("U %s/%s\n", import_repository, cf->file_path); return; } if (cf->file_rcs->rf_branch != NULL) rcsnum_tostr(cf->file_rcs->rf_branch, branch, sizeof(branch)); + if (cf->file_rcs->rf_branch == NULL || cf->in_attic == 1 || + strcmp(branch, import_branch)) { + import_conflicts++; + cvs_printf("C %s/%s\n", import_repository, cf->file_path); + } else { + cvs_printf("U %s/%s\n", import_repository, cf->file_path); + } + + if (cvs_noexec == 1) + return; + d = import_get_rcsdiff(cf, rev); newrev = rcsnum_inc(rev); @@ -325,14 +338,6 @@ import_update(struct cvs_file *cf) import_tag(cf, brev, newrev); - if (cf->file_rcs->rf_branch == NULL || cf->in_attic == 1 || - strcmp(branch, import_branch)) { - import_conflicts++; - cvs_printf("C %s/%s\n", import_repository, cf->file_path); - } else { - cvs_printf("U %s/%s\n", import_repository, cf->file_path); - } - if (kflag) rcs_kwexp_set(cf->file_rcs, kflag); |