You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Thamm, Russell" <ru...@dsto.defence.gov.au> on 2004/02/03 05:31:35 UTC

Determining locally modified files

Hi,

I have a program that I use for packaging applications (binaries) and checking them
into a repository (not subversion). I want to record the revision of my source files that correspond
to the binaries in the package. I do use Subversion for my source files.

My program needs to ensure that the source files in the Local Working Copy are not locally modified
and are all at the same revision. If this is so, that revision will be recorded in the package, otherwise
the operation will fail. 

I am not using the subversion libraries in my program.

My basic question is:

What is the recommended way to determine if a source file is locally modified? There seems to be several
ways to do this (eg checksum, modification date, file compare etc).

thanks
Russell Thamm



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Determining locally modified files

Posted by Ben Collins-Sussman <su...@collab.net>.
> Not sure if this helps, but it sounds like you're describing what you 
> can get via the 'svnversion' command.

By definition, 'svn up' will force your working copy to be all at the 
same working revision.  And beyond that, 'svn status' will tell you if 
any working files are locally modified.  If 'svn status' is silent, you 
have no local mods.

But the easiest way to check both things is to run the 'svnversion' 
program on the root of your working copy:  if it prints a single 
revision number which is *not* followed by an "M", then you know your 
working copy is at one revision with no local mods.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Determining locally modified files

Posted by Steven Brown <sw...@ucsd.edu>.
Thamm, Russell wrote:

> My program needs to ensure that the source files in the Local Working Copy are not locally modified
> and are all at the same revision. If this is so, that revision will be recorded in the package, otherwise
> the operation will fail. 

Not sure if this helps, but it sounds like you're describing what you 
can get via the 'svnversion' command.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Determining locally modified files

Posted by Florian Weimer <fw...@deneb.enyo.de>.
Thamm, Russell wrote:

> What is the recommended way to determine if a source file is locally
> modified?

You could parse the output of "svn status -v".

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Determining locally modified files

Posted by Barry Scott <ba...@barrys-emacs.org>.
Answer 1) Use svn export of a tag to do your build avoiding the need to check
for edits.

Answer 2) Use svn status to find any changes in the working copy vs. the BASE.

BArry

At 03-02-2004 05:31, Thamm, Russell wrote:
>Hi,
>
>I have a program that I use for packaging applications (binaries) and 
>checking them
>into a repository (not subversion). I want to record the revision of my 
>source files that correspond
>to the binaries in the package. I do use Subversion for my source files.
>
>My program needs to ensure that the source files in the Local Working Copy 
>are not locally modified
>and are all at the same revision. If this is so, that revision will be 
>recorded in the package, otherwise
>the operation will fail.
>
>I am not using the subversion libraries in my program.
>
>My basic question is:
>
>What is the recommended way to determine if a source file is locally 
>modified? There seems to be several
>ways to do this (eg checksum, modification date, file compare etc).
>
>thanks
>Russell Thamm
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: users-help@subversion.tigris.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org