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

Re: [PATCH] add support for svnrdump to svn-backup-dumps.py

From: Masaru Tsuchiyama <m.tmatma_at_gmail.com>
Date: Thu, 08 Aug 2013 22:17:05 +0900

> Typo, "revision_regex"

fixed at the attached patch.

> > + cmd = [ self.__svnadmin_path, "dump",
> > + "--incremental", "-r", revparam,
self.__repospath ]
>
> That doesn't look right. If self.__repospath can be a local path to a
> repository root, you shouldn't pass it as an argument to 'svn' a few
lines
> above.

If self.__repospath is a local path to a repository,
I don't pass it to svn. See get_head_rev().

> Also, it'd be good practice to pass "--" in front of self.__repospath, but that
> appears to be a preexisting problem in the code (i.e., not introduced by your
> patch).

What is the purpose in passing "--"?

> ... and while at it, use r"" literals to avoid clashes with a
potential future
> "r\d" backslash escape sequence.

Do you worry about changing format change of 'svn log'
in later versions of svn?

If so, 'svn log' is not called because future versions of svn
supports 'svn youngest'.

I add --non-interactive option to the script.

[[[
add support for svnrdump to svn-backup-dumps.py

* tools/server-side/svn-backup-dumps.py
   () : fix comment
   () : update to ver 0.7
   () : import urlparse
   (SvnBackup.__init__) : fix message in SvnBackupException constructor.
   (SvnBackup.__init__) : check whether the second parameter is a local
                          path or an URL.
   (SvnBackup.__init__) : check whether --deltas option is specified when
                          the second parameter is an URL.
   (SvnBackup.__init__) : set svn and svnrdump paths.
   (SvnBackup.__init__) : set flags for --trust-server-cert and
                          --no-auth-cache.
   (SvnBackup.exec_cmd_nt) : open null device and pass it to Popen
                             when printerr is False.
   (SvnBackup.get_extra_param) : get extra option for svn and svnrdump.
                                 always pass --non-interactive to
                                 svn and svnrdump to make sure.
   (SvnBackup.get_head_rev) : rename this to get_head_rev_for_local.
   (SvnBackup.get_head_rev_for_url) : get HEAD revision for an URL.
   (SvnBackup.get_head_rev) : call get_head_rev_for_local for a local
                              path, get_head_rev_for_url for an URL
   (SvnBackup.create_dump) : invoke svnadmin for a local path,
                             svnrdump for an URL.
   () : fix help message.
   () : add --svnrdump-path and --svn-path.
   () : add --trust-server-cert.
   () : add --no-auth-cache.
   () : add --non-interactive.
]]]

Received on 2013-08-08 15:17:48 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.