diff options
author | Ulf Lilleengen <lulf@FreeBSD.org> | 2008-12-03 22:47:33 +0000 |
---|---|---|
committer | Ulf Lilleengen <lulf@FreeBSD.org> | 2008-12-03 22:47:33 +0000 |
commit | 9178dc306f99a30c61e29cb3915d8a135c1fdc7a (patch) | |
tree | 94a6216ffa18706a29eb3a34f8497c5aae22387f /contrib/csup/updater.c | |
parent | bc1d339146a99866367947b35b05627b5d1b6677 (diff) | |
download | src-9178dc306f99a30c61e29cb3915d8a135c1fdc7a.tar.gz src-9178dc306f99a30c61e29cb3915d8a135c1fdc7a.zip |
A few bugfixes:
- Instead of including protocol info in diffs, strip them before adding
deltatext and take this into account when applying the diff later.
- Don't use strlen when the string in the RCS file may contain garbage. This got
caught in the checksumming before, but was not fixed until now. Instead of
using strlen, pass the token length when adding log and text entries to a
delta. Add an extra length parameter to duptext() to record the token length.
- When adding new branches to a file, add them in at the tail instead of the
head of the list to get correct ordering when writing out.
- Input stream when diffing was opened twice.
- Don't expand keywords in diffs between deltas.
Notes
Notes:
svn path=/projects/csup_cvsmode/; revision=185592
Diffstat (limited to 'contrib/csup/updater.c')
-rw-r--r-- | contrib/csup/updater.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/contrib/csup/updater.c b/contrib/csup/updater.c index 199b739bcd3d..ddf9261fc78a 100644 --- a/contrib/csup/updater.c +++ b/contrib/csup/updater.c @@ -1724,7 +1724,6 @@ updater_addelta(struct rcsfile *rf, struct stream *rd, char *cmdline) { struct delta *d; size_t size; - int stop; char *author, *cmd, *diffbase, *line, *logline; char *revdate, *revnum, *state, *textline; @@ -1780,15 +1779,15 @@ updater_addelta(struct rcsfile *rf, struct stream *rd, char *cmdline) break; case 'T': /* Do the same as in 'C' command. */ - stop = 0; textline = stream_getln(rd, &size); while (textline != NULL) { if (size == 2 && *textline == '.') - stop = 1; + break; if (size == 3 && memcmp(textline, ".+", 2) == 0) { /* Truncate newline. */ - stop = 1; + rcsdelta_truncatetext(d, -1); + break; } if (size >= 3 && memcmp(textline, "..", 2) == 0) { @@ -1796,8 +1795,6 @@ updater_addelta(struct rcsfile *rf, struct stream *rd, char *cmdline) textline++; } rcsdelta_appendtext(d, textline, size); - if (stop) - break; textline = stream_getln(rd, &size); } break; |