Showing posts with label SVN. Show all posts
Showing posts with label SVN. Show all posts

July 22, 2011

SVN - Who has created the branch?

I wanted to get the author name who has created a branch in our SVN. With some doco read, I was able to find the answer.
svn log -r 1:HEAD --limit 1 --stop-on-copy
With --limit we can limit the number of results we get from the query, in this case we need only one.

When creating a branch we copy from another SVN location, thus --stop-on-copy comes handy here.

SVN Sparse Directories (partial checkouts)

SVN 1.5 introduces a feature called sparse directories (or shallow checkouts or partial checkouts) that allows you to easily check out a working copy or a portion of a working copy.

How do we do it? On the command prompt use the following commands:
# svn co --depth empty
# pushd
(Assume: foo is a folder in SVN. With the following command you will not get any leaf folders or files.)
# svn up --depth empty foo
(Assume: bar is a sub-folder in foo. With this you will get all from foo/bar)
#svn up foo/bar
(With the following command, you get the only the latest copies of the checked out folders from SVN)
# popd
# svn up
(You can also perform a SVN commit at this level)

Performing SVN checkout (co) for each and every folder you require from SVN is not the way to go, since you cannot do a global SVN update or a commit.