- Try to match style(9).
- Remove old comments.
This commit is contained in:
parent
46c790391c
commit
231a7b676c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/csup_cvsmode/; revision=186741
@ -532,7 +532,7 @@ detailer_checkrcsattr(struct detailer *d, struct coll *coll, char *name,
|
||||
char *attr, *path;
|
||||
int error;
|
||||
|
||||
/*
|
||||
/*
|
||||
* I don't think we can use the status file, since it only records file
|
||||
* attributes in cvsmode.
|
||||
*/
|
||||
@ -572,7 +572,7 @@ detailer_send_details(struct detailer *d, struct coll *coll, char *name,
|
||||
int error;
|
||||
size_t len;
|
||||
|
||||
/*
|
||||
/*
|
||||
* Try to check if the file exists either live or dead to see if we can
|
||||
* edit it and put it live or dead, rather than receiving the entire
|
||||
* file.
|
||||
|
@ -123,7 +123,6 @@ struct rcsfile {
|
||||
struct branch *trunk; /* The tip delta. */
|
||||
|
||||
LIST_HEAD(, delta) deltatable;
|
||||
LIST_HEAD(, delta) deltatable_dates;
|
||||
|
||||
char *desc;
|
||||
};
|
||||
@ -144,7 +143,6 @@ static struct stream *rcsfile_getdeltatext(struct rcsfile *, struct delta *,
|
||||
static void rcsdelta_writestring(char *, size_t, struct stream *);
|
||||
static void rcsdelta_insertbranch(struct delta *, struct branch *);
|
||||
|
||||
|
||||
/* Space formatting of RCS file. */
|
||||
const char *head_space = "\t";
|
||||
const char *branch_space = "\t";
|
||||
@ -408,12 +406,6 @@ rcsfile_write(struct rcsfile *rf, struct stream *dest)
|
||||
stream_printf(dest, "desc\n@@");
|
||||
d = LIST_FIRST(&rf->trunk->deltalist);
|
||||
|
||||
/*
|
||||
* XXX: We do not take as much care as cvsup to cope with hand-hacked
|
||||
* RCS-files, and therefore we'll just let them be updated. If having
|
||||
* them correct is important, it will be catched by the checksum anyway.
|
||||
*/
|
||||
|
||||
/* Write out deltatexts. */
|
||||
error = rcsfile_write_deltatext(rf, dest);
|
||||
stream_printf(dest, "\n");
|
||||
@ -815,10 +807,6 @@ rcsfile_freedelta(struct delta *d)
|
||||
buf_free(d->text);
|
||||
|
||||
/* Free all subbranches of a delta. */
|
||||
/* XXX: Is this ok? Since the branchpoint is removed, there is no good
|
||||
* reason for the branch to exists, but we might still have deltas in
|
||||
* these branches.
|
||||
*/
|
||||
while (!LIST_EMPTY(&d->branchlist)) {
|
||||
b = LIST_FIRST(&d->branchlist);
|
||||
LIST_REMOVE(b, branch_next);
|
||||
@ -903,7 +891,7 @@ rcsfile_deletetag(struct rcsfile *rf, char *tag, char *revnum)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Searches the global deltalist for a delta.
|
||||
*/
|
||||
struct delta *
|
||||
@ -925,38 +913,38 @@ rcsfile_setval(struct rcsfile *rf, int field, char *val)
|
||||
size_t len;
|
||||
|
||||
switch (field) {
|
||||
case RCSFILE_HEAD:
|
||||
if (rf->head != NULL)
|
||||
free(rf->head);
|
||||
rf->head = xstrdup(val);
|
||||
case RCSFILE_HEAD:
|
||||
if (rf->head != NULL)
|
||||
free(rf->head);
|
||||
rf->head = xstrdup(val);
|
||||
break;
|
||||
case RCSFILE_BRANCH:
|
||||
if (rf->branch != NULL)
|
||||
free(rf->branch);
|
||||
rf->branch = (val == NULL) ? NULL : xstrdup(val);
|
||||
case RCSFILE_BRANCH:
|
||||
if (rf->branch != NULL)
|
||||
free(rf->branch);
|
||||
rf->branch = (val == NULL) ? NULL : xstrdup(val);
|
||||
break;
|
||||
case RCSFILE_STRICT:
|
||||
if (val != NULL)
|
||||
rf->strictlock = 1;
|
||||
case RCSFILE_STRICT:
|
||||
if (val != NULL)
|
||||
rf->strictlock = 1;
|
||||
break;
|
||||
case RCSFILE_COMMENT:
|
||||
if (rf->comment != NULL)
|
||||
free(rf->comment);
|
||||
rf->comment = xstrdup(val);
|
||||
case RCSFILE_COMMENT:
|
||||
if (rf->comment != NULL)
|
||||
free(rf->comment);
|
||||
rf->comment = xstrdup(val);
|
||||
break;
|
||||
case RCSFILE_EXPAND:
|
||||
len = strlen(val) - 1;
|
||||
val++;
|
||||
val[len - 1] = '\0';
|
||||
rf->expand = keyword_decode_expand(val);
|
||||
case RCSFILE_EXPAND:
|
||||
len = strlen(val) - 1;
|
||||
val++;
|
||||
val[len - 1] = '\0';
|
||||
rf->expand = keyword_decode_expand(val);
|
||||
break;
|
||||
case RCSFILE_DESC:
|
||||
if (rf->desc != NULL)
|
||||
free(rf->desc);
|
||||
rf->desc = xstrdup(val);
|
||||
case RCSFILE_DESC:
|
||||
if (rf->desc != NULL)
|
||||
free(rf->desc);
|
||||
rf->desc = xstrdup(val);
|
||||
break;
|
||||
default:
|
||||
lprintf(-1, "Setting invalid RCSfile value.\n");
|
||||
default:
|
||||
lprintf(-1, "Setting invalid RCSfile value.\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1123,10 +1111,9 @@ rcsfile_importdelta(struct rcsfile *rf, char *revnum, char *revdate, char *autho
|
||||
rcsfile_insertdelta(b, d, 1);
|
||||
else {
|
||||
rcsfile_insertdelta(b, d, 0);
|
||||
/*
|
||||
/*
|
||||
* On import we need to set the diffbase to our
|
||||
* branchpoint for writing out later.
|
||||
* XXX: this could perhaps be done at a better time.
|
||||
*/
|
||||
if (LIST_FIRST(&b->deltalist) == d) {
|
||||
brev = rcsrev_prefix(d->revnum);
|
||||
|
@ -613,7 +613,7 @@ updater_docoll(struct updater *up, struct file_update *fup, int isfixups)
|
||||
return (error);
|
||||
break;
|
||||
case 'I':
|
||||
/*
|
||||
/*
|
||||
* Create directory and add DirDown entry in status
|
||||
* file.
|
||||
*/
|
||||
@ -661,7 +661,7 @@ updater_docoll(struct updater *up, struct file_update *fup, int isfixups)
|
||||
}
|
||||
break;
|
||||
case 'J':
|
||||
/*
|
||||
/*
|
||||
* Set attributes of directory and update DirUp entry in
|
||||
* status file.
|
||||
*/
|
||||
@ -802,7 +802,8 @@ updater_docoll(struct updater *up, struct file_update *fup, int isfixups)
|
||||
name = proto_get_ascii(&line);
|
||||
attr = proto_get_ascii(&line);
|
||||
pos = proto_get_ascii(&line);
|
||||
if (name == NULL || attr == NULL || pos == NULL || line != NULL)
|
||||
if (name == NULL || attr == NULL || pos == NULL ||
|
||||
line != NULL)
|
||||
return (UPDATER_ERR_PROTO);
|
||||
error = fup_prepare(fup, name, 0);
|
||||
fup->temppath = tempname(fup->destpath);
|
||||
@ -1050,7 +1051,7 @@ updater_setdirattrs(struct updater *up, struct coll *coll,
|
||||
fup->temppath, fup->destpath, strerror(errno));
|
||||
return (UPDATER_ERR_MSG);
|
||||
}
|
||||
/*
|
||||
/*
|
||||
* Now, make sure they were set and record what was set in the status
|
||||
* file.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user