Hook into commit to create a version text file?

Thanks to the kind folks here on EE, I am now able to run the following from a command prompt:

C:\>svnversion.exe -n MasterDev_SVN > MasterDev_SVN\MasterDev\Website\Campus~1\v
er.txt

and it will create a text file with information on what revision I am on:

1:36M

(as an example)



My question now becomes...how can I make the creation of this file automatic when I do a SVN Commit?


I recently did something like this where SVN would not allow me to edit an existing log file and I created a batch file to override that restriction.

I imagine the same thing applies here....I just need some guidance....detailed guidance please.  :)   :P
LVL 5
Tom KnowltonWeb developerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NetExpert-WarszawaCommented:
You do not want to execute it on commit. You do not need the file in a repository. You need to create a file only for a copy running on a web server. Create it there every time after you update it.

What do you do to update the web server?
0
Tom KnowltonWeb developerAuthor Commented:
I am very confused.

>>>>You do not want to execute it on commit.

Why?

>>>>You do not need the file in a repository.

Why don't I?

>>>>You need to create a file only for a copy running on a web server. Create it there every time after you update it.

I only have SVN on my local machine.  That is where I do my commits.



>>>What do you do to update the web server?


I create a remote connection to the web server and then copy the files from my development machine  up to the web server.
0
NetExpert-WarszawaCommented:
>>>>You do not want to execute it on commit.

Before a commit it would generate not the revision number you want. If you execute it after a commit, you would need another one to save it to a SVN repository.

>>>>You do not need the file in a repository.

because SVN has got this information anyway.

"I create a remote connection to the web server and then copy the files from my development machine  up to the web server."

Then create a batch file to copy the files and add executing svnversion at the end.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Tom KnowltonWeb developerAuthor Commented:
>>>>Then create a batch file to copy the files and add executing svnversion at the end.

I've been considering this for a while....perhaps it is time to go ahead and do it.


Thank you for the recommendations!!

Tom
0
Tom KnowltonWeb developerAuthor Commented:
thx
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Version Control

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.