Login | Register
My pages Projects Community openCollabNet

Discussions > dev [DISABLED] > Re: [PATCH] command line options to use external command to compress

subversion
Discussion topic

There will be a brief maintenance window every Friday at 17:00 Pacific.
For further details, see CollabNet's maintenance and upgrade policy.

Back to topic list

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

Author tsuchiyama
Full name masaru tsuchiyama
Date 2009-10-20 07:35:13 PDT
Message Hi.

> 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"

Oops. Fixed the bug.

[[[
   add two command line options, --bzip2-cmd and --gzip-cmd
   to svn-backup-dumps.py

   if --bzip2-cmd option is specified, the script uses bzip2 command to
   compress the dump stream instead of python bzip2 module.

   if --gzip-cmd option is specified, the script uses gzip command to
   compress the dump stream instead of python gzip module.

   * tools/server-side/sv​n-backup-dumps.py
     (SvnBackupOutputCommand): add new class to launch external command to
                               compress.
     (SvnBackup.__init__): add two member variables, __bzip2_path and
                           __gzip_path to hold command line parameters
     (SvnBackup.__init__): add mutually exclusive checks for compress options.
     (SvnBackup.create_dump): create instance of SvnBackupOutputCommand
                              when __bzip2_path or __gzip_path is valid
     (): fix command option help for "-b" and "-z" to distinguish from
         --bzip2-cmd and --gzip-cmd option.
     (): change parser.add_option parameters for -b and -z to
         do mutually exclusive checks
   ]]]


Regards.
Masaru.
Attachments

« Previous message in topic | 6 of 8 | Next message in topic »

Messages

Show all messages in topic

[PATCH] command line options to use external command to compress tsuchiyama masaru tsuchiyama 2009-10-18 02:18:33 PDT
     Re: [PATCH] command line options to use external command to compress tsuchiyama masaru tsuchiyama 2009-10-18 02:21:10 PDT
     Re: [PATCH] command line options to use external command to compress stylesen Senthil Kumaran S 2009-10-19 04:57:31 PDT
         Re: [PATCH] command line options to use external command to compress tsuchiyama masaru tsuchiyama 2009-10-19 08:12:11 PDT
             Re: [PATCH] command line options to use external command to compress stylesen Senthil Kumaran S 2009-10-19 23:12:29 PDT
                 Re: [PATCH] command line options to use external command to compress tsuchiyama masaru tsuchiyama 2009-10-20 07:35:13 PDT
                     Re: [PATCH] command line options to use external command to compress stylesen Senthil Kumaran S 2009-10-21 02:28:54 PDT
                         Re: [PATCH] command line options to use external command to compress tsuchiyama masaru tsuchiyama 2009-10-21 07:16:56 PDT
Messages per page: