Fix issue #3716 ("svnrdump does not support cancellation"). Add
commitab86422104bf2da0dbaa80bfe679d25e6a44dd5c
authorC. Michael Pilato <cmpilato@collab.net>
Tue, 16 Nov 2010 20:39:08 +0000 (16 20:39 +0000)
committerC. Michael Pilato <cmpilato@collab.net>
Tue, 16 Nov 2010 20:39:08 +0000 (16 20:39 +0000)
treeb5028560305a05fbd18c9133b1d230c855bf7dce
parente76bef9d8ac001f3f7c6745fc4a97f206ff3660c
Fix issue #3716 ("svnrdump does not support cancellation").  Add
a cancellation function and signal handlers, and then use 'em.

* subversion/svnrdump/load_editor.h,
* subversion/svnrdump/load_editor.c
  (drive_dumpstream_loader): Add 'cancel_func' and 'cancel_baton'
    parameters, passed to svn_repos_parse_dumpstream2().

* subversion/svnrdump/dump_editor.h,
* subversion/svnrdump/dump_editor.c
  (get_dump_editor): Add 'cancel_func' and 'cancel_baton' parameters,
    used to wrap the returned editor in a standard cancellation editor.

* subversion/svnrdump/svnrdump.c
  (cancelled): New global variable.
  (signal_handler, check_cancel): New helper functions, copied
    wholesale from the source of our other Subversion binaries.
  (open_connection): Set ctx->cancel_func to check_cancel().
  (replay_revisions): Update call to get_dump_editor(), passing
    check_cancel() as the cancellation callback function.
  (load_revisions): Update call to drive_dumpstream_loader(), passing
    check_cancel() as the cancellation callback function.
  (main): Add the standard block of signal handler registrations used
    in all our binaries.

git-svn-id: http://svn.apache.org/repos/asf/subversion/trunk/subversion/svnrdump@1035792 13f79535-47bb-0310-9956-ffa450edef68
dump_editor.c
dump_editor.h
load_editor.c
load_editor.h
svnrdump.c