cvsps:cvsps.git
9 years agocvsclient.c: switch to binary (non-pipe mode for received files
Sergei Trofimovich [Wed, 9 Jan 2013 09:56:59 +0000 (12:56 +0300)]
cvsclient.c: switch to binary (non-pipe mode for received files

The problem:

  When text file is stored without a trailing newline
  GNU CVSNT server (on windows) refuses to
  return "ok\n" in a separate line on 'cvs -p up' command.

  In this situation 'cvsps' gets last line like "M <hello>ok\n"
  and hangs as it waits for separate "ok\n" line.

  pipe mode also does not allow importing binary files
  if client does not support 'Mbinary'.

This patch solves the problem by switching to non-pipe mode
for 'cvs update'.

In this mode every checkout is prepended by amount of bytes
in response.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
9 years agocvsps.c: speedup blob dumping by using block-size I/O
Sergei Trofimovich [Wed, 9 Jan 2013 09:56:58 +0000 (12:56 +0300)]
cvsps.c: speedup blob dumping by using block-size I/O

Patch reduces libc overhead:
  around 20% CPU time is wasted by fgetc()/putchar()
  before the patch according to perf.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
9 years agocvsclient.c: don't return trash buffer when 'E ' is returned from first 'cvs rlog...
Sergei Trofimovich [Wed, 9 Jan 2013 09:56:57 +0000 (12:56 +0300)]
cvsclient.c: don't return trash buffer when 'E ' is returned from first 'cvs rlog' entries

Found by valgrind:

    $ valgrind ./cvsps --fast-export --root $CVSROOT -p z/ --debuglvl 0xff Kernel

    cvsps: cvsclient: rlog: read E cvs rlog: Logging Kernel
    cvsps: cvs rlog: Logging Kernel
    ==27619== Conditional jump or move depends on uninitialised value(s)
    ==27619==    at 0x50938F2: vfprintf (vfprintf.c:1642)
    ==27619==    by 0x514361F: __vsnprintf_chk (vsnprintf_chk.c:63)
    ==27619==    by 0x10B7D4: vdebug (stdio2.h:77)
    ==27619==    by 0x10CFED: debug (debug.h:52)
    ==27619==    by 0x11095B: load_from_cvs (cvsps.c:338)
    ==27619==    by 0x10AA19: main (cvsps.c:197)
    ==27619==  Uninitialised value was created by a stack allocation
    ==27619==    at 0x11089F: load_from_cvs (cvsps.c:301)

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
9 years agocvsps.c: fixed argument format mismatch
Sergei Trofimovich [Wed, 9 Jan 2013 09:56:56 +0000 (12:56 +0300)]
cvsps.c: fixed argument format mismatch

cvsps.c:238:9: warning: format «%s» expects a matching «char *» argument [-Wformat]
cvsps.c:242:9: warning: format «%s» expects a matching «char *» argument [-Wformat]
cvsps.c:2955:5: warning: format «%d» expects argument of type «int», but argument 3 has type «time_t» [-Wformat]
cvsps.c:2955:5: warning: format «%d» expects argument of type «int», but argument 4 has type «time_t» [-Wformat]

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
9 years agodebug.h: mark 'printf'-alike functions as such for 'gcc'
Sergei Trofimovich [Wed, 9 Jan 2013 09:56:55 +0000 (12:56 +0300)]
debug.h: mark 'printf'-alike functions as such for 'gcc'

Allows catching format argument mismatch like those:

    cvsps.c:238:9: warning: format '%s' expects a matching 'char *' argument [-Wformat]
    cvsps.c:242:9: warning: format '%s' expects a matching 'char *' argument [-Wformat]

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
9 years agocompiler.h: add 'gcc' secific 'GCCISM' wrapper
Sergei Trofimovich [Wed, 9 Jan 2013 09:56:54 +0000 (12:56 +0300)]
compiler.h: add 'gcc' secific 'GCCISM' wrapper

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
9 years agoRevamp documentation.
Eric S. Raymond [Mon, 7 Jan 2013 12:46:13 +0000 (07:46 -0500)]
Revamp documentation.

9 years agoAdd another invocation scenario.
Eric S. Raymond [Mon, 7 Jan 2013 12:30:58 +0000 (07:30 -0500)]
Add another invocation scenario.

9 years agoDocument the change in -A.
Eric S. Raymond [Mon, 7 Jan 2013 12:22:11 +0000 (07:22 -0500)]
Document the change in -A.

9 years agoDocument runtime dependencies.
Eric S. Raymond [Mon, 7 Jan 2013 12:13:07 +0000 (07:13 -0500)]
Document runtime dependencies.

9 years agoBe quieter during the fallback.
Eric S. Raymond [Sun, 6 Jan 2013 22:04:08 +0000 (17:04 -0500)]
Be quieter during the fallback.

9 years agoTypo fix in fallback implementation.
Eric S. Raymond [Sun, 6 Jan 2013 21:52:30 +0000 (16:52 -0500)]
Typo fix in fallback implementation.

9 years agoMore whitespace trimming.
Eric S. Raymond [Sun, 6 Jan 2013 21:12:02 +0000 (16:12 -0500)]
More whitespace trimming.

9 years agoTweak the release machinery.
Eric S. Raymond [Sun, 6 Jan 2013 19:59:04 +0000 (14:59 -0500)]
Tweak the release machinery.

9 years agoVersion bump for release 3.6. 3.6
Eric S. Raymond [Sun, 6 Jan 2013 19:55:47 +0000 (14:55 -0500)]
Version bump for release 3.6.

9 years agoThe authors file doesn't traditionally require ws between shortname and '='.
Chris Rorvick [Sun, 6 Jan 2013 19:51:00 +0000 (14:51 -0500)]
The authors file doesn't traditionally require ws between shortname and '='.

9 years agoSimpler handling of the regression-time switch.
Eric S. Raymond [Sun, 6 Jan 2013 17:28:22 +0000 (12:28 -0500)]
Simpler handling of the regression-time switch.

9 years agoRefactor some tests.
Eric S. Raymond [Sun, 6 Jan 2013 15:59:48 +0000 (10:59 -0500)]
Refactor some tests.

9 years agoTypo fix.
Eric S. Raymond [Sat, 5 Jan 2013 16:00:07 +0000 (11:00 -0500)]
Typo fix.

9 years agoExtended interpretation of timezone field. C code due to Chris Rorvick.
Eric S. Raymond [Fri, 4 Jan 2013 15:14:20 +0000 (10:14 -0500)]
Extended interpretation of timezone field.  C code due to Chris Rorvick.

9 years agoDocumentation update.
Eric S. Raymond [Thu, 3 Jan 2013 21:09:36 +0000 (16:09 -0500)]
Documentation update.

9 years agoMakefile: respect standard LDFLAGS, LDLIBS and DESTDIR variables
Sergei Trofimovich [Thu, 3 Jan 2013 19:32:17 +0000 (22:32 +0300)]
Makefile: respect standard LDFLAGS, LDLIBS and DESTDIR variables

Helps distribuitions packaging software without additional work.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
9 years agoMinor correction to the debug enhancement.
Eric S. Raymond [Thu, 3 Jan 2013 06:11:49 +0000 (01:11 -0500)]
Minor correction to the debug enhancement.

9 years agoAllow --debuglvl to be hex or octal.
Chris Rorvick [Thu, 3 Jan 2013 03:52:49 +0000 (21:52 -0600)]
Allow --debuglvl to be hex or octal.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
9 years agoAdd debug level for usage.
Chris Rorvick [Thu, 3 Jan 2013 03:52:48 +0000 (21:52 -0600)]
Add debug level for usage.

Special case the usage message not to have "cvsps: " prepended to
every line.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
9 years agoFix usage message.
Chris Rorvick [Thu, 3 Jan 2013 03:52:47 +0000 (21:52 -0600)]
Fix usage message.

Debug output levels were not set until after all command line arguments
are parsed.  This caused anything output prior to this (e.g., the usage
message) to be snuffed out.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
9 years agoDocumentation polish.
Eric S. Raymond [Wed, 2 Jan 2013 22:53:17 +0000 (17:53 -0500)]
Documentation polish.

9 years agoOnly issue resets corresponding to actual marks.
Eric S. Raymond [Wed, 2 Jan 2013 21:25:21 +0000 (16:25 -0500)]
Only issue resets corresponding to actual marks.

Prevents a crash when attempting an incremental update.

9 years agoUgly fallback code for people with only cvsps-2.x
Eric S. Raymond [Wed, 2 Jan 2013 21:10:20 +0000 (16:10 -0500)]
Ugly fallback code for people with only cvsps-2.x

9 years agoVersion bump for release 3.5. 3.5
Eric S. Raymond [Wed, 2 Jan 2013 16:24:39 +0000 (11:24 -0500)]
Version bump for release 3.5.

9 years agoSave a string containing defult CVS ignore patterns, not yet used.
Eric S. Raymond [Wed, 2 Jan 2013 12:31:34 +0000 (07:31 -0500)]
Save a string containing defult CVS ignore patterns, not yet used.

9 years agoCVS keyword expansion is not necessarily suppressed.
Eric S. Raymond [Wed, 2 Jan 2013 05:15:59 +0000 (00:15 -0500)]
CVS keyword expansion is not necessarily suppressed.

9 years agoEmit cvs-revisions properties if --reposurgeon is enabled.
Eric S. Raymond [Wed, 2 Jan 2013 05:11:00 +0000 (00:11 -0500)]
Emit cvs-revisions properties if --reposurgeon is enabled.

reposurgeon-2.12 will be able to interpret these.

9 years agoRenove --test-log. All regression tests pass.
Eric S. Raymond [Tue, 1 Jan 2013 19:53:04 +0000 (14:53 -0500)]
Renove --test-log.  All regression tests pass.

9 years agoVersion bump for 3.4 release. 3.4
Eric S. Raymond [Tue, 1 Jan 2013 17:41:11 +0000 (12:41 -0500)]
Version bump for 3.4 release.

9 years agoThinko fix.
Eric S. Raymond [Tue, 1 Jan 2013 07:57:49 +0000 (02:57 -0500)]
Thinko fix.

9 years agoGive up on -m and -M.
Eric S. Raymond [Tue, 1 Jan 2013 07:55:36 +0000 (02:55 -0500)]
Give up on -m and -M.

9 years agoDocumentation polishing.
Eric S. Raymond [Tue, 1 Jan 2013 07:52:16 +0000 (02:52 -0500)]
Documentation polishing.

9 years agoFulfil a represntation on the manual page.
Eric S. Raymond [Tue, 1 Jan 2013 07:27:17 +0000 (02:27 -0500)]
Fulfil a represntation on the manual page.

9 years agoPolish documentation; check HTML rendering.
Eric S. Raymond [Mon, 31 Dec 2012 23:16:04 +0000 (18:16 -0500)]
Polish documentation; check HTML rendering.

9 years agoDocumentation improvements.
Eric S. Raymond [Mon, 31 Dec 2012 23:03:28 +0000 (18:03 -0500)]
Documentation improvements.

9 years agoFix up handing of -A option.
Eric S. Raymond [Mon, 31 Dec 2012 22:21:42 +0000 (17:21 -0500)]
Fix up handing of -A option.

9 years agoRunning git-cvsimport with cvs2git appears to work at this revision.
Eric S. Raymond [Mon, 31 Dec 2012 22:02:29 +0000 (17:02 -0500)]
Running git-cvsimport with cvs2git appears to work at this revision.

9 years agoLanguage polishing.
Eric S. Raymond [Mon, 31 Dec 2012 21:33:34 +0000 (16:33 -0500)]
Language polishing.

9 years agoImplement the side effect of -A.
Eric S. Raymond [Mon, 31 Dec 2012 21:15:21 +0000 (16:15 -0500)]
Implement the side effect of -A.

9 years agoAdd documentation.
Eric S. Raymond [Mon, 31 Dec 2012 20:59:26 +0000 (15:59 -0500)]
Add documentation.

9 years agoAnother implication of the bare option.
Eric S. Raymond [Mon, 31 Dec 2012 20:53:44 +0000 (15:53 -0500)]
Another implication of the bare option.

9 years agoQuiet down!
Eric S. Raymond [Mon, 31 Dec 2012 20:51:05 +0000 (15:51 -0500)]
Quiet down!

9 years agoCoverity cleanup - all warning fixed. All regression tests pass.
Eric S. Raymond [Mon, 31 Dec 2012 20:43:17 +0000 (15:43 -0500)]
Coverity cleanup - all warning fixed.  All regression tests pass.

9 years agopylint cleanup.
Eric S. Raymond [Mon, 31 Dec 2012 20:26:53 +0000 (15:26 -0500)]
pylint cleanup.

9 years agoDocumentation improvement.
Eric S. Raymond [Mon, 31 Dec 2012 20:01:28 +0000 (15:01 -0500)]
Documentation improvement.

9 years agoAdd the -b option to git-cvsimport.
Eric S. Raymond [Mon, 31 Dec 2012 19:40:18 +0000 (14:40 -0500)]
Add the -b option to git-cvsimport.

9 years agoRearrange option documentation for easier reference.
Eric S. Raymond [Mon, 31 Dec 2012 19:20:54 +0000 (14:20 -0500)]
Rearrange option documentation for easier reference.

9 years agoFix Makefile rules after cbtcommon/ directory removal
Dan McGee [Mon, 31 Dec 2012 18:12:29 +0000 (12:12 -0600)]
Fix Makefile rules after cbtcommon/ directory removal

Commit f62c0bc1c314b22 did a s#cbtcommon/##g to the Makefile, which
resulted in a bunch of duplicate globs in various Makefile commands.
This resulted in a really crazy tarball for 3.3 produced by the
Makefile that contained symlinks to self for all the source *.c and *.h
files.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
9 years agoBasic functionality and -R tested.
Eric S. Raymond [Mon, 31 Dec 2012 18:21:43 +0000 (13:21 -0500)]
Basic functionality and -R tested.

9 years agoTrial reimplementation of cvsimport -R. Untested.
Eric S. Raymond [Mon, 31 Dec 2012 18:00:33 +0000 (13:00 -0500)]
Trial reimplementation of cvsimport -R.  Untested.

9 years agoUse the same form "git cvsimport" as in the git tree.
Eric S. Raymond [Mon, 31 Dec 2012 17:24:44 +0000 (12:24 -0500)]
Use the same form "git cvsimport" as in the git tree.

9 years agoReimplement git-cvsimport -P
Eric S. Raymond [Mon, 31 Dec 2012 17:21:55 +0000 (12:21 -0500)]
Reimplement git-cvsimport -P

9 years agoDelete obsolete comment.
Eric S. Raymond [Mon, 31 Dec 2012 14:24:38 +0000 (09:24 -0500)]
Delete obsolete comment.

9 years agoSkip postprocessing if it's not required.
Eric S. Raymond [Mon, 31 Dec 2012 14:22:49 +0000 (09:22 -0500)]
Skip postprocessing if it's not required.

9 years agoFix up the support for incremental importing.
Eric S. Raymond [Mon, 31 Dec 2012 14:12:07 +0000 (09:12 -0500)]
Fix up the support for incremental importing.

9 years agoDocument that Unix timestamps are accepted by cvsps -d.
Eric S. Raymond [Mon, 31 Dec 2012 14:09:54 +0000 (09:09 -0500)]
Document that Unix timestamps are accepted by cvsps -d.

9 years agoIncorporate Heiko Voigt's patch making the t9603 test work.
Eric S. Raymond [Mon, 31 Dec 2012 13:13:39 +0000 (08:13 -0500)]
Incorporate Heiko Voigt's patch making the t9603 test work.

9 years agoIncorporate the t9603 test.
Eric S. Raymond [Mon, 31 Dec 2012 12:48:19 +0000 (07:48 -0500)]
Incorporate the t9603 test.

9 years agoDon't drop logfiles unless verbose is on.
Eric S. Raymond [Mon, 31 Dec 2012 11:52:07 +0000 (06:52 -0500)]
Don't drop logfiles unless verbose is on.

9 years agoFully incorporate t9602 and improve the test machinery.
Eric S. Raymond [Mon, 31 Dec 2012 11:46:13 +0000 (06:46 -0500)]
Fully incorporate t9602 and improve the test machinery.

9 years agoUpdate the incompatibility list.
Eric S. Raymond [Mon, 31 Dec 2012 05:10:46 +0000 (00:10 -0500)]
Update the incompatibility list.

9 years agoSomehow we failed to track a name change.
Eric S. Raymond [Mon, 31 Dec 2012 04:23:54 +0000 (23:23 -0500)]
Somehow we failed to track a name change.

9 years agoAdd more usage examples.
Eric S. Raymond [Mon, 31 Dec 2012 03:07:31 +0000 (22:07 -0500)]
Add more usage examples.

9 years agoA more helpful error message.
Eric S. Raymond [Mon, 31 Dec 2012 03:05:09 +0000 (22:05 -0500)]
A more helpful error message.

9 years agoGuard against a core dump.
Eric S. Raymond [Mon, 31 Dec 2012 02:05:45 +0000 (21:05 -0500)]
Guard against a core dump.

9 years agoMore informative error messages.
Eric S. Raymond [Mon, 31 Dec 2012 02:00:45 +0000 (21:00 -0500)]
More informative error messages.

9 years agoDon't forget the -k option.
Eric S. Raymond [Sun, 30 Dec 2012 19:34:05 +0000 (14:34 -0500)]
Don't forget the -k option.

9 years agoExperimental multi-engine code for git-cvsimport.py.
Eric S. Raymond [Sun, 30 Dec 2012 18:56:07 +0000 (13:56 -0500)]
Experimental multi-engine code for git-cvsimport.py.

9 years agoAdd a test which proves that one of the previously-documented bugs is dead.
Eric S. Raymond [Sun, 30 Dec 2012 17:35:03 +0000 (12:35 -0500)]
Add a test which proves that one of the previously-documented bugs is dead.

9 years agoMore debris cleanup.
Eric S. Raymond [Sun, 30 Dec 2012 16:56:57 +0000 (11:56 -0500)]
More debris cleanup.

9 years agoa2x seems to leave some debris behind when it makes HTML.
Eric S. Raymond [Sun, 30 Dec 2012 16:54:09 +0000 (11:54 -0500)]
a2x seems to leave some debris behind when it makes HTML.

9 years agoMetadata update.
Eric S. Raymond [Sun, 30 Dec 2012 16:50:34 +0000 (11:50 -0500)]
Metadata update.

9 years agoVersion bump for 3.3 release. 3.3
Eric S. Raymond [Sun, 30 Dec 2012 16:43:50 +0000 (11:43 -0500)]
Version bump for 3.3 release.

9 years agoThe basic.repo test shows that the bug referenced here wasn't in cvsps.
Eric S. Raymond [Sun, 30 Dec 2012 16:38:08 +0000 (11:38 -0500)]
The basic.repo test shows that the bug referenced here wasn't in cvsps.

If it were, basic.chk would have a fileop for 'superfluous' on samplebranch.
The bug must have been in the existing wrapper script.

9 years agoFix branch detection in the basic.repo test.
Eric S. Raymond [Sun, 30 Dec 2012 16:26:50 +0000 (11:26 -0500)]
Fix branch detection in the basic.repo test.

I'm a little suspicious about this one, though.  It seems too easy.  The
previois version to the line didn't make amy sense - attaching the
pre-revision branch children to the post-revision list???  This was
either a bonehead error or a piece of subtle magic I don't understand.
I hope it was the former...

9 years agoComment fix. All regression tests pass.
Eric S. Raymond [Sun, 30 Dec 2012 16:12:53 +0000 (11:12 -0500)]
Comment fix. All regression tests pass.

9 years agoExplanatory comment.
Eric S. Raymond [Sun, 30 Dec 2012 15:50:25 +0000 (10:50 -0500)]
Explanatory comment.

9 years agoComment polishing.
Eric S. Raymond [Sun, 30 Dec 2012 15:40:51 +0000 (10:40 -0500)]
Comment polishing.

9 years agoFor code readability, imitate Pyton iterators in C.
Eric S. Raymond [Sat, 29 Dec 2012 13:46:20 +0000 (08:46 -0500)]
For code readability, imitate Pyton iterators in C.

All regression tests pass.

9 years agoUse the debug-message API as the author intended.
Eric S. Raymond [Sat, 29 Dec 2012 05:01:04 +0000 (00:01 -0500)]
Use the debug-message API as the author intended.

9 years agoThis version of the basic test load exposes a bug in branch detection.
Eric S. Raymond [Sat, 29 Dec 2012 04:49:29 +0000 (23:49 -0500)]
This version of the basic test load exposes a bug in branch detection.

9 years agoRefactor the wrapper script for multi-engine operation.
Eric S. Raymond [Fri, 28 Dec 2012 21:22:37 +0000 (16:22 -0500)]
Refactor the wrapper script for multi-engine operation.

9 years agoFix a bug in the -s implementation.
Eric S. Raymond [Fri, 28 Dec 2012 19:31:52 +0000 (14:31 -0500)]
Fix a bug in the -s implementation.

9 years agoIt would be nice if we got deletion right.
Eric S. Raymond [Fri, 28 Dec 2012 18:40:56 +0000 (13:40 -0500)]
It would be nice if we got deletion right.

9 years agoQuieter test success.
Eric S. Raymond [Fri, 28 Dec 2012 17:23:50 +0000 (12:23 -0500)]
Quieter test success.

9 years agoUpdate documentation and enable useful wrnings.
Eric S. Raymond [Fri, 28 Dec 2012 17:16:20 +0000 (12:16 -0500)]
Update documentation and enable useful wrnings.

9 years agoparsecvs is seriously broken.
Eric S. Raymond [Fri, 28 Dec 2012 16:53:42 +0000 (11:53 -0500)]
parsecvs is seriously broken.

9 years agoRename the test-support module to reflect greater generality.
Eric S. Raymond [Fri, 28 Dec 2012 15:28:30 +0000 (10:28 -0500)]
Rename the test-support module to reflect greater generality.

9 years agoImplement the -k option.
Eric S. Raymond [Fri, 28 Dec 2012 14:39:14 +0000 (09:39 -0500)]
Implement the -k option.

9 years agoReorder options for readability. All regression tests pass.
Eric S. Raymond [Fri, 28 Dec 2012 14:22:12 +0000 (09:22 -0500)]
Reorder options for readability.  All regression tests pass.

9 years agoMore usefuul error message.
Eric S. Raymond [Fri, 28 Dec 2012 14:02:31 +0000 (09:02 -0500)]
More usefuul error message.

9 years agoDead code removal. All regression tests pass.
Eric S. Raymond [Fri, 28 Dec 2012 13:54:03 +0000 (08:54 -0500)]
Dead code removal.  All regression tests pass.

9 years agoWe can enumerate unresolved symbols now.
Eric S. Raymond [Fri, 28 Dec 2012 13:49:05 +0000 (08:49 -0500)]
We can enumerate unresolved symbols now.

9 years agoAdd useful debug messages.
Eric S. Raymond [Thu, 27 Dec 2012 23:53:59 +0000 (18:53 -0500)]
Add useful debug messages.