Author Topic: autoversioning svn directory  (Read 4297 times)

Offline Joerg

  • Multiple posting newcomer
  • *
  • Posts: 100
autoversioning svn directory
« on: June 03, 2008, 11:32:43 am »
hi,

I enabled the autoversioning plugin for my project,
because I want to show the SVN revision number to the user.
But when I select the .svn directory as the 'current svn directory'
I get an error: 'SVN configuration files not found'.
Where should I point to for the plugin to get the information?
Regards,
Joerg
It's never too late to fail!

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: autoversioning svn directory
« Reply #1 on: June 04, 2008, 10:55:27 pm »
HI!

Make sure you have the command version of svn installed and added to your system path, since autoversioning uses it to fetch the revision.
Also you should add the directory that has the .svn folder not the .svn itself, for example with codeblocks main sources:

codeblocks-head/trunk  //This is the directory you will add to fetch the revision not codeblocks-head/trunk/.svn

Good:
codeblocks-head/trunk              //has .svn inside

Wrong:
codeblocks-head/trunk/.svn      //Also works but it looks better codeblocks-head/trunk  :wink:

good luck!  :)

Offline Joerg

  • Multiple posting newcomer
  • *
  • Posts: 100
Re: autoversioning svn directory
« Reply #2 on: June 05, 2008, 02:33:07 pm »
Thanks,

I needed to install the svn command line.
We're using TortoiseSVN for daily work.
Now I got:
//SVN Version
static const char SVN_REVISION[] = "644";
static const char SVN_DATE[] = "2008-06-03T09:05:30.498271Z";
in my version.h.
The time stamp looks a little bit to precisely  ;-)
It's never too late to fail!

Offline jfouche

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: autoversioning svn directory
« Reply #3 on: June 05, 2008, 08:22:27 pm »
Hi JGM

I didn't have look to the svn capabilities of your plugin since I read this topic.
So I tried it, but I have a little problem (is it really one ?).

I put [..] as the current svn directory, because the trunk dir is .. relative to my workspace (and my version.h file also). My problem is that the revision in the version.h file is 1, because the revision of the trunk directory is 1. How can I configure your plugin to see the latest revision, which is greater than the trunk dir itself. I know that there are files in subdirectories that have greater revisions.
If I understand well svn, the trunk dir doesn't change revision because the content of this (and only this) directory doesn't changes.

using svn info, I can read :
Code
trunk               (revision 1)
  + src             (revision 2)
  | + wx_pch.h      (revision 17)
  | + ....
  + doc             (revision 2)
Have you got an idea of my misteak ?
--
Jérémie
« Last Edit: June 05, 2008, 08:45:44 pm by jfouche »

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: autoversioning svn directory
« Reply #4 on: June 05, 2008, 10:10:17 pm »
Have you got an idea of my misteak ?

Well I'm not an expert on svn, my guess is that you have multiple repositories configurations on top of other repository  :?
Just try to use a  sub directory on your trunk and test the results on the plugin. Also I think that svn fetches the main revision not the revision of individual files. But experimenting is the best choice also this is a great resource http://svnbook.red-bean.com/ I have to completely read that book  :D

Offline jfouche

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: autoversioning svn directory
« Reply #5 on: June 06, 2008, 06:58:51 pm »
Hi JGM

Your link is very interesting and useful
reading the Global Revision Numbers pink box, I see that your must be right, there must be a problem in my repository.
I use VisualSvn server on WinXP, I going to look deeper to it.
Thanks
--
Jérémie