Video-Tutorial
Software Carpentry – Version Control with Subversion
General
What do “branch”, “tag” and “trunk” mean in Subversion repositories?
What is trunk, branch and tag in Subversion?
Externals
Externals Definitions
Adding an External Repository to an SVN Project
Properties / Eigenschaften
Eigenschaften
$ svn proplist -v .
$ svn propset <name> <value>
$ svn propedit
$ svn propdel
Branch and Merge
Versionskontrolle nach Art von Subversion
Verwenden von Zweigen
Subversion Howto Branch, Merge, Reintegrate
How do I make Subversion use a third-party diff tool?
Problems with Merging
Reintegrate can only be used if revisions X through Y were previously merged from to reintegrate the source, but this is not the case
svn merge with –reintegrate complains about missing ranges but mergeinfo seems correct
Subversion 1.5 Mergeinfo – Understanding the Internals
svn mergeinfo
Grundlegendes Zusammenführen – Mergeinfo und Vorschauen
# Get
$ svn propget -R svn:mergeinfo .
# Delete
$ svn propdel -R svn:mergeinfo .
# Commit
$ svn commit -m "removed property svn:mergeinfo from all files"
Fedora askpassword/pinentry GUI
How to disable pinentry-qt in fedora 20 for git-svn ?
Disable the pinentry GUI window (for ssh, svn+ssh, gpg, …) under Linux
$ ps aux | grep pinentry-gtk-2
andreas 15078 91.0 0.0 249508 2780 ? RL 11:13 22:19 /usr/bin/pinentry-gtk-2
$ export PINENTRY_USER_DATA="USE_CURSES=1"
$ unset GPG_AGENT_INFO
$ export | grep ask
declare -x SSH_ASKPASS="/usr/libexec/openssh/gnome-ssh-askpass"
$ unset SSH_ASKPASS
Migration
Subversion
$ svnadmin dump http://projectname.googlecode.com/svn > repodump
svnadmin: 'http://projectname.googlecode.com/svn' is an URL when it should be a path
> svnadmin create c:/rep_new
$ svnadmin create /home/svn/repo_new
> echo > c:\rep_new\hooks\pre-revprop-change.cmd
$ echo ‘#!/bin/sh’ > /home/svn/repo_new/hooks/pre-revprop-change
$ chmod +x /home/svn/repo_new/hooks/pre-revprop-change
> svnsync init file:///c:/repository https://example.googlecode.com/svn
$ svnsync init file:///home/svn/repo_new https://example.googlecode.com/svn
> svnsync sync file:///c:/repository
$ svnsync sync file:///home/svn/repo_new
git
How to migrate svn to another repository
Migrate to Git from SVN
SVN copy between repositories with history
1. Get a git svn clone of each repository:
git svn clone <SVN-REPOSITORY-FROM> source-repo
git svn clone <SVN-REPOSITORY-TO> dest-repo
2. Create patches to be imported:
cd source-repo/
export commitFrom=`git log --pretty=%H | tail -1`
git format-patch -o /tmp/mergepatchs ${commitFrom}..HEAD .
3. Import the patches
cd dest-repo/
git am /tmp/mergepatchs/*.patch
4. Check difference (= svn status)
git diff --name-status remotes/git-svn
5. Commit to remote repository
git svn dcommit
pitfalls svn -> git migration
After “git svn clone”, I still don’t have fantastic branch-merging commit?
Fixing SVN Merge History in Git Repositories
External Diff Program
Send your svn diff to meld
$ svn diff --diff-cmd='meld' file.c
How to make svn diff produce file that patch would apply, when svn cp or svn mv was used?
$ svn diff --diff-cmd /usr/bin/diff -x "-i -b -U" > mypatch
Unversioned Files
$ svn status --no-ignore | grep '^\?' | sed 's/^\? //'
$ svn status --no-ignore | grep '^\?' | sed 's/^\? //' | xargs -Ixx rm -rf xx
Delete Unversioned Files Under SVN
Keywords
Subversion Keywords: Id Rev Author Date
[miscellany]
enable-auto-props = yes
[auto-props]
*.c = svn:keywords=Author Date Id Rev URL;svn:eol-style=native
*.h = svn:keywords=Author Date Id Rev URL;svn:eol-style=native
Undo / revert commit
How do I return to an older version of our code in Subversion?
subversion: How to revert a bad commit
Reverting a Commit in Subversion
svn merge -r [current_version]:[previous_version] [repository_url]
svn commit -m “Reverting previous commit and going back to revision [previous_version].”
Add folder without included files
$ svn add --depth=empty <directory>
Add directory structure to SVN, without files
Undo added files
$ svn revert --recursive <file/directory>
or
$ svn delete --keep-local <file/directory>
“unadd” a file to svn before commit
Undo svn add without reverting local edits
Remove .svn folders
find -type d -name .svn | xargs rm -rf
Remove .svn folders
Ignore files/directories
Individual:
$ svn propset svn:ignore <file to ignore> <folder to set>
$ svn propset svn:ignore -F file_list.txt <folder to set>
svn propset — Den Wert von PROPNAME für Dateien, Verzeichnisse oder Revisionen auf PROPVAL setzen
Global
[miscellany]
global-ignores = <files to ignore>
Resolve conflicts
# Use manually solved files, recursively
$ svn resolve --accept working -R <directory>
base |
Auswahl der Datei, die die BASE-Revision gewesen war, bevor Sie Ihre Arbeitskopie aktualisierten. Das heißt, die Datei, die Sie ausgecheckt hatten, bevor Sie Ihre letzten Änderungen vornahmen. |
working |
Auswahl der aktuellen Datei in Ihrer Arbeitskopie unter der Annahme, dass Sie Konflikte manuell aufgelöst haben. |
mine-full |
Auswahl der Kopien konfliktbehafteter Dateien, mit dem Inhalt zum Zeitpunkt unmittelbar vor Ihrem Aufruf von svn update. |
theirs-full |
Auswahl der Kopien konfliktbehafteter Dateien, mit dem Inhalt der Revisionen, die Sie durch den Aufruf von svn update vom Server geholt haben. |
svn resolve — Konflikte in Dateien und Verzeichnissen der Arbeitskopie auflösen
E160013: ‘/svn/XXX/!svn/me’ path not found
$ dpkg -l | grep subversion
ii subversion 1.7.5-1ubuntu2 amd64 Advanced version control system
Server:
Powered by Apache Subversion version 1.7.4 (r1295709)
$ svn commit -m "add [...]"
svn: E160013: Commit failed (details follow):
svn: E160013: '/svn/XXX/!svn/me' path not found
Connection reset by peer
Solving checkout problems with svn repositories
Timeouts/connection reset using SVN 1.6.11/Apache 2.2.15
Laufzeit-Konfigurationsbereich
SVN Operations Taking Longer than an Hour Time Out
SVN commit doesn’t complete
Client:
%APPDATA%\Subversion\servers: http-timeout = 900
%LOCALAPPDATA%\Subversion\servers: http-timeout = 900
"~/.subversion/servers: http-timeout = 900
Server:
apache2/httpd.conf: TimeOut 900
TortoiseSVN
How do I configure TortoiseSVN’s external merge behavior?
%base - the original file without your or the others changes
%bname - The window title for the base file
%mine - your own file, with your changes
%yname - The window title for your file
%theirs - the file as it is in the repository
%tname - The window title for the file in the repository
%merged - the conflicted file, the result of the merge operation
%mname - The window title for the merged file
WinMerge
C:\Program Files (x86)\WinMerge\WinMergeU.exe -e -ub -dl %bname -dr %yname %base %mine
Meld
Meld (official)
GNOME: Meld
Meld Installer for Windows (inactive)
Using Meld as external diff tool with Tortoise SVN
How to set up svn conflict resolution with meld?
merge-tool-cmd = /opt/svn-merge-meld
C:\Program Files (x86)\Meld\meld\meld.exe %theirs %merged %mine
C:\Program Files (x86)\Meld\meld\meld.exe --auto-merge --output %merged %mine %base %theirs
Filter
SvnMapper
SvnMapper
Graphical representation of SVN branch/merge activity [closed]
Visualising Subversion branching/merging history
Anyone use SvnMapper? please help me!
Download the Corflags.exe
C:\Program Files (x86)\SvnMapper>corflags.exe SvnMapper.exe
Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
Version : v2.0.50727
CLR Header: 2.5
PE : PE32
CorFlags : 1
ILONLY : 1
32BIT : 0
Signed : 0
C:\Program Files (x86)\SvnMapper>corflags.exe SvnMapper.exe /32bit+
Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
corflags : error CF001 : Could not open file for writing
C:\Program Files (x86)\SvnMapper>corflags.exe SvnMapper.exe /32bit+
Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
C:\Program Files (x86)\SvnMapper>corflags.exe SvnMapper.exe
Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
Version : v2.0.50727
CLR Header: 2.5
PE : PE32
CorFlags : 3
ILONLY : 1
32BIT : 1
Signed : 0