Source control, Subversion etc..

6 posts / 0 new
Last post
benzzon
benzzon's picture
Source control, Subversion etc..

*** CVS
About source code version control with CVS: http://www.tigris.org/scdocs/ddCVS
Några olika CVS-klienter: http://www.collab.net/downloads/tools/
PDF-manual för CVS: http://ftp.gnu.org/non-gnu/cvs/source/stable/1.11.21/cederqvist-1.11.21.pdf

*** Subversion vs CVS
Subversion Delivers Version Control that CVS Can't: http://www.devx.com/opensource/Article/27884/

*** Subversion
Subversion Project Home: http://subversion.tigris.org/

Subversion manual: http://svnbook.red-bean.com/
 
Subversion add-in for .NET: http://ankhsvn.tigris.org/
WinMerge, file comparison tool: http://winmerge.sourceforge.net/downloads.php (has support for unicode)

Ex på setup från Nygårds: http://www.ersysgroup.com/nicholas/installation/Subversion-SUSE-9.3-and-Apache-2

Intressanta länkar ang setup av Subversion/Apache på Windows
 
Ev hantering av sql-objekt med subversion: http://www.codeproject.com/cs/database/ScriptDB4Svn.asp
 
Global ignore pattern:
*.tmp *.bak *.dll *.tlb *.exe *.pdb *.incr buildinfo.inf */bin bin */obj obj *.~?? *.suo *.user *.webinfo *.rdl.data *resharper* .#* *ReSharper* Ankh.*Load
 
Subversion forum: http://www.svnforum.org/
 
Interesting info, link to "installer":
 
Subversion Repository Browsers:

Export all comments from commits in repository: svn log -v --xml > repository_log.xml
 
Setting Up and Running Subversion and Tortoise SVN with Visual Studio and .NET

*** GIT
http://www.hanselminutes.com/350/learning-how-to-learn-git-with-michael-sarchet

master: this is the main code branch, equivalent to trunk in Subversion. Branches are generally created off of master.
origin: the default remote repository that all your branches are pull'ed from and push'ed to. This is defined when you execute the initial git clone command.
unpublished vs. published branches: an unpublished branch is a branch that only exists on your local workstation, in your local repository. Nobody but you know that branch exists. A published branch is one that has been push'ed up to github, and is available for other developers to checkout and work on.
fast-forward: the process of bringing a branch up-to-date with another branch, by fast-forwarding the commits in one branch onto the other.
rebase: the process by which you cut off the changes made in your local branch, and graft them onto the end of another branch.
(from https://wiki.duraspace.org/display/FCREPO/Git+Guidelines+and+Best+Practices)

*** Moving from Subversion to Git:
http://jmoses.co/2014/03/21/moving-from-svn-to-git.html

*** BitBucket
https://bitbucket.org/benzzon

*** Using Git with Visual Studio 2013 Jump Start (videos)
http://www.microsoftvirtualacademy.com/training-courses/using-git-with-visual-studio-2013-jump-start
 

benzzon
benzzon's picture
.

*** Apache2 SSPI authentication module which let Apache2 users authenticate against Win32 domains: http://sourceforge.net/projects/mod-auth-sspi/


Be sure to set "SSPIOfferBasic on" to allow non-IE programs to access your repository.

Testa: #Require valid-user
SSPIDomain <domaincontroller>


You may need to experiment with the exact format of the user string in thesvnaccessfile (e.g. DOMAIN\user vs. DOMAIN//user) in order to get everything working.
 
kolla "error.log" igen..

Windows-verktyg för att köra inkrementell kopiering (typ rsync): http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp
Försöka fixa anrop till "SubWCRev" vid kompilering för att få med subversions revisionsnr..
http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-subwcrev.html

Subversion & "NAnt":
 
 
 
 
SVNIndexXSLT ..
benzzon
benzzon's picture
.

Subversion's repository database schema has changed occasionally during development. Old repositories, created with a pre-1.0 development version of Subversion, may require the following operation when upgrading. If a schema change happens between Subversion releases X and Y, then repository administrators upgrading to Y must do the following:

  1. Shut down svnserve, Apache, and anything else that might be accessing the repository.
  2. svnadmin dump /path/to/repository > dumpfile.txt , using version X of svnadmin.
  3. mv /path/to/repository /path/to/saved-old-repository
  4. Now upgrade to Subversion Y (i.e., build and install Y, replacing X).
  5. svnadmin create /path/to/repository, using version Y of svnadmin.
  6. svnadmin load /path/to/repository < dumpfile.txt , again using version Y of svnadmin.
  7. Copy over hook scripts, etc, from the old repository to the new one.
  8. Restart svnserve, Apache, etc.

See http://svnbook.red-bean.com/html-chunk/ch05s03.html#svn-ch-5-sect-3.4 for more details on dumping and loading.

benzzon
benzzon's picture
.
*** Cad-Q Subversion Environment 070903 (initial setup):
 
Apache v2.0.59
Subversion v1.4.0 (r21228)
 
Tortoise SVN v1.4.0.7501
 
*** Uppgradering som utförts:
 
"Apache v2.0.59" to "Apache v2.0.63" ("apache_2.0.63-win32-x86-no_ssl.msi")
"Subversion 1.4.0 (r21228)" to "Subversion 1.5.5 (r34862)" ("svn-win32-1.5.5.zip")
 
Suitable Tortoise-version: "TortoiseSVN-1.5.7.15182".
Suitable AnkhSVN for VS2002,VS2003: AnkhSVN-1.0.4 (VS2002,VS2003)
Suitable AnkhSVN for VS2005,VS2008: AnkhSvn-2.0.5250.202 (VS2005,VS2008)
 
*** Kommande uppgradering (tid för notering 2010-08-04):
(uppgraderingen kommer troligen göras via totalbackup av repositorys, därefter nyinstallation
av Apache+Subversion och tillbakaläsning av repositorys..)
"Apache v2.0.63" to "Apache v2.2.16"
"Subversion 1.5.5 (r34862)" to "Subversion 1.6.12 (r955767)". (releasen ifrån CollabNet..)
 
Sample on how to dump repository: "svnadmin dump g:\svn-reps\repository-name > testdump.db"
 
1. Stop Apache service.
2. Repository backup
3. Make backup of file "httpd.conf".
4. Un-install Apache v2.0.59, install Apache v2.063 with default options (port 80).
5. Check "httpd.conf" so that port 8080 is still configured.
6. Stop Apache-service and upgrade Subversion+Apache folders, copy files and settings as described in "readme.txt".
    A: Point "3c" should not be done as there is an external config-file "included"..
    B: Do NOT uncomment module "mod_dav.so", if uncommented Apache won't start..
7. Run "svnadmin upgrade <path-to-repository>" to upgrade db-format from v1.4 to v1.5.
8. Run "svn-populate-node-origins-index.exe" on repositories. (zip-file with exe+dll's has been prepared)
9. Start Apache-service.
10. Install Tortoise v1.5.x and test checkout/checkin.
11. Update "AnkhSVN", and any other Subversion-utils (http://sharpsvn.open.collab.net/)
 
 
benzzon
benzzon's picture
.
*** Generella rekommendationer för källkodsarkiv, subversion:
 
1. Undvik incheckning av kompilerade filer, zip-filer och större binära filer.
 
2. Använd inställningen "Global ignore pattern" i Tortoise.
    (jag har som exempel angivit "*.tmp *.bak *.dll *.tlb *.exe *.pdb *.incr buildinfo.inf */bin bin */obj obj *.~?? *.suo *.user *.webinfo
     *.rdl.data  *resharper* .#* *ReSharper* Ankh.*Load"
 
3. Inställningen "Use '_svn' instead of '.svn' directories" i Tortoise rekommenderas. Man undviker då problem med ASP & ASP.Net projekt.
    (för att växla efter en tids användning så behöver man radera sin "working copy/copies" och göra ny utcheckning!)
 
4. Döp ej kataloger och filer med versionsnr, källkodsarkivet har ju all historik.
    Textdokument innehållande versionsbeskrivningar är ju dock helt ok.
 
5. Checka inte in backup-kataloger, och backup-filer. Det hanteras ju av källkodsarkivet.
 
6. Tänk igenom din katalogstruktur som ska hanteras i källkodsarkivet, det är
    bökigt att ändra i efterhand.
 
7. Antalet Subversion-repositories bör begränsas, istället för ett repository per
    kund så rekommenderas att använda kataloger, och ett fåtal repositories som
    samlar kundgrupper. Ex.vis indelat på första bokstav i kundnamnet.
    Förslagsvis: "cust_proj_ad", "cust_proj_eh", "cust_proj_il", "cust_proj_mp", "cust_proj_qt", "cust_proj_ux", "cust_proj_yo".
    (motsvarande kundgrupper finns i ärendesystemet Jira.)
 
8. Läs subversion-manualen minst 1 gång!!
 
 
benzzon
benzzon's picture
.
For those who are upgrading Subversion, and are using Windows Authentication (SSPI) it
might be worth knowing that the setting "AuthAuthoritative" is no longer recognized
by Apache v2.2.x (my experience is from Apache v2.2.16 with Subversion v1.6.12..)
 
It seems that the setting "AuthBasicAuthoritative" is used instead with the newer version 2.2.x of Apache..
However i have not read anything that verifies this..