[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] command line options to use external command to compress

From: Senthil Kumaran S <senthil_at_collab.net>
Date: Tue, 20 Oct 2009 11:42:18 +0530

Hi Masaru,

masaru tsuchiyama wrote:
> Hi.
>
> Thank you for your feedback
> I fixed the patch.

The patch looks good now, but there is another problem introduced as given
below, please correct it and send your patch,

> @@ -288,7 +315,25 @@
> self.__quiet = options.quiet
> self.__deltas = options.deltas
> self.__relative_incremental = options.relative_incremental
> - self.__zip = options.zip
> +
> + # check compress option
> + self.__gzip_path = options.gzip_path
> + self.__bzip2_path = options.bzip2_path
> + self.__zip = None
> + compress_options = 0
> + if options.gzip_path != None:
> + compress_options = compress_options + 1
> + if options.bzip2_path != None:
> + compress_options = compress_options + 1
> + if options.bzip2:
> + compress_options = compress_options + 1
> + self.__zip = "gzip"
> + if options.gzip:
> + compress_options = compress_options + 1
> + self.__zip = "bzip2"

In the above two if conditions, you assign 'self.__zip' exactly opposite
values, which results in the following kind of behaviour,

<snip>
$ ./tools/server-side/svn-backup-dumps.py -b /tmp/repos /tmp
writing /tmp/repos.000000-000000.svndmp.gz
* Dumped revision 0.

Everything OK.
$ ./tools/server-side/svn-backup-dumps.py -z /tmp/repos /tmp
writing /tmp/repos.000000-000000.svndmp.bz2
* Dumped revision 0.

Everything OK.
</snip>

Here for option '-b' a '.gz' and for '-z' a '.bz2' gets produced which should
be the other way.

Thank You.

-- 
Senthil Kumaran S
http://www.stylesen.org/
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2409254
Received on 2009-10-20 08:12:57 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.