Age | Commit message (Collapse) | Author | Files |
|
|
|
|
|
|
|
|
|
Destination directory is "foreign" if it is not a checkout (clone) of
the VCS that invoked a hook trying to update it. By default, encountering
such directory aborts the update with the corresponding error message.
This handling can be changed by setting the foreign-dir-mode configuration
setting to one of the following values:
error bail out; this is the default
remove remove the offending directory and check it out from the
VCS.
rename rename the offending directory and proceed with the checkout.
archive archive the offending directory, remove it and then proceed
with the checkout.
* src/Makefile.am: Add new sources.
* src/checkdir.c: New file.
* src/rmhier.c: New file.
* src/config.c (cb_syslog_facility): "none" disables syslog.
(vcsync_config_kw, vcsync_kw): New keywords: foreign-dir-mode,
archive-command.
(config_finish): Require that archive-command be set if
foreign-dir-mode is "archive".
* src/cvs.c (cvs_proc): Rewrite using check_output_dir.
(cvs_dir_ok): New function.
* src/git.c (git_proc): Rewrite using check_output_dir.
(git_dir_ok): New function.
* src/svn.c (svn_proc): Rewrite using check_output_dir.
(svn_dir_ok): New function.
* src/vcsync.c (vcs_tab): Change definition.
(vcs_proc_get): Replace with vcs_defn_get. All uses changed.
(vcsync_check_sentinel): Removed.
* src/vcsync.h (vcs_defn): New struct.
(vcsync_config): Replace proc with vcs; all uses changed.
(vcsync_config): New fields: foreign_dir_mode, archive_command.
(vcs_defn_get, cvs_dir_ok, svn_dir_ok, git_dir_ok): New protos.
(VCSYNC_MODE): New data type.
(FOREIGN_DIR_ERROR, FOREIGN_DIR_REMOVE)
(FOREIGN_DIR_RENAME, FOREIGN_DIR_ARCHIVE): New constants.
(remove_hier, check_output_dir): New protos.
* tests/Makefile.am: Add new tests.
* tests/testsuite.at: Add new tests.
* tests/cvsfor.at: New test.
* tests/gitfor.at: New test.
* tests/svnfor.at: New test.
|
|
|
|
|
|
|
|
* src/config.c: New statement: sentinel.
* src/cvs.c (cvs_proc): Call vcsync_check_sentinel.
* src/git.c (git_proc): Likewise.
* src/svn.c (svn_proc): Likewise.
* src/vcsync.c (vcsync_check_sentinel): New function.
* src/vcsync.h (vcsync_config): New member: sentinel_file.
(vcsync_check_sentinel): New proto.
* tests/Makefile.am: Add new tests.
* tests/testsuite.at: Likewise.
* tests/cvssent.at: New test.
* tests/gitsent.at: New test.
* tests/svnsent.at: New test.
* README: Add pointers to the documentation.
* doc/Makefile.am: Build texinfo docs.
* doc/gendocs.pl: New file.
* doc/grecs-syntax.texi: New file.
* doc/otherdoc.texi: New file.
* doc/vcsync.8: Add the NOTE section.
* doc/vcsync.conf.5: Likewise.
* doc/vcsync.texi: Complete documentation.
* doc/webdoc.init: New file.
* doc/otherdoc.texi.in: New file.
|
|
|
|
|
|
* runcap: Upgrade.
* src/runcmd.c: Disable unneeded capturing.
|
|
* .gitmodules (runcap): New submodule.
* Makefile.am: Incorporate runcap.
* src/Makefile.am: Likewise.
* src/runcmd.c: Rewrite using runcap.
* src/git.c: Use new runcmd functions.
* src/svn.c: Likewise.
* src/vcsync.c: Remove unneded call to sigsetup.
* src/vcsync.h: Update.
* NEWS: Update.
* configure.ac: Version 1.1.90
|
|
|
|
* src/config.c: Use grecs assertion functions instead of local
wrappers.
(config_finish): If vcs_type is specified, try to select a matching
named configuration first, even if the default one has the vcs-type
statement.
|
|
* src/checkoutrc.c: Ignore internal VCS directories
* src/config.c: Dont issue debug messages before logging is set up.
* src/vcsync.c (main): Print diagnostic message about VCS type and
configuration name.
* tests/checkoutrc-rec.at: Fix expected stderr.
* tests/checkoutrc.at: Likewise.
|
|
* src/onfig.c (config_finish): Select named configuration based on
vcs_type, if given
|
|
* src/config.c (vcsync_config_free): Remove unused function.
(cb_config): Make sure config is not NULL.
|
|
|
|
|
|
If vcsync binary is symlinked to the hooks subdirectory of a git or
svn repository, it will detect the fact and will assume the corresponding
VCS flavor (unless explicitly told otherwise). In this case the first
named configuration that has the matching VCS type will be used.
* src/config.c (cb_vcs_type): Set both vcs_type and proc.
(cb_config): Build a singly-linked list of configurations.
(vcsync_config_kw,vcsync_kw): Pass a pointer to struct
vcsync_config.
(config_finish): If vcs_type is not set, try to detect what VCS
is used.
* src/diag.c (fullprogname): New global.
(setprogname): Set fullprogname.
* src/git.c (get_cwd): Move to vcsync.c
* src/vcsync.c (parsefilename,string_suffix)
(get_cwd,guess_vcs_type): New functions.
* src/vcsync.h (fullprogname): New extern.
(vcs_type): Remove const qualifier.
(parsefilename,string_suffix)
(get_cwd,guess_vcs_type,vdiag): New protos.
* src/checkoutrc.c: Shut up gcc warning.
* src/runcmd.c: Likewise.
* src/svn.c: Likewise.
* tests/checkoutrc-rec.at: Account for additional debug message.
* tests/checkoutrc.at: Likewise.
* tests/cvscom00.at: Account for eventual debug messages.
* tests/cvscom01.at: Likewise.
* tests/cvscom02.at: Likewise.
* tests/cvscom03.at: Likewise.
* tests/cvscom04.at: Likewise.
* tests/cvsimp.at: Likewise.
* tests/cvsimp01.at: Likewise.
* tests/gitimp.at: Likewise.
* tests/gitimp01.at: Likewise.
* tests/gitpush00.at: Likewise.
* tests/gitpush01.at: Likewise.
* tests/gitpush02.at: Likewise.
* tests/gitpush03.at: Likewise.
* tests/namedconf00.at: Likewise.
* tests/svncom00.at: Likewise.
* tests/svncom01.at: Likewise.
* tests/svncom02.at: Likewise.
* tests/svncom03.at: Likewise.
* tests/svncom04.at: Likewise.
* tests/svnimp.at: Likewise.
* tests/svnimp01.at: Likewise.
|
|
* tests/svncom00.at: Fix typo.
* tests/svncom01.at: Likewise.
* tests/svncom02.at: Likewise.
* tests/svncom03.at: Likewise.
* tests/svncom04.at: Likewise.
* tests/testsuite.at (AT_NONROOT_PREREQ): New macro.
(AT_VCS_PREREQ): Use AT_NONROOT_PREREQ for CVS.
|
|
Take into account version differences in CVS and GIT
* tests/atlocal.in (CVS_FORMAT): New variable.
* tests/testsuite.at (CVS_REPO_INIT): Use CVS_FORMAT when forming
template string.
(GIT_COM_INIT): Set user.email and user.name.
|
|
|
|
|
|
|
|
* src/cvs.c (cvs_proc): Drain input as recommended by the
CVS docs.
Handle multiple arguments.
* src/vcsync.c (main): Don't close descriptors when forking.
* doc/vcsync.8: Update.
|
|
* src/checkoutrc.c (post_socket_send): New function.
(flush_checkoutrc_files): Call post_socket_send
* src/config.c: New statements post-sync-socket and post-sync-tag.
* src/vcsync.h (vcsync_sockaddr): New struct.
(vcsync_config) <post_sync_socket>
<post_sync_tag>: New members.
|
|
* doc/vcsync.conf.5: Update.
* src/checkoutrc.c (access_file_name)
(access_file_text): New globals.
(open_htaccess): Write access_file_text to the newly created file.
(write_htaccess,kwf_unlink): Use access_file_name instead of the
hardcoded HTACCESS_FILE.
(checkoutrc): Likewise.
Initialize access_file_name, if it is not defined.
* src/config.c: New statements access-file-name and
access-file-text
* src/vcsync.h (access_file_name,access_file_text): New externs.
* tests/checkoutrc.at: Test access-file-text.
|
|
* src/checkoutrc.c (kwf_unlink): Use lstat.
|
|
* Makefile.am: Add distuninstallcheck_listfiles.
* src/Makefile.am (EXTRA_DIST): Add vcsync.conf
(install-data-local): New rule.
* src/vcsync.conf: New file.
* src/checkoutrc.c (kwtab): Set fixed size. Remove all verbatim and
text keywords. These should be defined in the configuration file.
* src/config.c: New statement "define".
* src/vcsync.h (MAX_CHECKOUTRC_KW): New define.
* tests/atlocal.in (DFL_VCSYNC_CONF): New variable.
* tests/checkoutrc-rec.at: Use ../src/vcsync.conf
* tests/checkoutrc.at: Likewise.
* tests/testsuite.at: Include src/vcsync.conf in all configuration
files.
* doc/vcsync.8: Update.
* doc/vcsync.conf.5: Document the "define" statement.
|
|
|
|
* doc/vcsync.texi: Update.
* src/checkoutrc.c (kwf_link): Always try unlinking the target file.
(kwf_chmod): Take one or more file arguments. Allow for wildcards.
(flush_checkoutrc_files): Don't check for presence of checkoutrc
file, register the directory anyway (to make sure it is descended
into).
* src/cvs.c (split_arg): Fix return value.
* src/vcsync.c (main): Print message on the stderr.
* tests/cvsimp.at: Use CVS_COM_INIT macro.
|
|
* src/checkoutrc.c (write_htaccess): Create a copy of ap for
debugging purposes.
|
|
|
|
|
|
|
|
* src/cvs.c (cvs_proc): Change diag to debug.
* tests/testsuite.at: Set debug statement from the
VCSYNC_TESTSUITE_DEBUG environment variable.
|
|
|
|
|
|
* src/cmdline.opt: Group options by functionality in the help
output.
New options: --vcs-type, --detach, --sleep.
* src/config.c: Take into account new options.
* src/vcsync.c (sleep_option,detach_option)
(vcs_type): New variables.
* src/vcsync.h (sleep_option,detach_option)
(vcs_type): New protos.
|
|
|
|
|
|
* src/cvs.c (cvs_proc): Return directory under dist_root to change to.
* src/git.c (git_proc): Likewise.
* src/svn.c (svn_proc): Likewise.
* src/doinstrc.c (doinstrc): Take root dir as first argument.
Build all paths by concatenating dest_root, root_dir, directory
and the file in question. If root_dir is NULL, it is ignored.
(flush_doinstrc_files): Take root dir as first argument.
* src/vcsync.c (main): Pass return value from config->proc to
flush_doinstrc_files.
* src/vcsync.h (vcs_proc_fn): Return char *.
(cvs_proc, svn_proc, git_proc): Change prototype accordingly.
* tests/Makefile.am: Add new files.
* tests/testsuite.at: Include new testcases.
(CVS_REPO_INIT,SVN_REPO_INIT)
(GIT_REPO_INIT): Take optional argument.
* tests/cvscom03.at: New file.
* tests/cvscom04.at: New file.
* tests/cvsimp01.at: New file.
* tests/gitimp01.at: New file.
* tests/gitpush03.at: New file.
* tests/svncom03.at: New file.
* tests/svncom04.at: New file.
* tests/svnimp01.at: New file.
* tests/doinstrc-rec.at: Fix keywords.
* tests/doinstrc.at: Likewise.
|
|
|
|
|
|
* src/cmdline.opt: Remove the --repository-root (-R) option.
* src/config.c: Remove the repository-root statement.
* src/cvs.c (cvs_proc): Get the repository path from the CVSROOT envar.
* src/vcsync.c (repository_root,repo_name): Remove.
* src/vcsync.h (repository_root,repo_name): Remove.
(vcsync_config)<repo_root>: Remove.
* tests/cvsimp.at: Reflect the changes.
* tests/doinstrc-rec.at: Likewise.
* tests/doinstrc.at: Likewise.
* tests/namedconf00.at: Likewise.
* tests/testsuite.at: Likewise.
* doc/vcsync.texi: Update.
|
|
* src/Makefile.am (vcsync_SOURCES): Add git.c
* src/git.c: New file.
* src/runcmd.c (runcmd): Use /dev/null for stdin.
* src/vcsync.c (vcs_tab): Add entry for git.
* src/vcsync.h (git_proc): New proto.
* tests/gitimp.at: New file.
* tests/gitpush00.at: New file.
* tests/gitpush01.at: New file.
* tests/gitpush02.at: New file.
* tests/Makefile.am: Add new files.
* tests/testsuite.at: Likewise.
* tests/cvscom01.at: Minor change.
|
|
|
|
|