Commit Graph

41 Commits

Author SHA1 Message Date
lulf
a6bcdcc2b6 - Add proper error checking and printing to the CVSMode code when reading and
writing from/to streams, as leaving them out stops csup from cleaning up on
  SIGINT and friends properly.

MFC after:      1 week
2009-03-25 20:15:48 +00:00
lulf
ad7291d1d2 - Remember to set umask before setting attributes of RCS file.
Tested by:	dougb
MFC after:	2 days
2009-03-25 07:01:45 +00:00
lulf
ab7611c432 - Try to handle rcsfile write failures in the same way as cvsup, as they are not
necessarily fatal. If the file was incorrectly written, the checksum will
  detect it and the file will be retransferred.
2009-03-06 20:17:16 +00:00
lulf
9af3f80126 - Do not free the pattern lists immediately after use, as they might be needed
again in case the connection is interrupted and csup have to reconnect. The
  lists will be freed after the collection has been completely processed.

PR:		bin/131477
Tested by:	dchagin
2009-02-15 13:22:21 +00:00
lulf
7174fcbb48 - Fix an issue where file attributes were not installed correctly during a Touch
and SetAttrs operation.
- SetAttrs and Touch were incorrectly switched.
2009-02-09 20:13:55 +00:00
lulf
ef24bb1a20 - Update manpage now that cvs mode is supported. 2009-01-07 18:37:07 +00:00
lulf
760895aea1 - Sort children branches by revision number rather than by date since a few RCS
files have the wrong date.
2009-01-04 18:18:59 +00:00
lulf
dc75d3e533 - Update copyright. 2009-01-04 17:31:01 +00:00
lulf
a15ea1e8c6 - Try to match style(9).
- Remove old comments.
2009-01-04 17:26:59 +00:00
lulf
60951a07c9 - Use a LIST to hold branches instead of a STAILQ.
- Sort branches when inserting them.
2009-01-03 18:51:49 +00:00
lulf
6bc677840c - Write out branches with the highest revision number first if they have the
same date.
2009-01-03 15:17:20 +00:00
lulf
94a4b6019d - A bit missing from the previous commit. The '@'s from the string token must be
stripped before encoding the expansion mode.
2009-01-03 12:09:18 +00:00
lulf
f67ab72faf - Add an optimization when parsing rcsfiles when the intention is to only send
details to the cvsup server. The deltatext does not need parsing, and some
  parts of the rcsfile data structure doesn't need to be set up.
- Fix a bug where the RCS expansion mode is not written out.
2009-01-02 12:40:58 +00:00
lulf
fd8c0b9c3a - Disable rsync support for now, as it is not fully working. 2009-01-02 12:37:31 +00:00
lulf
9b87fcddf8 - Fattrs are not used for rsync, so remove unused code. 2009-01-02 12:36:59 +00:00
lulf
f4ac6e7305 - Check for NULL in case fattr_frompath fails. 2009-01-02 12:35:01 +00:00
lulf
306c871b2f - Fix a wrong flag check. 2008-12-21 14:04:10 +00:00
lulf
59150ced5d - Add missing printout information when appending file.
Submitted by:	naddy
2008-12-10 18:13:30 +00:00
lulf
7cbf8f4f95 - Check return value of the encoded keyword before using it.
Pointed out by:	Christian Weisgerber <naddy -at- mips.inka.de>
2008-12-09 21:10:09 +00:00
lulf
338234a6b0 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.
2008-12-03 22:47:33 +00:00
lulf
e7eb22f786 - Print out information about what file that is edited before it is edited
instead of after.
2008-12-02 20:50:37 +00:00
lulf
93999cbca6 - Fix a bug where deltas was not sorted on RCS dates _and_ revision number. 2008-12-02 20:48:45 +00:00
lulf
7f6c5eb21e - Fix a bug in csup where SKIP is not obeyed when sending collection
information.
2008-11-26 19:27:51 +00:00
lulf
129cc6ad3e - Make sure comparisons are done on file types as well.
- Handle the case where a repository may have been copied, and the symlinks have
  not been preserved. CVSup removes the files and creates the symlinks, so
  enable this behaviour in csup as well.
- While there, fix comments and style issues.
2008-11-23 16:44:49 +00:00
lulf
01924560e7 - Add support for reading RCS info from status file to avoid having to detail a
file if it is up to date.
2008-11-23 14:53:21 +00:00
lulf
e73e056aab - Refactor some parts of the code and increase code reuse.
- Fix a lot of style issues remaining and old debugging output.
- Update comments where needed.
2008-11-20 19:51:06 +00:00
lulf
afd3a2cc89 - Add support for 'X' and 'x' commands in CVSup protocol. These commands are not
often used, but were quite simple to implement anyway.
2008-11-20 13:39:14 +00:00
lulf
a2a32c1acd - Fix build with GNU make.
- Fix compiler warnings and symbol overlaps.
- Don't build code that is not used yet.
- Fix types and format strings.
2008-11-20 12:52:07 +00:00
lulf
fb66787b9a - Fix issues that prevented rsync support from working. 2008-11-20 12:23:44 +00:00
lulf
b389e1bc70 A few general bugfixes:
- Use internal xmalloc instead of malloc.
- Include missing header after warnings.
- Fix unneeded printouts.
- Fix a bug when checking the CO_NORSYNC flag.
2008-11-19 14:57:00 +00:00
lulf
49d71b6584 - Fixup the rcs revision comparing to be correct this time. 2008-11-19 14:53:20 +00:00
lulf
5de5584baa - Fix idiotic rcsnum_cmp and compare the revision numbers without allocating any
memory.
2008-11-12 14:29:24 +00:00
lulf
6ce0f78fdf - Implement rsync support in csup, which is chosen as a protocol for regular
files if the client supports it. The support is implemented with an API to
  operate on files, calculating the rolling checksum and md5 checksum for the
  blocks etc.
- Remove unneeded stream_filter_stop and stream_flush before stream_close.
2008-10-25 10:54:28 +00:00
lulf
819cd9f881 - Implement support for retrieving a size_t type from the protocol stream. 2008-10-25 10:52:22 +00:00
lulf
0f6475d2a0 - Add size_t format specifier to proto_printf. 2008-10-25 10:23:24 +00:00
lulf
811088f018 - Import csup work from p4. 2008-10-19 09:08:59 +00:00
jb
dbe9cce999 Fix a compiler warning. 2007-11-18 00:25:18 +00:00
mux
da760f9b40 Fix a typo that caused the #undef directive to not actually undefine
the correct symbol, thus causing a warning with GCC 4.2.0.  Committed
into the vendor branch since this is already in the csup repository.

Reported by:	kan (ages ago)
2007-05-19 13:55:01 +00:00
mux
9062cc29a7 Import the latest snapshot of csup (20060313). 2006-03-14 03:51:13 +00:00
mux
dcd260f191 Import today's csup sources to get the warning fix for queue.h. We
probably want to do something similar in sys/queue.h; it's bad to have
STAILQ_LAST() generate GCC warnings.
2006-03-03 18:45:12 +00:00
mux
eee3ac1bf0 Initial import of csup. 2006-03-03 04:11:29 +00:00