[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: revision numbers in matlab

From: Erik Hemdal <erik_at_comprehensivepower.com>
Date: 2007-04-10 14:24:05 CEST

> Hi everyone,
>
> Does someone know how to include the revision number in a .m file?

I don't know the form of a .m file, so I can't help you there. If it's
text, you might be able to have SubWCRev work on it.

>
> I'm working on both windows and Linux.
> I try the SubWCRev.exe on windows and it works fine. But I
> don't know how to run it automatically.

I've experimented with SubWCRev.exe and it works well. To make it
automatic, I have to change my build process so that one of the build steps
is to run SubWCRev with appropriate parameters. The help files for
TortoiseSVN do a good job of explaining how it works. But making it
automatic depends on what kind of build tools you use. If you are using
Matlab, perhaps there is a way to set build options, or run an external
command from within Matlab.

Bear in mind that SubWCRev gets information about the working copy, and not
the repository. Also it needs to run against a working copy, so if you are
in the habit of doing an SVN Export and then working on code, it can't keep
its information updated.

Trying to run SubWCRev from a pre-commit hook script is not a good idea, if
I am remembering right. You will likely want to keep the revision-number
file under SVN control, and using SubWCRev will end up making the local copy
of the file different from what is in the repository. If you search the
list archives, you'll find several posts that discuss this and good
explanations about the hook scripts.

I hope this helps. Erik

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Apr 10 14:24:37 2007

This is an archived mail posted to the Subversion Users mailing list.