User Tools

Site Tools


svn

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
svn [2008/01/07 16:19] damirsvn [2010/05/06 10:41] damir
Line 16: Line 16:
 For group projects, it is better to use the common repository which is For group projects, it is better to use the common repository which is
   * for algo: <nowiki>svn+ssh://USERNAME@clusteralgo.epfl.ch/SVN/trunk</nowiki>   * for algo: <nowiki>svn+ssh://USERNAME@clusteralgo.epfl.ch/SVN/trunk</nowiki>
-  * for licos: <nowiki>svn+ssh://USERNAME@licos.epfl.ch/SVN/trunk</nowiki>+  * for licos: <nowiki>svn+ssh://USERNAME@lth.epfl.ch/svnlicos/</nowiki>
   * for lth: <nowiki>svn+ssh://USERNAME@lth.epfl.ch/svnlth/</nowiki>   * for lth: <nowiki>svn+ssh://USERNAME@lth.epfl.ch/svnlth/</nowiki>
   * for lcm: <nowiki>svn+ssh://USERNAME@lth.epfl.ch/svnlcm</nowiki>   * for lcm: <nowiki>svn+ssh://USERNAME@lth.epfl.ch/svnlcm</nowiki>
 +  * for arni: <nowiki>svn+ssh://USERNAME@lth.epfl.ch/svnarni</nowiki>
  
 ===== Quick User Guide ===== ===== Quick User Guide =====
Line 139: Line 140:
 ------------------------------------------------------------------------ ------------------------------------------------------------------------
 </code> </code>
 +
 +===== New Repositories =====
 +
 +you can always create a personal repository in your homedir by doing:
 +
 +  - ssh into server: <code>ssh lth.epfl.ch</code>
 +  - Create empty repository: <code>svnadmin create <name_of_repository></code> 
 +
 +<note>
 +General repositories, that needs to be available (under lth.epfl.ch/svn<LABNAME>/) can be created only by the sysadministrators.
 +</note>
 +
  
 ===== Few general recommendations ===== ===== Few general recommendations =====
-  - try to import into subversion ONLY the SOURCES and not the files that are generated from the sources;+  - try to import into subversion ONLY the SOURCES and not the files that are generated from the sources; use [[makegallery|Makefiles]] for automatically generating dependent files from sources.
   - try to keep the repository as clean as possible. If the repository is shared among various users, it is better to meet once and agree on a common strategy for file/directories naming schemes;   - try to keep the repository as clean as possible. If the repository is shared among various users, it is better to meet once and agree on a common strategy for file/directories naming schemes;
   - Unless you have a good reason, do not commit incomplete or buggy files;   - Unless you have a good reason, do not commit incomplete or buggy files;
   - **Important: filesystem compatibility**. Like any other file synchronizer, SVN gets into troubles when you try to synchronize (i.e., checkout or update) a directory where you you make explicit use of case sensitiveness for file names. While filesystems on linux (and most unix variants) are case sensitive, all filesystems on Windog and the default one on Mac OsX are case insensitive.  This means, for example, that file ''fig1.eps'' and file ''Fig1.eps'' are two distinct files under Linux, but they are mapped to the same physical file, and therefore they cannot co-exist under OsX.   - **Important: filesystem compatibility**. Like any other file synchronizer, SVN gets into troubles when you try to synchronize (i.e., checkout or update) a directory where you you make explicit use of case sensitiveness for file names. While filesystems on linux (and most unix variants) are case sensitive, all filesystems on Windog and the default one on Mac OsX are case insensitive.  This means, for example, that file ''fig1.eps'' and file ''Fig1.eps'' are two distinct files under Linux, but they are mapped to the same physical file, and therefore they cannot co-exist under OsX.
  
 +===== Various Tips & Tricks =====
 +==== Global Configuration ====
 +Every user has a personal global SVN configuration file which resides in ''~/.subversion/config''. This file defines options that are valid for all repositories that the user works with. 
 +
 +The two most useful options are probably ''global-ignores'' and ''autoprops''. ''global-ignores'' defines a list of filename patterns that Subversion will ignore. For example, you can set it to
 +<code>
 +global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store \
 + .*.swp *.dvi *.aux *.log *.bbl *.blg *.idx *.ind *.ilgglobal-ignores = *.o *.lo *.la #*# 
 +</code>
 +to ignore the specified files. The command ''svn status'' will then no longer display these types of files preceded with a question mark if they are not in a repository.
 +One should be careful with ''*.log'' as its possible there are files other than LaTeX processing files which end in ''.log''. To see which files are being ignored in a given directory, type 
 +  svn st --no-ignore
 +
 +The option ''autoprops'' causes Subversion to automatically set pre-defined properties for files whose names satisfy a given pattern. For example,
 +<code>
 +[auto-props]
 +*.m = svn:keywords=Id
 +*.tex = svn:keyword=Id
 +</code>
 +makes Subversion to automatically set the ''Id'' keyword for all .m and .tex files that are added to a repository. (The ''Id'' keyword tells Subversion that the string ''$Id$'' in a file should be expanded to something like
 +  $Id: sufficiency.tex 372 2008-02-11 16:10:53Z kleiner $
 +
 +==== Per-Directory Ignore List ====
 +While the ''global-ignores'' option explained above already covers a lot of cases, there are situations where you want Subversion to ignore a file that you cannot put in the global ignore list. For example, in a directory that contains a tex file, you'll want Subversion to ignore the corresponding ps or pdf files. Since you don't want Subversion to ignore //all// ps and pdf files everywhere, you cannot use ''global-ignores''. However, each directory in a Subversion repository has its own //ignore list//. You can edit a directory's ignore list by typing
 +  svn propedit svn:ignore .
 +(the ''.'' is part of the command; it indicates the current directory). This will fire up an editor (the one defined in the ''$EDITOR'' environment variable), in which you can then edit  and save the directory's ignore list. 
svn.txt · Last modified: 2012/02/17 15:54 by damir