Author: hmbrand
Date: Mon Sep 14 13:57:54 2009
New Revision: 13338

Modified:
   dbi/trunk/git-svn-vsn.pl

Log:
Document the purpose of git-svn-vsn.pl

Modified: dbi/trunk/git-svn-vsn.pl
==============================================================================
--- dbi/trunk/git-svn-vsn.pl    (original)
+++ dbi/trunk/git-svn-vsn.pl    Mon Sep 14 13:57:54 2009
@@ -36,3 +36,57 @@
 
     print $ml "$File::Find::name\n";
     }, "lib");
+
+__END__
+
+=head1 NAME
+
+git-svn-vsn.pl - fill in the gaps from svn that git doesn't know about
+
+=head1 SYNOPSYS
+
+    test_dynamic :: pure_all
+            perl git-svn-vsn.pl
+            PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" 
"test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)
+            PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-I$(INST_LIB)" 
"-I$(INST_ARCHLIB)" $(TEST_FILE)
+            git co `cat git-svn-modlist`
+            rm git-svn-modlist
+
+=head1 DESCRIPTION
+
+git has no concept of keywords that have special meaning like %R% in SCCS
+or $Revision$ in rcv and svn. Most module files in DBI will en up with lines
+like:
+
+       $VERSION = sprintf("12.%06d", q$Revision$ =~ /(\d+)/o);
+
+    #   $Id$
+
+Running C<git-svn-vsn.pl> will read the git log for this file and convert it
+to something like
+
+       $VERSION = sprintf("12.%06d", q$Revision: 9215 $ =~ /(\d+)/o);
+
+    #   $Id: NullP.pm 9215 2007-03-08 17:03:58Z timbo $
+
+Which means that the C<$VERSION> veriables now actually make sense. As a side
+effect, the script also drops a list with all the modules it changed, so the
+C<make test> can revert to the actual files from the repository after the tests
+have been run with C<git checkout `cat git-svn-modlist`>.
+
+Future enhancements might include encorporating this into Makefile.PL.Currently
+the changes are handwork after C<perl Makefile.PL> has been run.
+
+=head1 SEE ALSO
+
+git (1), svn (1)
+
+=head1 AUTHOR
+
+H.Merijn Brand <h.m.brand at xs4all.nl>
+
+=head1 COPYRIGHT
+
+None. Feel free to use this in any way you like
+
+=cut

Reply via email to