diff options
-rw-r--r-- | HACKING | 21 | ||||
-rw-r--r-- | Makefile.in | 34 | ||||
-rw-r--r-- | README | 22 | ||||
-rw-r--r-- | wrapper/Makefile.in | 26 | ||||
-rw-r--r-- | wrapper/TODO | 4 | ||||
-rw-r--r-- | wrapper/runcom.c (renamed from wrapper/rvs.c) | 7 | ||||
-rw-r--r-- | wrapper/rvs.sh (renamed from rvs.sh) | 58 |
7 files changed, 72 insertions, 100 deletions
@@ -1,10 +1,9 @@ #!/bin/more -////////////////////////////////////////////////////////////////////// - rvs 0.7.0 - retroactive versioning system - a versioning system that allows you to check - in commit 2 before commit 1 -////////////////////////////////////////////////////////////////////// + + Version 0.8c reimplements the wrapper in C, to allow better + cooperation betweem plugins via dependancies. This probably makes + a lot of this document out-dated, but a lot of it is still good, it + describes the workings of the plugins, and the repo structure. I know this file is long* and boring. I try to keep it preened and informative, but would rather spend my time actually hacking. If @@ -12,6 +11,14 @@ * at 200+ lines, it's longer than any rvs source file +- - -cut-here- - 8< - - - - - - - - - - - - - - - - - - - - - - - - - +////////////////////////////////////////////////////////////////////// + rvs 0.7.0 + retroactive versioning system + a versioning system that allows you to check + in commit 2 before commit 1 +////////////////////////////////////////////////////////////////////// + hacking build basics @@ -282,7 +289,7 @@ Only until rvs becomes self-hosting. If anyone needs any help, let me know, either via email, or via - Launchpad, I'll be happy to help! + Launchpad, I'll be happy to help/would love to have your help! ~ Luke Shumaker <LukeShu@sbcglobal.net> Happy Hacking! diff --git a/Makefile.in b/Makefile.in index bef0841..e72005a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -54,19 +54,18 @@ uninstall-plugins = $(addprefix uninstall-p-,$(plugins)) clean-plugins = $(addprefix clean-p-,$(plugins)) distclean-plugins = $(addprefix distclean-p-,$(plugins)) dist-plugins = $(addprefix dist-p-,$(plugins)) - +$(info $(build-plugins)) # phony targets #################################################### -all : $(rvs) $(build-plugins) -.PHONY : install uninstall clean distclean dist libexec $(build-plugins) $(rvs)\ -$(install-plugins) $(uninstall-plugins) $(clean-plugins) $(distclean-plugins) \ - install-$(rvs) uninstall-$(rvs) clean-$(rvs) distclean-$(rvs) \ -$(dist-plugins) \ - dist-$(rvs) +all : wrapper $(build-plugins) +.PHONY : install uninstall clean distclean dist libexec \ + build-wrapper install-wrapper uninstall-wrapper clean-wrapper distclean-wrapper dist-wrapper +#$(build-plugins) $(install-plugins) $(uninstall-plugins) $(clean-plugins) $(distclean-plugins) $(dist-plugins) + .SUFFIXES : # install ########################################################## -install : install-$(rvs) libexec $(install-plugins) +install : install-wrapper libexec $(install-plugins) # $(libexecdir)/rvs/* libexec : $(libexecdir)/$(rvs)/plugins @@ -81,9 +80,9 @@ uninstall : # clean ############################################################ -clean : $(clean-plugins) clean-$(rvs) +clean : $(clean-plugins) clean-wrapper -distclean : clean $(distclean-plugins) distclean-$(rvs) +distclean : clean $(distclean-plugins) distclean-wrapper $(RM) Makefile # dist ############################################################# @@ -100,14 +99,15 @@ $(d) : distclean # wrapper ########################################################## -$(rvs) : wrapper/ wrapper/Makefile; $(MAKE) -C $< -uninstall-$(rvs) : wrapper/ wrapper/Makefile; $(MAKE) -C $< uninstall -clean-$(rvs) : wrapper/ wrapper/Makefile; $(MAKE) -C $< clean -distclean-$(rvs) : wrapper/ wrapper/Makefile; $(MAKE) -C $< distclean -dist-$(rvs) : wrapper/ wrapper/Makefile; $(MAKE) -C $< dist +wrapper : build-wrapper +build-wrapper : wrapper/ wrapper/Makefile; $(MAKE) -C $< +uninstall-wrapper : wrapper/ wrapper/Makefile; $(MAKE) -C $< uninstall +clean-wrapper : wrapper/ wrapper/Makefile; $(MAKE) -C $< clean +distclean-wrapper : wrapper/ wrapper/Makefile; $(MAKE) -C $< distclean +dist-wrapper : wrapper/ wrapper/Makefile; $(MAKE) -C $< dist -install-$(rvs) : wrapper/ wrapper/Makefile $(rvs); $(MAKE) -C $< install -$(RVS) : install-$(rvs) +install-wrapper : wrapper/ wrapper/Makefile wrapper; $(MAKE) -C $< install +$(RVS) : install-wrapper # plugins ########################################################## @@ -1,6 +1,6 @@ #!/bin/more ////////////////////////////////////////////////////////////////////// - rvs 0.6.3 + rvs 0.8c r54 retroactive versioning system a versioning system that allows you to check in commit 2 before commit 1 @@ -8,10 +8,6 @@ introduction - The name is a little bit of a nod to RCS (revision control - system), and even less to CVS. I'm not particularly fond of CVS, - but recognize it's impact on the scm scene. - rvs is about being able to go back and edit *anything* that has already been committed. Yes, some other SCMs do this, but fuck things proper if someone else has a copy of the old version. @@ -25,13 +21,13 @@ introduction system requirements Pretty much any *nix system should be able to run rvs. If you - need to use a shell other than GNU bash, run ./configure with + need to use a shell other than /bin/sh, run ./configure with the --SHELL=YOUR_SHELL option. rvs is not designed for Windows, but should be able to run in bash if you have some *nix pack installed. - To my knowledge, this is the absolute requirements (all need to - be in your PATH): + To my knowledge, this is the absolute requirements (all but the + shell need to be in your PATH): * a POSIX shell (tested with dash, and GNU BASH) * cat (included in GNU Core Utils) * cp (included in GNU Core Utils) @@ -53,10 +49,8 @@ building # make install It's generally considered good practice to build in another - directory than the source directory. This is not nescessary in - rvs , all the created file are put in another directory anyway. - If you would still like to do this, it can be done in rvs-0.6.1 - and up. + directory than the source directory. If you would still like to do + this, it can be done in rvs-0.6.1 and up. Configuration @@ -69,7 +63,9 @@ building name='rvs' The name of the program. Note that unlike most variables, you should NOT call this in Makefiles - (`$(name)'), but use $(rvs) instead. + (`$(name)'), but use `$(rvs)'s instead. + CC='gcc' + The C language compiler to use. RVS='$(bindir)/$(rvs)' Where the exectuable will be. `$(rvs)' is the same as `$(name)' (see above) diff --git a/wrapper/Makefile.in b/wrapper/Makefile.in index 85f56f7..a6eef15 100644 --- a/wrapper/Makefile.in +++ b/wrapper/Makefile.in @@ -31,6 +31,7 @@ dirs = $(srcdir) $(prefix) $(exec_prefix) $(bindir) $(sbindir) $(libexecdir)/ #export srcdir prefix exec_prefix bindir sbindir libexecdir # programs ######################################################### +CC = @CC@ RVS ?= @RVS@ SHELL ?= @SHELL@ RM ?= rm @@ -43,19 +44,36 @@ INSTALL_DATA ?= $(INSTALL) -m 644 TOUCH ?= touch # This file doesn't use touch #export RVS SHELL RM CP SED INSTALL MKDIR INSTALL_PROGRAM INSTALL_DATA TOUCH +CFLAGS = -DLIBEXECDIR=\"$(libexecdir)\" -DPLUGIN_CONF=\"plugin.conf\" + # phony targets #################################################### -all : rvs -.PHONY : install uninstall clean distclean dist +all : rvs runcom +.PHONY : install uninstall clean distclean dist install-runcom .SUFFIXES : .c .o VPATH = $(srcdir)/wrapper # most everything ################################################## -install : $(RVS) -$(RVS) : rvs $(bindir) +RUNCOM = $(libexecdir)/$(rvs)/runcom +install : $(RVS) $(RUNCOM) +$(RVS) : rvs $(dir $(RVS)) + $(INSTALL_PROGRAM) $< $@ + +$(RUNCOM): runcom $(dir $(RUNCOM)) + $(INSTALL_PROGRAM) $< $@ + +b := @ +# build shell scripts +rvs : rvs.sh $(INSTALL_PROGRAM) $< $@ + $(SED) -i \ + -e 's/$bSHELL@/$(subst /,\/,$(SHELL))/g' \ + -e 's/$bname@/$(rvs)/g' \ + -e 's/$blibexecdir@/$(subst /,\/,$(libexecdir))/g' \ + $@ uninstall : $(RM) $(RVS) + $(RM) $(libexecdir)/$(rvs)/runcom clean : diff --git a/wrapper/TODO b/wrapper/TODO index 577c252..6d1bd2a 100644 --- a/wrapper/TODO +++ b/wrapper/TODO @@ -1,6 +1,8 @@ #! /bin/more -plugin-load.h: +* add propper option handling via GNU getopt +* actually launch the plugins +* plugin-load.h: The function `load_plugins' must loop through sub-directories in the directory `libexecdir'. They way it does this is an ugly kludge, and should be rewritten. diff --git a/wrapper/rvs.c b/wrapper/runcom.c index 4f2fa1b..f581a45 100644 --- a/wrapper/rvs.c +++ b/wrapper/runcom.c @@ -26,8 +26,8 @@ const char *ver="0.8c"; #include "plugin-find.h" #include "plugin-depend.h" -const char *libexecdir="./plugins"; -const char *plugin_conf="plugin.conf"; +const char *libexecdir=LIBEXECDIR; +const char *plugin_conf=PLUGIN_CONF; int main ( int argc, char *argv[] ) @@ -45,3 +45,6 @@ main ( int argc, char *argv[] ) return 0; } +/* Copy/Paste Virus 1.3c Please copy and paste this text anywhere. Track *\ +\* its progress by searching for this MD5#f7eac285ebfe21c4587bfebb9582f90d */ + @@ -1,6 +1,6 @@ #!@SHELL@ name='@name@' -ver='0.7.3' +ver='0.8c' # Copyright (C) 2009 Luke Shumaker # # This file is part of rvs. @@ -85,59 +85,6 @@ _uninstall() { rm -rf "$libexecdir/$id" } -_treebranch() { - branch="$1" - for com in "$branch"; do - var="r_$com" - if [ -z "\$$var" ]; then - exec r$var="`$libexecdir/$com $param`" - var="_$com" - _treebranch "\$$var" - else - _error "plugin dependancy loop detected" - fi - done -} - -_runcom() { - com="$1" - tmp_mast="`tempfile`" - # bash optimized version - #grep -E "^$com(:.*)?$" "$libexecdir/*/plugin.conf" | sed \ - # -e 's/\#.*//' \ - # -e "s:^${libexecdir//':'/'\:'}/::" \ - # -e 's@plugin.conf\:@@' > "$tmp_mast" - # POSIX version - grep -E "^$com(:.*)?$" $libexecdir/*/plugin.conf | sed \ - -e 's/\#.*//' \ - -e "s:^`echo "$libexecdir" |sed 's@:@\\:@g'`/::" \ - -e 's@plugin.conf\:@@' > "$tmp_mast" - - # start processing------------------------------------------- - if [ "`wc -c < "$tmp_mast"`" = '0' ]; then - _error "unrecognized command \`$com'" - else - # create tree - tmp_work="`tempfile`" - lev1="`sed \ - -e "/\:/w '$tmp_work'" \ - -e '/\:/d' "$tmp_mast"`" - while read line; do - com="`echo "$line" | sed 's/\:.*$/'`" - dep="_`echo "$line" | sed 's/.*\:$/'`" - # bash optimized version - # eval $dep=\"${!dep} $com\" - # POSIX version - eval $dep=\"\$$dep $com\" - done < "$tmp_work" - rm "$tmp_work" - - # cycle through tree - _treebranch "$lev1" - fi - rm "$tmp_mast" -} - # START OPTION HANDLING # com=$1; # END OPTION HANDLING # @@ -150,8 +97,7 @@ case "$com" in *) repo=`_repo` if [ "$?" = '0' ]; then shift - param="$@" - _runcom + $libexecdir/runcom $@ exit $? else _error "cannot find an existing repository" |