Differences between revisions 14 and 15
Revision 14 as of 2005-02-16 19:22:48
Size: 5618
Editor: 12
Comment:
Revision 15 as of 2005-02-22 19:24:53
Size: 9725
Editor: dD5E05CA3
Comment: Subversion client config
Deletions are marked like this. Additions are marked like this.
Line 125: Line 125:

= Subversion client config =
Add this to your subversion client configuration file:

Windows:
C:\Documents and Settings\yourname\Application Data\Subversion\config

{{{
[miscellany]
global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store build dist target
enable-auto-props = yes

[auto-props]
*.c = svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.cpp = svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.h = svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.dsp = svn:eol-style=CRLF
*.dsw = svn:eol-style=CRLF
*.sh = svn:executable;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
Makefile = svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.obj = svn:mime-type=application/octet-stream
*.bin = svn:mime-type=application/octet-stream
*.bmp = svn:mime-type=image/bmp
*.class = svn:mime-type=application/java
*.doc = svn:mime-type=application/msword
*.exe = svn:mime-type=application/octet-stream
*.gif = svn:mime-type=image/gif
*.gz = svn:mime-type=application/x-gzip
*.jar = svn:mime-type=application/java-archive
*.jpg = svn:mime-type=image/jpeg
*.jpeg = svn:mime-type=image/jpeg
*.pdf = svn:mime-type=application/pdf
*.png = svn:mime-type=image/png
*.tgz = svn:mime-type=application/octet-stream
*.tif = svn:mime-type=image/tiff
*.tiff = svn:mime-type=image/tiff
*.zip = svn:mime-type=application/zip
*.txt = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.xml = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.ent = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.dtd = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.xsd = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.xsl = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.wsdl = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.htm = svn:mime-type=text/html;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.html = svn:mime-type=text/html;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.css = svn:mime-type=text/css;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.js = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.jsp = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.txt = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.java = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.properties = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
}}}

Misc info

Whatever you do, don't checkout /jakarta/commons as you will be checking out a copy of every tag, trunk, and branch and it will take forever and a day. *Instead*, check out individual components, or (more likely) check out "trunks-proper" or "trunks-sandbox".

Checkout all components

svn co https://svn.apache.org/repos/asf/jakarta/commons/trunks-proper/ jakarta/commons/trunks-proper
svn co https://svn.apache.org/repos/asf/jakarta/commons/trunks-sandbox/ jakarta/commons/trunks-sandbox

Checkout individual components''' ''(Don't forget to checkout commons-build!)

svn co https://svn.apache.org/repos/asf/jakarta/commons/proper/commons-build/trunk jakarta/commons/trunks-proper/commons-build
svn co https://svn.apache.org/repos/asf/jakarta/commons/proper/dbcp/trunk jakarta/commons/trunks-proper/dbcp

svn co https://svn.apache.org/repos/asf/jakarta/commons/proper/commons-build/trunk jakarta/commons/trunks-sandbox/commons-build
svn co https://svn.apache.org/repos/asf/jakarta/commons/sandbox/cache/trunk jakarta/commons/trunks-sandbox/cache

== Getting directory listings==

If you don't know the exact path to the component you wish to access, use 'svn ls' to get a directory listing, eg:

svn ls http://svn.apache.org/repos/asf/jakarta/commons

A web browser can also be used to view the repository structure, just by entering the URL that you would use for subversion operations. Note that this shows only the latest version of everything (directories and files).

Importing

svn import https://svn.apache.org/repos/asf/jakarta/commons/sandbox/PROJECT_NAME/trunk

Where PROJECT_NAME is the name of the package you want to import.

Differences between CVS and SVN

Normally CVS "tags" are simply used to mark a set of files so that you can retrieve that same set later. In this case, the equivalent in subversion is just to use

  • svn cp {from} {to}

eg

to save the current state of the trunk as a directory "beta1". The copy command makes a "light-weight copy", essentially a sort of hard link with copy-on-write so updates don't affect the original source.

If the trunk versions move on, and you later want beta1 to include one of the updated files, then update what "beta1" refers to by relinking from the beta1 directory to the version you really want:

[1] or if you have a working copy of the tag dir, you can

  • do svn rm and svn commit

[2] if you want the latest version, just omit the -r 100. [3] or if you have a working copy of the tag, copy to your working

  • copy then svn commit it.

Performing the copy again (ie linking to the *updated* file [together with its history] from the tag) is what Brett means by "copy with history again". Using "svn merge" doesn't do the same thing, because it is effectively generating a patch file then applying it to your version; the differences get merged in, but not the history.

Alternatively, if the "updated" tag is meant to look mostly or completely like the new trunk, then just use "svn update" to ensure your trunk working copy looks like the stuff you want to tag, then delete the old "beta1" directory, and recreate it. Copies are cheap!

There isn't any difference between a directory created with the intent of just using it as a "tag" and a directory created with the intent of using it as a branch. The convention of putting the scn copy into subdirs "{project}/branches" and "{project}/tags" are traditionally used to *indicate the intent* of the copy, but they are functionally identical.

For some other traditional uses of CVS tags, it might be better to use subversion "properties" (see svn set-prop).

Maven config

project.properties

maven.changelog.factory=org.apache.maven.svnlib.SvnChangeLogFactory

project.xml

  <repository>
   <connection>scm:svn:http://svn.apache.org/repos/asf/jakarta/commons/proper/${pom.artifactId.substring(8)}/trunk</connection>
    <url>http://svn.apache.org/repos/asf/jakarta/commons/proper/${pom.artifactId.substring(8)}/trunk</url>
  </repository>

Commons repo

Software

If you are trying to get the latest version of subeclipse, do not use Eclipse's "search for updates of existing features", instead use "search for new features." Eclipse kept telling me that there was no version greater than 0.9.22 while this fellow was telling me he'd just released 0.9.26. Running search for new features against the subversion.tigris.org site quickly found what I was looking for. Any jakarta-commons devs who want to try subeclipse but are stuck on 0.9.22 should try this.

Documentation

Subversion client config

Add this to your subversion client configuration file:

Windows: C:\Documents and Settings\yourname\Application Data\Subversion\config

[miscellany]
global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store build dist target
enable-auto-props = yes

[auto-props]
*.c = svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.cpp = svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.h = svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.dsp = svn:eol-style=CRLF
*.dsw = svn:eol-style=CRLF
*.sh = svn:executable;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
Makefile = svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.obj = svn:mime-type=application/octet-stream
*.bin = svn:mime-type=application/octet-stream
*.bmp = svn:mime-type=image/bmp
*.class = svn:mime-type=application/java
*.doc = svn:mime-type=application/msword
*.exe = svn:mime-type=application/octet-stream
*.gif = svn:mime-type=image/gif
*.gz = svn:mime-type=application/x-gzip
*.jar = svn:mime-type=application/java-archive
*.jpg = svn:mime-type=image/jpeg
*.jpeg = svn:mime-type=image/jpeg
*.pdf = svn:mime-type=application/pdf
*.png = svn:mime-type=image/png
*.tgz = svn:mime-type=application/octet-stream
*.tif = svn:mime-type=image/tiff
*.tiff = svn:mime-type=image/tiff
*.zip = svn:mime-type=application/zip
*.txt = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.xml = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.ent = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.dtd = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.xsd = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.xsl = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.wsdl = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.htm = svn:mime-type=text/html;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.html = svn:mime-type=text/html;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.css = svn:mime-type=text/css;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.js = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.jsp = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.txt = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.java = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id
*.properties = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=LastChangedDate Date LastChangedRevision Revision Rev LastChangedBy Author HeadURL URL Id

UsingSVN (last edited 2012-02-09 17:41:22 by sebbapache)