User forums > Help

Autoversioning and SVN

<< < (2/2)

Jenna:
Do you use your svn-repo or your working copy ?

A quick test with the C::B sources orks.

I do not use the projects root directory, but the root directory of one of my working copies of my C::B sources (that might be the same in your case).

EDIT:
not yet tested on windows (w2k with TortoiseSVN and SlikSVN), only and on linux (subversion).

Schyfis:
I'm quite confused.
My repository is located at C:\C++\svn, but the repo-browser lists a C:\C++\svn\Project that doesn't seem to exist when viewing the C:\C++\svn folder with Windows explorer. Is that the one I'm supposed to select? If so, how am I supposed to select it since Windows doesn't see it?

Jenna:
Checkout your repo to a working copy, don't use your repo directly, and use the autoversioning plugin with your working copy.

Schyfis:
I committed everything and checked out into a new folder. Then I opened the project in that folder and set the autoversioning plugin's svn directory to the same folder, but I got the same error.

JGM:
What version of windows are you running? from the screen shot i can tell it could be vista or windows 7.

The command that the autoversioning plugin uses to fetch the revision is:

svn info --xml --non-interactive

when this command returns nothing reasonable the plugin returns that error message.


Here part of the code that fetch svn revision.

--- Code: ---...
wxString svncmd = _T("svn info --xml --non-interactive ");
svncmd.Append(_T("\"") + workingDir + _T("\""));
wxArrayString xmlOutput;

if (wxExecute(svncmd, xmlOutput) != -1)
...

--- End code ---

This returns xml code that is parsed to get and produce the variable that holds the revision.

This works correctly on linux (unix systems), windows xp and earlier windows editions, haven't tested it on newer windows editions.

A wild guess is that on windows vista or windows 7 it's needed the full path to the svn executable something like this:

wxString svncmd = _T("\"C:\\Program Files\\svn\\bin\\svn.exe\" info --xml --non-interactive ");

Also to clear things out, the directory you use when enabling svn revision check generator is the root directory that holds the .svn directories.

For example having this directory:
/my-projects/project/.svn

you would use:
/my-projects/project

Yo could try in the command prompt this:
cd C:\C++\Project
svn info --xml --non-interactive

That should return something like:

--- Code: ---<?xml version="1.0"?>
<info>
<entry
   kind="dir"
   path="."
   revision="5658">
<url>http://svn.berlios.de/svnroot/repos/codeblocks/trunk</url>
<repository>
<root>http://svn.berlios.de/svnroot/repos/codeblocks</root>
<uuid>98b59c6a-2706-0410-b7d6-d2fa1a1880c9</uuid>
</repository>
<wc-info>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
   revision="5657">
<author>mortenmacfly</author>
<date>2009-06-18T08:23:58.563530Z</date>
</commit>
</entry>
</info>

--- End code ---

if not then you need to correct your repo.

Navigation

[0] Message Index

[*] Previous page

Go to full version