l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2005 Dec 15 12:56

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] subversion: print non-versioned files in directory
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] subversion: print non-versioned files in directory

On Thu, Dec 15, 2005 at 12:50:01PM -0500, Peter Jay Salzman wrote:
> hi all,
> i've been using subversion for a little while now, and everytime i do, i
> thank my lucky stars.  it completely blows away cvs in every way.
> one thing i'm not seeing is how to get svn to print out files that are not
> under version control.
> for example, suppose you do a global "cvs commit" and there's a file named
> 'foo' in the directory but it isn't in the cvs repository.  cvs will print:
>    satan$ cvs commit
>    ? foo
>    satan$
> however, svn is silent about such files.  i almost always do NOT want to see
> files like foo, but sometimes i DO want to see which files are present but
> not in subversion's repository.
>    satan$ svn commit
>    satan$
> is there a way to print such files in subversion?
> thx,
> pete

Hi Pete.  I think what you're looking for is the 'svn status' command.
In addition to showing you any files that have been modified locally,
any files that are not present in the repository will be indicated by a
question mark.  For example:

    $ svn status
    M      file1
    M      file2
    ?      file3
    ?      file4

shows that file1 and file2 are in the repository but have local
modifications while file3 and file4 are not in the repository yet.

Since it's quite common to have a bunch of "junk" files sitting in your
directory that you don't care about (e.g., .o, .c~, etc.), subversion
allows you to set a property on a directory that tells it names/patterns
of files to ignore.  You can do this by running 

    svn propedit svn:ignore .
This should load up $EDITOR to allow you to edit the property list
(which will be empty the first time you do this); just enter a list of
filenames (wildcards okay) that you want ignored by subversion (one
filename per line), and they will no longer appear in the output of the
'svn status' command.  After entering the filenames and then saving and
closing the editor, run the 'svn status' command again and the names you
entered should be omitted.

One minor note with the "svn propedit" command:  I always do an "svn
commit" followed by an "svn update" immediately before and after using
the propedit command.  Subversion can get confused if you wind up trying
to commit changes to files and to directory properties at the same time
-- it's best to make sure that you commit property changes separately
from anything else you're doing.

Hope that helps.



* Matt Roper <matt@mattrope.com>                *
* http://www.mattrope.com                       *
* PGP Key: http://www.mattrope.com/mattrope.asc *
vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.