Lines Matching defs:rcs

57 static int lock_RCS PROTO((const char *user, RCSNode *rcs, const char *rev,
63 static void fixaddfile PROTO((const char *rcs));
65 static void unlockrcs PROTO((RCSNode *rcs));
268 xfinfo.rcs = NULL;
890 * - if status is T_ADDED, rcs file must not exist unless on
908 !RCS_isbranch (finfo->rcs, vers->tag))
972 if (finfo->rcs != NULL &&
973 !RCS_isdead (finfo->rcs, finfo->rcs->head))
977 finfo->fullname, finfo->rcs->path);
1045 ci->rev = RCS_whatbranch (finfo->rcs, vers->tag);
1247 && finfo->rcs != NULL)
1249 char *rev = RCS_getversion (finfo->rcs, write_dirtag, NULL, 1, NULL);
1251 && !RCS_nodeisbranch (finfo->rcs, write_dirtag))
1292 if (finfo->rcs == NULL)
1294 if (lock_RCS (finfo->file, finfo->rcs, ci->rev,
1297 unlockrcs (finfo->rcs);
1305 &finfo->rcs) != 0)
1307 if (finfo->rcs != NULL)
1308 fixaddfile (finfo->rcs->path);
1323 if (finfo->rcs == NULL)
1327 ci->rev = RCS_whatbranch (finfo->rcs, ci->tag);
1332 unlockrcs (finfo->rcs);
1333 fixbranch (finfo->rcs, sbranch);
1354 if (finfo->rcs->head) {
1356 int thisrev = atoi (finfo->rcs->head);
1380 unlockrcs (finfo->rcs);
1381 fixbranch (finfo->rcs, sbranch);
1643 if (finfo->rcs == NULL)
1647 if (tag && !(branch = RCS_nodeisbranch (finfo->rcs, tag)))
1650 if ((retcode = RCS_deltag (finfo->rcs, tag)) != 0)
1658 RCS_rewrite (finfo->rcs, NULL, NULL);
1677 rev = RCS_whatbranch (finfo->rcs, tag);
1684 branchname = RCS_getbranch (finfo->rcs, rev, 1);
1689 corev = RCS_gettag (finfo->rcs, tag, 1, (int *) NULL);
1702 prev_rev = RCS_head (finfo->rcs);
1709 if (RCS_setbranch (finfo->rcs, NULL) != 0)
1715 RCS_rewrite (finfo->rcs, NULL, NULL);
1720 retcode = RCS_checkout (finfo->rcs, finfo->file, rev ? corev : NULL,
1734 if (RCS_lock (finfo->rcs, rev ? corev : NULL, 1) == 0)
1735 RCS_rewrite (finfo->rcs, NULL, NULL);
1741 retcode = RCS_checkin (finfo->rcs, finfo->file, message, rev, 0,
1754 corev = rev ? RCS_getbranch (finfo->rcs, rev, 1) : RCS_head (finfo->rcs);
1761 old_path = xstrdup (finfo->rcs->path);
1763 RCS_setattic (finfo->rcs, 1);
1805 else if (finfo->rcs != NULL)
1806 fixaddfile (finfo->rcs->path);
1816 * Unlock an rcs file
1819 unlockrcs (rcs)
1820 RCSNode *rcs;
1824 if ((retcode = RCS_unlock (rcs, NULL, 1)) != 0)
1826 "could not unlock %s", rcs->path);
1828 RCS_rewrite (rcs, NULL, NULL);
1836 * FIXME: Every caller that calls this function can access finfo->rcs (the
1841 fixaddfile (rcs)
1842 const char *rcs;
1849 if ((rcsfile = RCS_parsercsfile (rcs)) == NULL)
1851 if (unlink_file (rcs) < 0)
1852 error (0, errno, "cannot remove %s", rcs);
1862 * put the branch back on an rcs file
1865 fixbranch (rcs, branch)
1866 RCSNode *rcs;
1873 if ((retcode = RCS_setbranch (rcs, branch)) != 0)
1875 "cannot restore branch to %s for %s", branch, rcs->path);
1876 RCS_rewrite (rcs, NULL, NULL);
1918 RCSNode *rcs;
1991 /* From reading the RCS 5.7 source, "rcs -i" adds a newline to the
2008 was implemented via "rcs -i". It should be revised at
2024 rcs = RCS_parsercsfile (rcsname);
2030 *rcsnode = rcs;
2038 rcs = *rcsnode;
2040 oldexpand = RCS_getexpand (rcs);
2050 RCS_setexpand (rcs, options + 2);
2057 if (!(rcs->flags & INATTIC))
2060 rcs->path);
2068 if (RCS_setattic (rcs, 0))
2074 rev = RCS_getversion (rcs, tag, NULL, 1, (int *) NULL);
2076 if (lock_RCS (file, rcs, rev, repository))
2079 rev ? rev : tag ? tag : "HEAD", rcs->path);
2117 retcode = RCS_checkin (rcs, NULL, tmp, NULL, 0,
2123 "could not create initial dead revision %s", rcs->path);
2133 freercsnode (&rcs);
2134 rcs = RCS_parse (file, repository);
2135 if (rcs == NULL)
2140 *rcsnode = rcs;
2143 if (lock_RCS (file, rcs, NULL, repository))
2146 rcs->path);
2153 if (!RCS_nodeisbranch (rcs, tag))
2165 fixbranch (rcs, sbranch);
2167 head = RCS_getversion (rcs, NULL, NULL, 0, (int *) NULL);
2170 rcs->path);
2171 magicrev = RCS_magicrev (rcs, head);
2176 headtime = RCS_getrevtime (rcs, head, 0, 0);
2178 retcode = RCS_settag (rcs, tag, magicrev);
2179 RCS_rewrite (rcs, NULL, NULL);
2187 "could not stub branch %s for %s", tag, rcs->path);
2223 revnum = RCS_whatbranch (rcs, tag);
2224 retcode = RCS_checkin (rcs, NULL, tmp, revnum, headtime,
2235 rcs->path);
2244 freercsnode (&rcs);
2245 rcs = RCS_parse (file, repository);
2246 if (rcs == NULL)
2248 error (0, 0, "could not read %s", rcs->path);
2251 *rcsnode = rcs;
2257 if (lock_RCS (file, rcs, NULL, repository))
2259 error (0, 0, "cannot lock head revision in `%s'.", rcs->path);
2264 if (*rcsnode != rcs)
2267 *rcsnode = rcs;
2307 lock_RCS (user, rcs, rev, repository)
2309 RCSNode *rcs;
2328 branch = xstrdup (rcs->branch);
2331 if (RCS_setbranch (rcs, NULL) != 0)
2334 rcs->path);
2340 err = RCS_lock (rcs, NULL, 1);
2344 RCS_lock (rcs, rev, 1);
2376 fixbranch (rcs, branch);