Author Topic: Autoversioning and SVN  (Read 8216 times)

Offline Schyfis

  • Single posting newcomer
  • *
  • Posts: 6
Autoversioning and SVN
« on: June 12, 2009, 07:07:50 am »
I'm starting to work with SVN for the first time and am currently trying to set it up to play nice with the C::B autoversioning plugin.
I keep getting the error "Svn configuration files not found. Verify the Autoversioning svn directory."

I've installed TortoiseSVN as well as the SlikSVN svn command line utility, and both are on my system path. I've tried selecting the project folder as well as the .svn folder. Which folder am I to choose here?
One other question. With SVN enabled in the autoversioning plugin, will it commit automatically every time a file in the project is changed and saved?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Autoversioning and SVN
« Reply #1 on: June 12, 2009, 04:07:37 pm »
I have no knowledge of the "SVN enabled in the autoversioning plugin", but do you have svn.exe in your computer path? By default, TortoiseSVN does not supply an svn.exe.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Schyfis

  • Single posting newcomer
  • *
  • Posts: 6
Re: Autoversioning and SVN
« Reply #2 on: June 12, 2009, 05:26:00 pm »
Yes, svn.exe is in my computer path. I'm able to run it from the command line from any directory and I verified it through the Environment Variables dialog in Windows.

Quote
I have no knowledge of the "SVN enabled in the autoversioning plugin"

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Autoversioning and SVN
« Reply #3 on: June 12, 2009, 05:56:58 pm »
My next guess, is that the folder "C:\C++\Project" needs to be a SVN folder.

Tim S
« Last Edit: June 12, 2009, 05:58:56 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Schyfis

  • Single posting newcomer
  • *
  • Posts: 6
Re: Autoversioning and SVN
« Reply #4 on: June 12, 2009, 09:06:28 pm »
What do you mean by SVN folder? The ".svn" folder that TortoiseSVN created in my project folder?
Here's the process I went through to set things up:
  • Installed TortoiseSVN, Autoversioning plugin, and SlikSVN, then rebooted.
  • Made sure both the TortoiseSVN and the SlikSVN folders were on the path.
  • Set up a new repository using TortoiseSVN.
  • Created a new folder in the repository using the TortoiseSVN repo-browser.
  • Checked out the new folder over the project folder.
  • Used TortoiseSVN -> Add to add the content to the repository.
  • Committed everything.
  • Opened Code::Blocks and loaded my project.
  • Clicked Project and then Autoversioning.
  • Selected Yes to configure the project for autoversioning.
  • Checked "svn enabled."
  • Browsed for a directory.
  • Attempt 1: chose the project directory. Resulted in error.
  • Attempt 2: chose the .svn directory that TortoiseSVN created (Project/.svn/). Resulted in error.
  • Attempt 3: chose the repository, just for fun. Resulted in error.

The error is the same each time: "Svn configuration files not found. Verify the Autoversioning svn directory."
What am I doing wrong here?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Autoversioning and SVN
« Reply #5 on: June 12, 2009, 09:18:05 pm »
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).
« Last Edit: June 12, 2009, 09:22:51 pm by jens »

Offline Schyfis

  • Single posting newcomer
  • *
  • Posts: 6
Re: Autoversioning and SVN
« Reply #6 on: June 12, 2009, 09:32:47 pm »
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?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Autoversioning and SVN
« Reply #7 on: June 12, 2009, 10:00:06 pm »
Checkout your repo to a working copy, don't use your repo directly, and use the autoversioning plugin with your working copy.

Offline Schyfis

  • Single posting newcomer
  • *
  • Posts: 6
Re: Autoversioning and SVN
« Reply #8 on: June 12, 2009, 11:38:12 pm »
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.

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Autoversioning and SVN
« Reply #9 on: June 18, 2009, 10:49:26 pm »
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)
...

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>

if not then you need to correct your repo.