Deleted Added
full compact
admin.c (32785) admin.c (34461)
1/*
2 * Copyright (c) 1992, Brian Berliner and Jeff Polk
3 * Copyright (c) 1989-1992, Brian Berliner
4 *
5 * You may distribute under the terms of the GNU General Public License as
6 * specified in the README file that comes with the CVS source distribution.
7 *
8 * Administration ("cvs admin")

--- 464 unchanged lines hidden (view full) ---

473 else if (strcmp (version, "0") == 0)
474 {
475 error (0, 0, "cannot admin newly added file `%s'", finfo->file);
476 goto exitfunc;
477 }
478
479 rcs = vers->srcfile;
480 if (rcs->flags & PARTIAL)
1/*
2 * Copyright (c) 1992, Brian Berliner and Jeff Polk
3 * Copyright (c) 1989-1992, Brian Berliner
4 *
5 * You may distribute under the terms of the GNU General Public License as
6 * specified in the README file that comes with the CVS source distribution.
7 *
8 * Administration ("cvs admin")

--- 464 unchanged lines hidden (view full) ---

473 else if (strcmp (version, "0") == 0)
474 {
475 error (0, 0, "cannot admin newly added file `%s'", finfo->file);
476 goto exitfunc;
477 }
478
479 rcs = vers->srcfile;
480 if (rcs->flags & PARTIAL)
481 RCS_reparsercsfile (rcs, NULL);
481 RCS_reparsercsfile (rcs, (FILE **) NULL, (struct rcsbuffer *) NULL);
482
483 status = 0;
484
485 if (!admin_data->quiet)
486 {
487 cvs_output ("RCS file: ", 0);
488 cvs_output (rcs->path, 0);
489 cvs_output ("\n", 1);
490 }
491
492 if (admin_data->branch != NULL)
482
483 status = 0;
484
485 if (!admin_data->quiet)
486 {
487 cvs_output ("RCS file: ", 0);
488 cvs_output (rcs->path, 0);
489 cvs_output ("\n", 1);
490 }
491
492 if (admin_data->branch != NULL)
493 RCS_setbranch (rcs, (admin_data->branch[2] == '\0'
494 ? NULL
495 : admin_data->branch + 2));
493 {
494 char *branch = &admin_data->branch[2];
495 if (*branch != '\0' && ! isdigit (*branch))
496 {
497 branch = RCS_whatbranch (rcs, admin_data->branch + 2);
498 if (branch == NULL)
499 {
500 error (0, 0, "%s: Symbolic name %s is undefined.",
501 rcs->path, admin_data->branch + 2);
502 status = 1;
503 }
504 }
505 if (status == 0)
506 RCS_setbranch (rcs, branch);
507 if (branch != NULL && branch != &admin_data->branch[2])
508 free (branch);
509 }
496 if (admin_data->comment != NULL)
497 {
498 if (rcs->comment != NULL)
499 free (rcs->comment);
500 rcs->comment = xstrdup (admin_data->comment + 2);
501 }
502 if (admin_data->set_strict)
503 rcs->strict_locks = 1;

--- 284 unchanged lines hidden (view full) ---

788 additional message is to make it clear that the previous problems
789 caused CVS to forget about the idea of modifying the RCS file. */
790 error (0, 0, "cannot modify RCS file for `%s'", finfo->file);
791
792 /* Upon failure, we want to abandon any changes made to the
793 RCS data structure. Forcing a reparse does the trick,
794 but leaks memory and is kludgey. Should we export
795 free_rcsnode_contents for this purpose? */
510 if (admin_data->comment != NULL)
511 {
512 if (rcs->comment != NULL)
513 free (rcs->comment);
514 rcs->comment = xstrdup (admin_data->comment + 2);
515 }
516 if (admin_data->set_strict)
517 rcs->strict_locks = 1;

--- 284 unchanged lines hidden (view full) ---

802 additional message is to make it clear that the previous problems
803 caused CVS to forget about the idea of modifying the RCS file. */
804 error (0, 0, "cannot modify RCS file for `%s'", finfo->file);
805
806 /* Upon failure, we want to abandon any changes made to the
807 RCS data structure. Forcing a reparse does the trick,
808 but leaks memory and is kludgey. Should we export
809 free_rcsnode_contents for this purpose? */
796 RCS_reparsercsfile (rcs, NULL);
810 RCS_reparsercsfile (rcs, (FILE **) NULL, (struct rcsbuffer *) NULL);
797 }
798
799 exitfunc:
800 freevers_ts (&vers);
801 return status;
802}
803
804/*

--- 15 unchanged lines hidden ---
811 }
812
813 exitfunc:
814 freevers_ts (&vers);
815 return status;
816}
817
818/*

--- 15 unchanged lines hidden ---