Eli

To content | To menu | To search

Tuesday, October 5 2010

Solve 'svn: This client is too old to work with working copy' error

Solve 'svn: This client is too old to work with working copy' error

Solve 'svn: This client is too old to work with working copy' error without upgrading Subversion

At work we use two different major version of Subversion : 1.5 for our own repositories and 1.6 for everything that come from others repositories (Apache, Google Code, ...).

Reason is that we do not have time to upgrade to Subversion 1.6, and we cannot commit to Google Code without 1.6 client.

svn: This client is too old to work with working copy

It's dangerous to use 1.6 client with 1.5 working copies because Subversion 1.6 working copy format was upgraded from 1.5, this means that :

  • 1.5 and older Subversion clients will not be able to work with working copies produced by Subversion 1.6
  • Working copies are upgraded automatically
  • We get a svn: This client is too old to work with working copy message too often

Recently we made two mistake using Tortoise SVN and Subclipse for Eclipse Helios newest version in two different places, a linux server via Samba, and my Windows computer.

Nobody is able to work with theses upgraded working copies, getting this message

svn: This client is too old to work with working copy '.'.  You need
to get a newer Subversion client, or to downgrade this working copy.
See http://subversion.tigris.org/faq.html#working-copy-format-change
for details.


Working copy format change with Subversion 1.6

Subversion becomes Apache Subversion in 2010, let's check the new documentation URL on subversion.apache.org.

Sometimes the working copy metadata format changes incompatibly between minor releases. For example, say you have a working copy created with Subversion 1.4.4, but one day you decide to try out Subversion 1.5.0. Afterwards, you attempt to switch back to 1.4.4, but it doesn't work — it just gives the above error.

This is because 1.5.0 upgraded your working copy format to support some new features (in this case, changelists, the keep-local flag, and variable-depth directories). Although 1.4.4 doesn't know anything about these new features, it can at least recognize that the working copy format has been upgraded to something higher than it can handle.

Subversion team distribute a Python script that can downgrade working copies safely because this automatic upgrade behavior can be annoying.

Linux part : change-svn-wc-format.py Python script

Download and installation

We need to first download the change-svn-wc-format.py script

wget http://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/change-svn-wc-format.py

Then don't forget to give execution right to it

chmod +x change-svn-wc-format.py

Testing if everything work by checking the help

 ./change-svn-wc-format.py --help
usage: change-svn-wc-format.py WC_PATH SVN_VERSION [--verbose] [--force] [--skip-unknown-format]
       change-svn-wc-format.py --help
Change the format of a Subversion working copy to that of SVN_VERSION.
  --skip-unknown-format    : skip directories with unknown working copy
                             format and continue the update

If you don't see this message, you probably got a Python error, this script use Python 2.X, check Google to help you on this subject as i'm not a specialist on it.

Downgrading working copy

I want my working copy to be downgraded to Subversion 1.5 and to see what happen so let's use this command :

./change-svn-wc-format.py /my/broken/WC/path/. 1.5 --verbose

I strongly suggest you to use --verbose, because using change-svn-wc-format.py in a path that does not exists say that ... it worked.

./change-svn-wc-format.py /this/path/does/not/exists/. 1.5
Converted WC at '/this/path/does/not/exists/.' into format 9 for Subversion 1.5

Now on a real working copy

Processing directory '.'
Parsing file '/my/broken/WC/path/.svn/entries'
Updating file '/my/broken/WC/path/.svn/format'
/my/broken/WC/path/.svn/format does not exist, creating it.
Checking whether WC format can be converted
Writing WC format
[...]
Writing WC format
Converted WC at '/my/broken/WC/path/' into format 9 for Subversion 1.5

A simple status command to check everything :

svn status -u
Status against revision:    604

It worked !

Windows part for change-svn-wc-format.py

Python download and installation

Subversion script use Python 2.X, so download it from this download page, then install it.

Add Python directory (C:/Python27 here) to your Windows environment variable "Path", open Control Panel > System > Advanced Panel > Environment variables > Path > Modify.
A screen in a french Windows XP can help you /blog/public/windows_python_env_path.png.

Download and test change-svn-wc-format.py

Open http://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/change-svn-wc-format.py and "Save As" the script on your computer.
Then open a DOS command prompt windows and execute this command to check correct python installation

python change-svn-wc-format.py --help

If you 've got the following message your are using Python 3.X and you need to install Python 2.X

  File "change-svn-wc-format.py", line 99
    except UnrecognizedWCFormatException, e:
                                        ^
SyntaxError: invalid syntax

Both version can be installed at the same time, but only one can be put in Windows environment variable "Path" or you can try the conversion tool for Python 2.x code from 2to3 tools.

Downgrading working copy

Open a DOS command prompt windows then execute

C:\>python change-svn-wc-format.py c:/my/broken/working/copy 1.5 --verbose
Processing directory 'c:/my/broken/working/copy.'
Parsing file 'c:/my/broken/working/copy.svn/entries'
Updating file 'c:/my/broken/working/copy/.svn/format'
[...]
Converted WC at 'c:/my/broken/working/copy' into format 9 for Subversion 1.5

Again I strongly suggest you to use --verbose using change-svn-wc-format.py in a path that does not exists say that ... it worked.

Hope that after losing hour after hour we finally get some green light to upgrade Subversion.




Friday, October 1 2010

Subversion 1.6.13 released

Version 1.6.13 of Subversion has been released, this is a bugfix release, part of the 1.6.x release series.
This release includes a fix which addresses CVE-2010-3315, a security issue when using 'SVNPathAuthz short_circuit'.

Release Notes

User-visible changes in Subversion 1.6.13:

  • Don't drop properties during foreign-repo merges (issue #3623)
  • Improve auto-props failure error message (r961970)
  • Improve error message for 403 status with ra_neon (r876615)
  • Don't allow 'merge --reintegrate' for 2-url merges (r959004)
  • Improve handling of missing fsfs.conf during hotcopy (r980811, -1449)
  • Escape unsafe characters in a URL during export (issue #3683)
  • Don't leak stale locks in FSFS (r959760)
  • Better detect broken working copies during update over ra_neon (r979045)
  • fsfs: make rev files read-only (r981921)
  • Properly canonicalize a URL (r984928, -31)
  • Fix wc corruption with 'commit --depth=empty' (issue #3700)
  • Permissions fixes when doing reintegrate merges (related to issue #3242)
  • Fix mergeinfo miscalculation during 2-url merges (issue #3648)
  • Fix error transmission problems in svnserve (r997457, -66)
  • Fixed: record-only merges create self-referential mergeinfo (issue #3646)
  • Fixed: 'SVNPathAuthz short_circuit' unsolicited read access (issue #3695)
  • Make 'svnmucc propset' handle existing and non-existing URLs (r1000607)
  • Add new 'propsetf' subcommand to svnmucc (r1000612)
  • Emit a warning about copied dirs during ci with limited depth (r1002094)

Developer-visible changes in Subversion 1.6.13:

  • Make ruby bindings compatible with Ruby 1.9 (r957507)
  • Use the repos verify API in JavaHL (r948916)
  • Teach ra_serf to parse md5 checksums with update editors (r979429)
  • Let ra_serf work with current serf releases (r879757, r880320, r943796)

For more informations about changes, see the Changelog.




Tuesday, September 28 2010

libMemcached 0.44 released

Version 0.44 of libmemcached the open source C/C++ client library and tools for Memcached has been released today by Brian Aker.

Release notes :

  • Windows bug fixes.
  • Hudson port support in test harness.
  • Improved portability of test hanrness.
  • SASL fixes.

You can download it from : http://launchpad.net/libmemcached/1.0/0.44/+download/libmemcached-0.44.tar.gz.




Sunday, September 26 2010

PHP 5.3.3 release notes

This release focuses on improving the stability and security of the PHP 5.3.x branch with over 100 bug fixes, some of which are security related. All users are encouraged to upgrade to this release.

Release notes

Backwards incompatible change:

Methods with the same name as the last element of a namespaced class name will no longer be treated as constructor. This change doesn't affect non-namespaced classes.

<?php
namespace Foo;
class Bar {
    public function Bar() {
        // treated as constructor in PHP 5.3.0-5.3.2
        // treated as regular method in PHP 5.3.3
    }
}
?>

There is no impact on migration from 5.2.x because namespaces were only introduced in PHP 5.3.

Security Enhancements and Fixes in PHP 5.3.3:

  • Rewrote var_export() to use smart_str rather than output buffering, prevents data disclosure if a fatal error occurs (CVE-2010-2531).
  • Fixed a possible resource destruction issues in shm_put_var().
  • Fixed a possible information leak because of interruption of XOR operator.
  • Fixed a possible memory corruption because of unexpected call-time pass by refernce and following memory clobbering through callbacks.
  • Fixed a possible memory corruption in ArrayObject::uasort().
  • Fixed a possible memory corruption in parse_str().
  • Fixed a possible memory corruption in pack().
  • Fixed a possible memory corruption in substr_replace().
  • Fixed a possible memory corruption in addcslashes().
  • Fixed a possible stack exhaustion inside fnmatch().
  • Fixed a possible dechunking filter buffer overflow.
  • Fixed a possible arbitrary memory access inside sqlite extension.
  • Fixed string format validation inside phar extension.
  • Fixed handling of session variable serialization on certain prefix characters.
  • Fixed a NULL pointer dereference when processing invalid XML-RPC requests (Fixes CVE-2010-0397, bug #51288).
  • Fixed SplObjectStorage unserialization problems (CVE-2010-2225).
  • Fixed possible buffer overflows in mysqlnd_list_fields, mysqlnd_change_user.
  • Fixed possible buffer overflows when handling error packets in mysqlnd.

Key enhancements in PHP 5.3.3 include:

  • Upgraded bundled sqlite to version 3.6.23.1.
  • Upgraded bundled PCRE to version 8.02.
  • Added FastCGI Process Manager (FPM) SAPI.
  • Added stream filter support to mcrypt extension.
  • Added full_special_chars filter to ext/filter.
  • Fixed a possible crash because of recursive GC invocation.
  • Fixed bug #52238 (Crash when an Exception occured in iterator_to_array).
  • Fixed bug #52041 (Memory leak when writing on uninitialized variable returned from function).
  • Fixed bug #52060 (Memory leak when passing a closure to method_exists()).
  • Fixed bug #52001 (Memory allocation problems after using variable variables).
  • Fixed bug #51723 (Content-length header is limited to 32bit integer with Apache2 on Windows).
  • Fixed bug #48930 (__COMPILER_HALT_OFFSET incorrect in PHP >= 5.3).

For a full list of changes in PHP 5.3.3, see the ChangeLog.




Thursday, September 23 2010

Solving the 'revprop change blocked by pre-revprop-change hook (exit code 255) with no output' error

What is the pre-revprop-change hook ?

The pre-revprop-change script is launched before any property is modified on the Subversion repository.

Because Subversion's revision properties are not versioned, making modifications will overwrite the previous value of that property and since data can be lost, Subversion supplies this hook to log changes or enable only some properties to be changed, ...

revprop change blocked by pre-revprop-change hook (exit code 255) with no output is a common error when playing with revision properties that can be solved in two simple steps.

Check the pre-revprop-change hook existence

By default, there only a template hook named pre-revprop-change.tmpl in the repository hooks folder.
You need a pre-revprop-change file, so you can rename it to only enable svn:log and svn:author (Commit log message & author) :

mv hooks/pre-revprop-change.tmpl hooks/pre-revprop-change

Or make your own hook to enable all properties to be changed :

vi hooks/pre-revprop-change

then insert

#!/bin/sh 
exit 0;

The exit 0; instruction is equivalent to a success for svn, so this one will allow EVERY revision properties on repository to be changed (Useful for svnsync).

Give the execution right to pre-revprop-change hook

It's a common mistake to forget enabling execution right to the hook

chmod +x hooks/pre-revprop-change

This is the second step, you are now able to change revision properties on your repository.

(exit code 1)

In case you obtain revprop change blocked by pre-revprop-change hook (exit code 1), this mean that pre-revprop-change hook is enabled, executable, but it does not allow you to modify the revision property you're trying to change.

Check the message it return (unless with no output is specified), check the hook code, if you can't or are not allowed to do theses things, check repository hosting documentation or contact your repository administrator.




- page 6 of 11 -