r17012 - gnucash/trunk - Remove make-gnucash-patch and only suggest `svn diff' or plain `diff -urN'.
Andreas Köhler
andi5 at cvs.gnucash.org
Sat Mar 8 12:17:47 EST 2008
Author: andi5
Date: 2008-03-08 12:17:47 -0500 (Sat, 08 Mar 2008)
New Revision: 17012
Trac: http://svn.gnucash.org/trac/changeset/17012
Removed:
gnucash/trunk/README.patches
gnucash/trunk/make-gnucash-patch.in
Modified:
gnucash/trunk/.gitignore
gnucash/trunk/Makefile.am
gnucash/trunk/README
gnucash/trunk/packaging/win32/install.sh
Log:
Remove make-gnucash-patch and only suggest `svn diff' or plain `diff -urN'.
Modified: gnucash/trunk/.gitignore
===================================================================
--- gnucash/trunk/.gitignore 2008-03-08 16:58:21 UTC (rev 17011)
+++ gnucash/trunk/.gitignore 2008-03-08 17:17:47 UTC (rev 17012)
@@ -39,7 +39,6 @@
lib/libqof/qof/qofla-dir.h
libtool
ltmain.sh
-make-gnucash-patch
make-gnucash-potfiles
missing
mkinstalldirs
Modified: gnucash/trunk/Makefile.am
===================================================================
--- gnucash/trunk/Makefile.am 2008-03-08 16:58:21 UTC (rev 17011)
+++ gnucash/trunk/Makefile.am 2008-03-08 17:17:47 UTC (rev 17012)
@@ -6,7 +6,7 @@
GNC_CTAGS_FILE = @GNC_CTAGS_FILE@
GNC_ETAGS_FILE = @GNC_ETAGS_FILE@
-noinst_DATA = make-gnucash-patch make-gnucash-potfiles
+noinst_DATA = make-gnucash-potfiles
dist_doc_DATA = \
AUTHORS \
@@ -39,7 +39,6 @@
EXTRA_DIST = \
gnucash.lsm \
- make-gnucash-patch.in \
make-gnucash-potfiles.in \
macros/aqbanking.m4 \
macros/as-scrub-include.m4 \
@@ -82,13 +81,6 @@
## brackets here, instead of the usual @... at . This prevents autoconf
## from substituting the values directly into the left-hand sides of
## the sed substitutions.
-make-gnucash-patch: make-gnucash-patch.in Makefile
- rm -f $@.tmp
- sed < $< > $@.tmp \
- -e 's:@-PERL-@:${PERL}:g'
- chmod +x $@.tmp
- mv $@.tmp $@
-
make-gnucash-potfiles: make-gnucash-potfiles.in Makefile
rm -f $@.tmp
sed < $< > $@.tmp \
@@ -99,7 +91,7 @@
DISTCLEANFILES = \
intltool-extract intltool-update intltool-merge\
- cscope.files cscope.out etags.files make-gnucash-patch \
+ cscope.files cscope.out etags.files \
make-gnucash-potfiles po/.intltool-merge-cache
cscope.files:
Modified: gnucash/trunk/README
===================================================================
--- gnucash/trunk/README 2008-03-08 16:58:21 UTC (rev 17011)
+++ gnucash/trunk/README 2008-03-08 17:17:47 UTC (rev 17012)
@@ -439,10 +439,20 @@
Submitting a Patch:
- This section has been moved to the file README.patches
+ Once you have done some work that you would like to submit, you need
+ to send a patch. There are two ways to submit a patch. First, if
+ you're using SVN and only made changes to existing SVN files you
+ can generate the patch using:
- Please consult that file for details on using the script provided to make
- patches suitable for submitting to the GnuCash development team.
+ svn diff > /tmp/mypatch
+ and send /tmp/mypatch to gnucash-devel at gnucash.org with `[PATCH]'
+ prefixed to the Subject: of the email. Note that this
+ ONLY WORKS if you have NOT added any new files to the source tree.
-Thank you.
+ If your patch adds new files, use the `-N' flag to diff between a
+ clean directory and your development directory. E.g.
+
+ $ diff -urN {gnucash-pristine} {gnucash-mydevel} > /tmp/mypatch
+
+Thank you.
Deleted: gnucash/trunk/README.patches
===================================================================
--- gnucash/trunk/README.patches 2008-03-08 16:58:21 UTC (rev 17011)
+++ gnucash/trunk/README.patches 2008-03-08 17:17:47 UTC (rev 17012)
@@ -1,244 +0,0 @@
-############################################################
- Gnucash 1.9.x README.patches file.
-
-NOTE: THIS IS A DEVELOPMENT RELEASE!!! THIS VERSION HAS NOT
-BEEN TESTED PROPERLY AND MAY DO ABSOLUTELY ANYTHING!
-
-USE AT YOUR OWN RISK (AND KEEP *LOTS* OF BACKUPS)
-
-If you want something a bit more tested, please use the
-1.8 stable series.
-------------------------------------------------------------
-
-Submitting a Patch:
-
- Once you have done some work that you would like to submit, you need
- to send a patch. There are two ways to submit a patch. First, if
- you're using SVN and only made changes to existing SVN files you
- can generate the patch using:
-
- svn diff > /tmp/mypatch
-
- and send /tmp/mypatch to gnucash-devel at gnucash.org with `[PATCH]'
- prefixed to the Subject: of the email. Note that this
- ONLY WORKS if you have NOT added any new files to the source tree.
-
- If your patch adds new files, use the `-N' flag to diff between a
- clean directory and your development directory. E.g.
-
- $ diff -urN {gnucash-pristine} {gnucash-mydevel} > /tmp/mypatch
-
-*******************************************************************
-NOTE: The rest of this file describes an out-of-date utility that has
-not been adapted to SVN. Don't use it.
-*******************************************************************
-
- If you've added new files then you should use a script called
- "make-gnucash-patch" to help you create the patch for submission.
-
- The script make-gnucash-patch is a perl script provided with the
- gnucash distribution that you can use to create your patch. The
- rest of this file explains how to use that perl script.
-
- This file comes in two parts:
- - A quick summary of the common ways to use make-gnucash-patch; and
- - A "users guide" style section giving detailed information on all
- the options for make-gnucash-patch.
-
-COMMON USAGE
-
- There are two methods.
-
- 1) Run ./make-gnucash-patch in your source directory. The script
- will then create two directories ../diff and ../tmp. In ../tmp
- it will then do a checkout of the cvs sources. If gnucash has
- already been checked out into this directory then only an update
- will occur. As a consequence of this you should make sure you
- are merged with current CVS before running make-gnucash-patch or
- you will find parts of the patch are reversing recent changes in
- CVS.
-
- make-gnucash-patch will then use makepatch to create a patch
- between the original directory and ../tmp/gnucash. makepatch
- will ask you for a description of the patch. And then the diff
- will be written to the diff file
- ../diffs/gnucash-YYYYMMDD-hhmmss-<username>.diff.gz where Y=year,
- M=month, D=day, h=hour, m=minute, and s=second.
-
- make-gnucash-patch will then uuencode the diff to
- ../diffs/<samefilename>.uue.
-
- There are three vars you can set in a ~/.gnucash-patch.rc file.
- The file should look like this
-
-----------------------------------------------------------------------
-# -*- perl -*-
-
-$::should_uuencode = 0;
-$::ask_description = 0;
-$::diffcmd = "diff -up";
-
-1;
-----------------------------------------------------------------------
- This is basically a perl file that is sourced by the script. If
- you don't want the diff to be uuencoded (say you'll send the
- patch in email using mime and don't need it double encoded). Set
- $::should_uuencode to 0. If you don't want makepatch to ask you
- for the patch description (so the process is more automated
- possibly) set $::ask_description to 0. If you want to use a
- different diff command (not recommended for most) set $::diffcmd
- to something else (say, "gdiff -up").
-
- 2) The second method is basically described below but it also
- includes the vars you can set from above. This method gives you
- more control over which directories are used.
-
- First, set up your development directories as follows:
-
- < GnuCash home development directory >
- |
- |---- < directory containing original GnuCash sources >
- |
- |---- < directory containing your modified GnuCash sources >
-
- A concrete example of those directories might be:
-
- /home/me/gnucash
- |
- |---- /home/me/gnucash/gnucash.pristine (original sources)
- |
- |---- /home/me/gnucash/gnucash.mywork (original sources + my edits)
-
- Copy the make-gnucash-patch script to the home development
- directory (/home/me/gnucash above). Now set three environment
- variables to reflect the names of your directories. Given the
- names above, you would use:
-
- export GNC_MAKEPATCH_OLD_DIR=gnucash.pristine
- export GNC_MAKEPATCH_NEW_DIR=gnucash.mywork
- export GNC_MAKEPATCH_HOME_DIR=/home/me/gnucash
-
- Right before you make your patch, make sure *both* your working
- and your pristine directories are in sync with cvs. Run 'cvs -z3
- update -dP' in both directories to ensure that is the
- case. Updating from cvs in your working directory may cause
- conficts in a file. You must resolve those conficts before making
- a patch.
-
- Now run the script. Note that this script requires the programs
- 'makepatch', 'gzip', a 'diff' work-a-like, and 'uuencode' (and, of
- course, 'perl') to run.
-
- The same files will be generated for this method as the last
- (../diffs/*.diff.gz and ../diffs/*.diff.gz.uue).
-
-USERS GUIDE
-
- make-gnucash-patch supports a number of ways of providing required
- information. Some information can be provided through the use of
- environment variables or in the .gnucash-patch.rc file in your
- home directory. All information can be provided by command-line
- options.
-
- In all cases, the options given on the command-line override the
- information in both environment variables and the .gnucash-patch.rc
- file.
- Environment variables (where permitted) will override the
- .gnucash-patch.rc file.
-
- The general format for using make-gnucash-patch is:
- ./make-gnucash-patch <options>
-
- where valid options are (in arbitrary order):
- --help, --h Display a short help message explaining available
- options.
-
- --prefix "homedir" Specifies the home directory path to use. This path is
- prepended to both the new and old directory names to
- give the full path for those directories.
- Defaults to: the parent directory.
- Environment variable: GNC_MAKEPATCH_HOME_DIR
-
- --old "olddir" The name of the directory containing the "pristine" or
- unmodified copy of the gnucash CVS tree.
- The directory path as determined by --prefix is prepended
- to this name to give the full directory path.
- Defaults to: ../tmp and will create if it doesn't exist.
- Environment variable: GNC_MAKEPATCH_OLD_DIR
-
- --new "newdir" The name of the directory containing the modified copy of
- the gnucash CVS tree.
- The directory path as determined by --prefix is prepended
- to this name to give the full directory path.
- Defaults to: the current directory.
- Environment variable: GNC_MAKEPATCH_NEW_DIR
-
- --diff "diffname" The name to give to the output ("diff") file containing
- the patch code.
- Defaults to: gnucash-YYYYMMDD-HHmmSS-XXXX.diff
- where: YYYY = current year (4 digit form)
- MM = current month (2 digit form)
- DD = current date (2 digit form)
- HH = current hour (24-hour 2 digit form)
- mm = current minutes (2 digit form)
- SS = current seconds (2 digit form)
- XXXX = userid of current user (arbitrary length)
-
- --diffcmd "command" The command to give to makepatch to generate the
- differences between two files.
- *NOT* Recommended for most users, only for those whom
- diff -up is non-functional.
- Defaults to: diff -up
-
- --file "filename" Generate a patch for ONLY this file. The path within
- the CVS tree must be specified (eg. src/MultiLedger.c) or
- the file cannot be matched. You can specify multiple files
- by seperating them by commas. You can also include this
- option multiple times.
- You *CANNOT* use this option with wildcards, regexps, or
- partial matches.
- Defaults to: none.
- See Also: --manifest
-
- --manifest "file" Use "file" as a manifest file (file that contains a list
- of all files to be compared in the making of the diff).
- Manifest files must contain one filename per line. Lines
- starting with # are ignored.
-
---ignore "igname" Name of the file in the parent directory which contains
- regular expressions matching files which are to be excluded
- from the patch. This is in addition to a number of files
- which are automatically excluded by the script.
- Defaults to: none.
-
- --uuencode Specifies whether the resultant diff file should be
- --nouuencode uuencoded or not. uuencoding is a way of encrypting the file
- so that it is less likely to be corrupted during transmission
- over the internet. You should generally use it.
- Defaults to: On.
- .gnucash-patch.rc file: Yes
- ("$::should_uuencode = 0;" to override default).
-
- --zip Specifies whether the resultant diff file should be
- --nozip compressed or not. This is not always necessary when the
- patch is a small one.
- Defaults to: On.
-
- --ask Controls whether makepatch should ask for a description of
- --noask this patch or not.
- Defaults to: On.
- .gnucash-patch.rc file: Yes
- ("$::ask_description = 0;" to override default).
-
-
-THINGS TO NOTE
- - the script assumes (when using defaults) that it is being executed in the
- top directory of the modified CVS tree. This can be overridden by specifying
- prefix, old, and new directories.
- - the script assumes that both the "pristine" and modified copy are children
- of the same parent directory.
- - the script will check out a "pristine" copy of the CVS tree automatically if
- it cannot find the old directory you specify.
-
-
- Thanks in advance for your contribution!
Deleted: gnucash/trunk/make-gnucash-patch.in
===================================================================
--- gnucash/trunk/make-gnucash-patch.in 2008-03-08 16:58:21 UTC (rev 17011)
+++ gnucash/trunk/make-gnucash-patch.in 2008-03-08 17:17:47 UTC (rev 17012)
@@ -1,312 +0,0 @@
-#!@-PERL-@ -w
-# -*- perl -*-
-#
-# This perl script is used to make a patch for your GnuCash
-# development work. All patches should be submitted to the
-# mailing list gnucash-devel at gnucash.org. For more info
-# consult README.patches
-#
-# WARNING: By default, this script will checkout an entire
-# up to date copy of the source tree in ../tmp/gnucash/.
-#
-# In order to prevent patches which reverse recent changes
-# made in CVS, make sure to "cvs update" in both
-# directories before running make-gnucash-patch.
-#
-# This script requires the programs 'makepatch', 'gzip',
-# a 'diff' work-a-like, and 'uuencode'.
-#
-# Author: Dave Peticolas <dave at krondo.com>
-
-use strict;
-
-use File::Basename;
-use Getopt::Long;
-
-$::ask_description = 1;
-$::should_uuencode = 1;
-$::diffcmd = "diff -up";
-
-die "This utility has not been updated to use SVN. Sorry, just use diff(1).";
-
-my $rcfile = $ENV{"HOME"} . "/.gnucash-patch.rc";
-
-if (-f $rcfile) {
- require $rcfile;
-}
-
-###########################################################
-# This section must be configured for your own setup. #
-###########################################################
-
-# The directory with the original gnucash sources
-my $old = undef;
-
-chomp(my $cwd = `pwd`);
-
-my ($new, $gnc_home) = fileparse($cwd);
-
-###########################################################
-# This section should not need to be modified. #
-###########################################################
-
-# Allow the user to override the defaults with evnt vars.
-
-if($ENV{'GNC_MAKEPATCH_OLD_DIR'}) {
- $old = $ENV{'GNC_MAKEPATCH_OLD_DIR'};
-}
-
-if($ENV{'GNC_MAKEPATCH_NEW_DIR'}) {
- $new = $ENV{'GNC_MAKEPATCH_NEW_DIR'};
-}
-
-if($ENV{'GNC_MAKEPATCH_HOME_DIR'}) {
- $gnc_home = $ENV{'GNC_MAKEPATCH_HOME_DIR'};
-}
-
-###########################################################
-# Make sure makepatch exists before going on #
-###########################################################
-
-open(OLDOUT, ">&STDOUT");
-open(OLDERR, ">&STDERR");
-open(STDOUT, "> /dev/null") || die "Can't redirect stdout";
-open(STDERR, "> /dev/null") || die "Can't redirect stderr";
-my $test = system('makepatch', "-help");
-close(STDOUT);
-close(STDERR);
-open(STDOUT, ">&OLDOUT");
-open(STDERR, ">&OLDERR");
-close(OLDOUT);
-close(OLDERR);
-
-if($test == -1) {
- print "No makepatch installed. Exiting\n";
- exit(10);
-}
-
-
-###########################################################
-# Now, check if anything specified on command line #
-###########################################################
-
-my $result;
-my $help;
-my $zip = 1; # defaults to on
-my $diffname = undef;
-my $ignorename = undef;
-my @filename = ();
-my $manifest = undef;
-
-$result = GetOptions("old=s" => \$old, "new=s" => \$new,
- "prefix=s" => \$gnc_home, "help" => \$help,
- "file=s" => \@filename, "ask!" => \$::ask_description,
- "diff=s" => \$diffname, "uuencode!" => \$::should_uuencode,
- "diffcmd!" => \$::diffcmd, "zip!" => \$zip,
- "ignore=s" => \$ignorename, "manifest=s" => \$manifest);
-
-if ($help or $result == 0) {
- printf "Help information\n\n";
- printf "make-gnucash-patch accepts the following arguments:\n";
- printf "--old \"olddir\" Directory of \"pristine\" copy\n";
- printf "--new \"newdir\" Directory with modified copy\n";
- printf "--prefex \"homedir\" Full path of parent directory\n";
- printf "--diff \"diffname\" Output name for diff file\n";
- printf "--diffcmd \"cmd\" Command to compare two files\n";
- printf "--file \"filename\" Make patch for filename ONLY\n";
- printf "--manifest \"file\" Use file as a manifest file\n";
- printf "--ignore \"igname\" File containing file matches to ignore\n";
- printf "--(no)uuencode Enable or disable uuencoded output\n";
- printf " (Defaults to enabled)\n";
- printf "--(no)zip Enable or disable gzipped output\n";
- printf " (Defaults to enabled)\n";
- printf "--(no)ask Enable or disable prompting for description\n";
- printf " (Defaults to enabled)\n";
- printf "and of course:\n";
- printf "--help Displays this text\n";
- printf "\nAll options can be abbreviated to their shortest unique\n";
- printf " form: --o, --ne, --p, --d, --diffc, --f, --m, --i,\n";
- printf " --u/--nou, --z/--noz, --a/--noa, and --h\n";
- printf "\n";
- exit 1;
-}
-
-# if explicit filename given, build required MANIFEST file
-
- at filename = split(/,/,join(',', at filename));
-
-if (@filename) {
- open (FN, ">$gnc_home/tmp.MANIFEST") or die "Couldn't create MANIFEST file";
- printf (FN "# Temporary manifest file for make-gnucash-patch -f option\n");
- printf (FN "\n");
- foreach my $part (@filename) {
- printf (FN "%s\n", $part);
- }
- close (FN);
-}
-
-# Switch to the home directory
-print "Changing directory to $gnc_home\n";
-chdir $gnc_home or die "Can't cd!\n";
-
-if (not defined($old)) {
- if (not -f "$new/CVS/Root") {
- print "Source not checked out of CVS and no \$old set. Quitting...\n";
- exit(1);
- }
- if (not -d "tmp") {
- mkdir "tmp", 0755;
- }
- chdir "tmp";
- system("cvs -d `cat ../$new/CVS/Root` co gnucash");
- chdir "..";
- $old = "tmp/gnucash";
-}
-
-chdir $gnc_home . "/" . $new or die "Can't cd!\n";
-# Start out with our basic makepatch arguments
-my @args = ('-verbose', '-exclude-vc');
-
-# Push the diff command value
-push(@args, '-diff', "$::diffcmd");
-
-if (not $::ask_description) {
- push(@args, '-description', '');
-}
-
-# If -f options given, use generated manifest file
-# otherwise, add exclusions and proceed as normal
-if (@filename) {
- push(@args, '-manifest', "$gnc_home/tmp.MANIFEST");
-}
-elsif (defined($manifest)) {
- if (not $manifest =~ m#/#) {
- $manifest = "$cwd/$manifest";
- }
- push(@args, '-manifest', "$manifest");
-}
-else {
- # Add in the exclude patterns from the __DATA__ section
- push_exclusions(\@args);
-}
-
-sub push_exclusions {
- my $args = shift;
- foreach my $pat (<DATA>) {
- chomp($pat);
- push(@{$args}, '-exclude', $pat) if $pat;
- }
- if (defined ($ignorename)) {
- $ignorename = "../" . $ignorename;
- if (-e $ignorename) {
- open (IG, $ignorename) or die "Couldn't open $ignorename";
- foreach my $igf (<IG>) {
- chomp ($igf);
- push(@{$args}, '-exclude', $igf) if $igf;
- }
- close (IG);
- }
- }
- my @cvsignores = `find . -name '.cvsignore'`;
- foreach my $one_ignore (@cvsignores) {
- my ($name, $path) = fileparse($one_ignore);
- open (IG, $one_ignore);
- foreach my $fl (<IG>) {
- chomp $fl;
- $path =~ s/^\.\///;
- push(@{$args}, '-exclude', $path . $fl) if $fl;
- }
- close (IG);
- }
-}
-# Add the from and to directories for makepatch
-push(@args, $old, $new);
-print "Arguments are: " . join("; ", @args) . "\n";
-
-chdir $gnc_home or die "Can't cd!\n";
-
-# Erase the old files
-#unlink('gnc.diff', 'gnucash.diff.gz', 'gnucash.diff.gz.uue');
-
-if (not -d "diffs") {
- mkdir "diffs", 0755;
-}
-
-my $outfilename;
-
-if (not defined($diffname)) {
- my $date = `date '+%Y%m%d-%H%M%S'`;
- chomp($date);
- my $who = `whoami`;
- chomp($who);
-
- $outfilename = "gnucash-$date-$who.diff";
-}
-else {
- $outfilename = $diffname;
-}
-
-# Invoke makepatch with standard out redirected to 'gnucash.diff'
-open(OLDOUT, ">&STDOUT");
-open(STDOUT, "> diffs/$outfilename") || die "Can't redirect stdout";
-system('makepatch', @args);
-close(STDOUT);
-open(STDOUT, ">&OLDOUT");
-close(OLDOUT);
-print "makepatch done\n";
-
-# Compress the patch if required
-if ($zip) {
- if (-f "diffs/$outfilename") {
- system("gzip", "-9vf", "diffs/$outfilename");
- }
-}
-
-# UU encode the patch if required
-
-# if $zip is true, then
-# 'gnucash.diff.gz.uue' is the file you send.
-if ($zip and -f "diffs/$outfilename.gz" and $::should_uuencode) {
- system("uuencode diffs/$outfilename.gz $outfilename.gz > diffs/$outfilename.gz.uue");
- print "diffs/$outfilename.gz.uue\n";
-}
-else {
- if (not $zip and -f "diffs/$outfilename" and $::should_uuencode) {
- system("uuencode diffs/$outfilename $outfilename > diffs/$outfilename.uue");
- print "diffs/$outfilename.uue\n";
- }
-}
-
-
-exit(0);
-
-__DATA__
-
-#*#
-*.P
-*.pp
-*.a
-*.bak
-*.bin
-*.diff
-*.diffs
-*.gmo
-*.la
-*.lai
-*.lo
-*.loT
-*.log
-*.mo
-*.moc
-*.o
-*.orig
-*.ignmgp
-*.patch
-*.rej
-*.tar.gz
-*.wrap
-*.xac.*.xac
-*~
-.#*
-doc/gnc-prices.1
-doc/gnucash.1
Modified: gnucash/trunk/packaging/win32/install.sh
===================================================================
--- gnucash/trunk/packaging/win32/install.sh 2008-03-08 16:58:21 UTC (rev 17011)
+++ gnucash/trunk/packaging/win32/install.sh 2008-03-08 17:17:47 UTC (rev 17012)
@@ -45,7 +45,7 @@
level1=$(basename ${_REPOS_UDIR})
level2=$(basename $(dirname ${_REPOS_UDIR}))"/"$level1
for mydir in $level0 $level1 $level2; do
- if [ -f $mydir/make-gnucash-patch.in ]; then
+ if [ -f $mydir/make-gnucash-potfiles.in ]; then
die "Do not save install.sh in the repository or one its parent directories"
fi
done
More information about the gnucash-changes
mailing list