I usually check in a file at a particular location in my svn repo.
what svn command i can use to find the last checked in file? I always check in only one file
I usually check in a file at a particular location in my svn repo.
what svn command i can use to find the last checked in file? I always check in only one file
svn log
.
(But I suggest taking advantage of committing multiple files at once, with atomic commits.)
You can use the -l
option to limit the log entries to 1.
In fact, I would recommend viewing svn help log
and then choosing the options best for you, and then making an alias in your shell for your own frequent use.
To get the path of the last changed file, along with basic revision information, use
svn log -l1 -qv
(The -qv
is for quiet and verbose. They actually do different things, even though they sound contradictory.)
The output will look like
------------------------------------------------------------------------
r123 | JXG | 2010-03-03 11:23:47 +0000 (Wed, 03 Mar 2010)
Changed paths:
M /foo/bar/baz/qux.c
------------------------------------------------------------------------
If you absolutely, positively must have only the filename, you can run the output through grep
, awk
, basename
, or whatever tools you enjoy.
You probably want something like this:
svn log <repository> -l 1 -v