SVN version is too low to read high version of workcopy problem

Source: Internet
Author: User
Tags subversion client svn tortoisesvn collabnet

Because the working environment depends on CYGWIN,TORTOISESVN.

Previous TORTOISESVN compared to consuming system resources, often making the system unresponsive. After upgrading to the TORTOISESVN version 1.6.2, this problem is better resolved, but the problem is that the SVN version in Cygwin is 1.4.5 and cannot read 1.6.2 of TortoiseSVN workcopy. And I occasionally use the command line to deal with some things, after a Google, finally finished.

In the work copy directory of TortoiseSVN 1.6.2, use SVN info to get the following tips:

$ SVN Info
Svn:this client is too old to work with working copy '. Please get a newer Su
Bversion Client

Looks like the SVN version in Cygwin is very low.

$ svn--version
SVN, version 1.4.5 (r25188)
Compiled Sep 19 2007, 23:10:31

Copyright (C) 2000-2006 collabnet.
Subversion is open source software,
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* Ra_dav:module for accessing a repository via WebDAV (DELTAV) protocol.
-Handles ' HTTP ' scheme
-Handles ' HTTPS ' scheme
* Ra_svn:module for accessing a repository using the SVN network protocol.
-Handles ' SVN ' scheme
* Ra_local:module for accessing a repository in local disk.
-Handles ' file ' scheme

Really a bit low, Google did not find Cygwin first have a new version, so download subversion-1.6.2.tar.gz, follow reade and install instructions step-by-Step from the source code compiled installation.

Everything went well at first, but there was an error at make:

. libs/fs_fs.o:in function ' Svn_fs_fs__add_change ':
/cygdrive/d/subversion-1.6.2/subversion/libsvn_fs_fs/fs_fs.c:4783:undefined ref
Erence to ' _svn_fs_path_change2_create '
Creating library file:. LIBS/LIBSVN_FS_FS-1.DLL.A
Collect2:ld returned 1 exit status
Make: * * * [subversion/libsvn_fs_fs/] Error 1

Have Google a little, again carefully read the Readme INSTALL, RM libsvn*, etc., still unresolved.

When I was about to crash, I thought of the Subversion FAQ, and I found it, and the FAQ was awesome: I got an error that says ' This client's too old '. You ' re using both a older (pre-1.4) version of the Subversion command-line client, and Subclipse. Recently upgraded Subclipse, and now your command-line client says

Svn:this client is too old to work with working copy
'/path/to/your/working/copy '; Please get a newer Subversion client
This is happened because Subversion ' s working-copy format changed incompatibly-the new version of Subclipse upgraded your WOR King copy, so now your command-line, which are old, cannot read it. (This problem isn ' t specific to Subclipse; it would also have the if you ' d happened a used client that is command-line or Newer, along with your older command-line client.) The fix is simply to upgrade your command-line client to 1.4 or newer. As of Subversion 1.5, a helper script is provided to downgrade working copies to formats compatible with earlier releases Subversion; This FAQ. I got an error saying "This client are too old to work with working copy ' ... ' ". How can I fix it without upgrading Subversion?

Sometimes the working copy metadata format changes incompatibly between minor. For example, say your have a working copy created with Subversion 1.4.4, but one and 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 the gives 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 this new features, it can at least recognize this working copy format has been upgraded to something higher than it can handle.

1.5.0 upgraded the working copy for a good reason:it realizes this 1.4.4 does not know about this new features, and that If 1.4.4 were to meddle with the working copy metadata now, important information might is lost, possibly causing Ion (issue #2961, for example).

But This automatic upgrade behavior can is annoying, if you just want to try out a new release of Subversion without Insta Lling it permanently. For this reason, we distribute a script which can downgrade working copies when doing so is safe:

Run ' script with the '--help option to ' to ' As future versions of Subversion are released, we'll try to keep this FAQ entry up-to-date with potential downgrade Scen Arios and their implications.

Script Source:

#!/usr/bin/env python


# The format of a Subversion working copy.


# ====================================================================

# Licensed to the Apache Software Foundation (ASF) under one

# or more contributor license agreements. The NOTICE file

# distributed with this work for additional information

# regarding copyright ownership. The ASF licenses this file

# to you under the Apache License, Version 2.0 (the

# "License"); The May is not with this file except in compliance

# with the License. You could obtain a copy of the License at




# unless required by applicable and agreed to in writing,

# Software distributed under the License is distributed on

# ' As is ' basis, without warranties OR CONDITIONS of any

# KIND, either express or implied. The License for the

# specific language governing permissions and limitations

# under the License.

# ====================================================================

Import Sys

Import OS

Import getopt


My_getopt = getopt.gnu_getopt

Except Attributeerror:

My_getopt = getopt.getopt

### The entries file parser in subversion/tests/cmdline/svntest/

### handles the xml-based WC entries file format used by Subversion

### 1.3 and lower. It could be rolled to this script.

Latest_formats = {"1.4": 8,

"1.5": 9,

"1.6": 10,

# do not add format one here. Comment in Must_retain_fields

# for why.


def usage_and_exit (Error_msg=none):

"" "Write usage information and exit. If Error_msg is provide, that

The error message is printed-A-stderr, the usage info goes to

STDERR, and the script exits with a Non-zero status. Otherwise,

Usage info goes to stdout and the script exits with a zero status. "" "

Progname = Os.path.basename (sys.argv[0])

stream = Error_msg and Sys.stderr or sys.stdout

If error_msg:

Stream.Write ("ERROR:%s/n/n"% error_msg)

Stream.Write ("")/

Usage:%s Wc_path svn_version [--verbose] [--force] [--skip-unknown-format]


Change the format of "a Subversion working copy to" of Svn_version.

--skip-unknown-format:skip directories with unknown working copy

Format and continue the update

"" "% (Progname, progname))

Stream.flush ()

Sys.exit (error_msg and 1 or 0)

Def get_adm_dir ():

"" "Return the name of Subversion ' s administrative directory,

Adjusted for the SVN_ASP_DOT_NET_HACK environment variable. The

For details. "" "

Return "Svn_asp_dot_net_hack" in Os.environ and "_svn" or ". SVN"

Class Wcformatconverter:

"Performs WC format conversions."

Root_path = None

error_on_unrecognized = True

force = False

verbosity = 0

def write_dir_format (self, FORMAT_NBR, dirname, Paths):

"" "attempt to write the WC format FORMAT_NBR to the entries file

For DirName. Throws lossyconversionexception when isn't in--force

mode, and unconvertable WC data is encountered. "" "" "

# Avoid iterating in unversioned directories.

If not (Get_adm_dir () in paths):

Del paths[:]


# Process The entries file for this versioned directory.

If self.verbosity:

Print ("Processing directory '%s '% dirname)

Entries = Entries (Os.path.join (dirname, Get_adm_dir (), "entries"))

entries_parsed = True

If self.verbosity:

Print ("Parsing file '%s '% Entries.path)


Entries.parse (self.verbosity)

Except Unrecognizedwcformatexception, E:

If self.error_on_unrecognized:


Sys.stderr.write ("%s, skipping/n"% e)

Sys.stderr.flush ()

entries_parsed = False

If entries_parsed:

Format = Format (Os.path.join (dirname, Get_adm_dir (), "format")

If self.verbosity:

Print ("Updating file '%s '% Format.path)

Format.write_format (FORMAT_NBR, self.verbosity)


If self.verbosity:

Print ("Skipping file '%s '% Format.path)

If self.verbosity:

Print ("Checking whether WC format can be converted")


Entries.assert_valid_format (FORMAT_NBR, self.verbosity)

Except Lossyconversionexception, E:

# in--force mode, ignore complaints about lossy conversion.

If Self.force:

Print ("WARNING:WC format conversion'll be lossy.") Dropping "/

' Field (s)%s '% ', '. Join (E.lossy_fields)



If self.verbosity:

Print ("Writing WC format")

Entries.write_format (FORMAT_NBR)

def change_wc_format (self, FORMAT_NBR):

"" "Walk all paths in a WC tree, with change their format to

Format_nbr. Throw lossyconversionexception or Notimplementederror

If the WC format should not being converted, or is unrecognized. "" "

For Dirpath, dirs, the files in Os.walk (Self.root_path):

Self.write_dir_format (FORMAT_NBR, Dirpath, dirs + files)

Class Entries:

"" "represents a. svn/entries file.

' The entries file ' section of Subversion/libsvn_wc/readme is a

Useful reference. "" "

# The name and index of each field composing a entry ' s record.

Entry_fields = (






































# The format number.


# How many bytes the format number takes in the file. (The format number

# may have leading zeroes after the using this script to convert format

# format 9--which would write the format number as ' 09 '.

Format_nbr_bytes =-1

def __init__ (self, Path):

Self.path = Path

Self.entries = []

Def parse (self, verbosity=0):

"" "Parse the entries file. Throw Notimplementederror if the WC

The format is unrecognized. "" "

input = open (Self.path, "R")

# Read WC format number from INPUT. Validate that it

# is a supported format for conversion.

Format_line = Input.readline ()


SELF.FORMAT_NBR = Int (format_line)

Self.format_nbr_bytes = Len (Format_line.rstrip ()) # Remove '/n '

Except ValueError:


Self.format_nbr_bytes =-1

If not SELF.FORMAT_NBR in Latest_formats.values ():

Raise Unrecognizedwcformatexception (SELF.FORMAT_NBR, Self.path)

# Parse file into individual entries, to later inspect for

# non-convertable data.

Entry = None

While True:

Entry = Self.parse_entry (input, verbosity)

If entry is None:


Self.entries.append (Entry)

Input.close ()

def assert_valid_format (self, FORMAT_NBR, verbosity=0):

If verbosity >= 2:

Print ("Validating format for entries file '%s '% Self.path)

For entry in Self.entries:

If verbosity >= 3:

Print ("Validating format for entry '%s '% entry.get_name ())


Entry.assert_valid_format (FORMAT_NBR)

Except lossyconversionexception:

If verbosity >= 3:

Sys.stderr.write ("offending entry:/n%s/n"% entry)

Sys.stderr.flush ()


def parse_entry (self, input, verbosity=0):

"Read a individual entry from INPUT stream."

Entry = None

While True:

line = Input.readline ()

If line in ("", "/x0c/n"):

# EOF or end of entry Terminator encountered.


If entry is None:

Entry = entry ()

# Retain The field value, ditching its field terminator ("/x0a").

Entry.fields.append (Line[:-1])

If entry is not None and verbosity >= 3:

Sys.stdout.write (str (entry))

Print ("-" * 76)

Return entry

def write_format (self, FORMAT_NBR):

# Overwrite All bytes of the format number (which are the

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.