My favorites | Sign in
Google
             
Search
for
Updated Oct 07, 2009 by azmatalipasha
SubversionFAQ  
Subversion FAQ

What version of Subversion do you use?

We currently use Subversion 1.6, made available via WebDAV.

Anonymous checkouts can be done via http://, while developers must use authenticated https:// to commit changes.

Do you have support for ViewVC or similar repository-browsing tools?

Support for tools such as ViewVC isn't implemented yet, but we do provide our own web-based source browsing. Source browsing can be accessed under the "Source" tab for each project, under the "Browse" sub-tab.

How can I make SVN serve HTML and images with the correct Content-Type?

You need to tell subversion what mime-type to use. Just use the command:

svn propset svn:mime-type 'text/html' FILENAME

or

svn propset svn:mime-type 'image/jpeg' FILENAME

For more info: http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html#svn.advanced.props.special.mime-type

It's also possible to configure your Subversion client to automatically set each file's mime-type. For example, by modifying ~/.subversion/config to resemble

[miscellany]
enable-auto-props = yes

[auto-props]
*.html = svn:mime-type=text/html

For more info: http://svnbook.red-bean.com/en/1.1/ch07.html#svn-ch-7-sect-1.3.2

How do I import my existing source code?

Just use the 'svn import' command. Note that this command only loads a single tree of code into your repository.

How do I import an existing Subversion repository?

To upload the history of an existing Subversion repository, use the svnsync tool that ships with Subversion 1.4 or later. Run svnsync help to read more about this tool.

Note that your Google Code repository must be reset to revision 0 for this to work. Your project's Source tab will display instructions on how to reset the repository yourself. (Note: you must be a project owner to reset your own repository, and also to push code up with svnsync.)

Here's a sample transcript that demonstrates how you can push history from an existing repository (located at file:///my/repos) to your repository on Google Code:

  $ svnsync init --username YOURUSERNAME https://YOURPROJECT.googlecode.com/svn file:///path/to/localrepos
  Copied properties for revision 0.
  $ svnsync sync --username YOURUSERNAME https://YOURPROJECT.googlecode.com/svn
  Committed revision 1.
  Copied properties for revision 1.
  Committed revision 2.
  Copied properties for revision 2.
  [...]

When prompted for your password, use your googlecode.com password, which can be found on the settings tab of your profile page.

Running svnsync on a large repository will take a significant amount of time. If you are disconnected during the process, you may see the error message "svnsync: Couldn't get lock on destination repos after 10 attempts". If this happens, you can remove the lock yourself; see the "Locks" section of svnsync.txt.

How can I import a CVS repository into my project?

The cvs2svn tool is a well-established tool to convert CVS history to Subversion history. Use it to create a Subversion repository, and then use the svnsync to push the Subversion history up to your Google Code repository. (See "How do I import existing Subversion history?")

How do I download my Subversion history?

To download the history of your Google Code repository, use the svnsync tool that ships with Subversion 1.4 or later. Run 'svnsync help' to read more about this tool. Note that your local repository must have an executable 'pre-revprop-change' hook script which allows revprop changes (or at least those of the form 'svnsync*'.) Here's a sample transcript that demonstrates how you can pull history from your Google Code repository to a local repository:

  $ svnadmin create localrepos
  $ emacs localrepos/hooks/pre-revprop-change # make it 'exit 0'
  $ chmod +x localrepos/hooks/pre-revprop-change
  $ svnsync init --username USERNAME file:///path/to/localrepos https://myproject.googlecode.com/svn
  Copied properties for revision 0.
  $ svnsync sync --username USERNAME file:///path/to/localrepos
  Committed revision 1.
  Copied properties for revision 1.
  Committed revision 2.
  Copied properties for revision 2.
  [...]

After you've done this once, you can continue to run the last 'svnsync sync' command to periodically pull down the latest commits and keep your local mirror up-to-date.

How much disk space can my repository use?

We're offering plenty of space for storing source code under revision control. We start new projects with a 1GB quota. That's enough to host the vast majority of open source projects. We're also willing to work with projects that need more space.

Where do I get a copy of Subversion?

Just visit the downloads page on http://subversion.tigris.org/.

Where can I get more info about using Subversion?

You might want to read the Subversion Book.

Can I use Microsoft Visual Studio with Google Code?

Yes. There are a number of Windows clients for Subversion: you can use the command-line client, though TortoiseSVN is a very popular client that integrates Subversion functionality directly into Windows Explorer. Another possibility is to use AnkhSVN, which is a Visual Studio plug-in that offers Subversion access within the IDE.

Can I set fine-grained path access controls in the Subversion repository?

No. While corporate software projects tend to revolve around fine-grained access control to source code, we don't think that this is the most productive practice for open source development. In an open source project, the code is entirely public and the developer community should be based on trust. If your community invites someone to be a project member, then it's a collective statement that your community trusts the person with write access to the repository. If the community feels that the person should only change certain portions of the source code, then that expectation should be made clear. If the new member violates this social contract, the community is free to expel the member and revert any unwanted commits.

Where do I get a password for committing to Subversion?

If you're a project owner or committer, just look at your "Settings" tab of your profile page. It will display your googlecode.com password. This password is used for access to your project's Subversion repository and for command-line file uploads to your project's Downloads area. This password is not the same as the password that you use to access your project on the web.

Why is my Subversion password different from my Google Account password?

The default for many svn clients is to automatically cache the password on your local disk. Your Google Account password is much too valuable to expose in this manner. So while there is an inconvenience for users with clients that do not automatically cache the password, the risk it avoids in the other clients is worth it.

Why can't I set my own Subversion password?

For the reasons mentioned above, we would prefer this password to be thought of in the same way as a temporary password sent via email. It has a similar level of security in that it is potentially accessible by third-parties as plain text. Allowing users to set their own password is likely to encourage them to divulge their Google Account or other high risk passwords.

How do I change my Subversion password?

The "Settings" tab of your profile page has a button to automatically regenerate your googlecode.com password.

How do I check out code anonymously?

You can use a Subversion client to check out a project's "trunk" code by requesting this URL: http://projectname.googlecode.com/svn/trunk

How do I check code into the repository?

You can use the 'svn import' command, just as you'd do with any typical Subversion repository.

How can I reset the repository?

If you're a project owner, you can click on the "reset this repository" link at the bottom of the "Source" tab's page.

How do I give new developers check-in privileges?

If you're a project owner, just go to the project's "Administer" tab and add people as project members.

How do I take away check-in privileges of a developer who's no longer participating in the project?

If you're a project owner, just go to the project's "Administer" tab and remove that person's project membership.

What does "use the fingerprint to validate the certificate manually" mean?

If you get a message such as the following:

  Error validating server certificate for 'https://projectname.googlecode.com:443':
   - The certificate is not issued by a trusted authority. Use the
     fingerprint to validate the certificate manually!

...you should check that the "fingerprint" or "SHA1 fingerprint" given for the certificate is:

B1:3A:D5:38:56:27:52:9F:BA:6C:70:1E:A9:AB:4A:1A:8B:DA:FF:EC

If it is not, please contact us via our Google Group or email google-code-hosting@googlegroups.com directly to discuss the situation.

Does Google own the code that I check into Subversion?

Hosting your code on Google Code doesn't change ownership of the code in any way.


Comment by junrui.tao, Oct 27, 2009

I've trouble with checking out code anonymously.

e.g. svn checkout http://cath.googlecode.com/svn/trunk/ cath-read-only

gives error message:

Error PROPFIND of '/svn/trunk': 200 OK (http://cath.googlecode.com)

Comment by thetoolman, Nov 20, 2009

RE: "How do I download my Subversion history?" - this line: emacs localrepos/hooks/pre-revprop-change # make it 'exit 0'

The single line file was not working, causing this error:

svnsync: Revprop change blocked by pre-revprop-change hook (exit code 255) with no output.

The file needs 2 lines, namely:

#!/bin/bash exit 0

to work correctly.

Comment by m.kurlin, Dec 02, 2009

Hello have to use the CVSROOT format for native cvs in Netbeans. There are two possibilities: pserver and ext. I have a problem to build the location, which schould look like: :pserver:username@hostname:/repository_path What is the hostname, what is the repository_path in google code? And which server is it? Thanks a lot!

Comment by vigacmoe, Dec 03, 2009

How do I commit code to a specific issue? So that in the detail page of an issue, I can see what changes has been committed for it.


Sign in to add a comment