Changes between Initial Version and Version 1 of DeveloperTips


Ignore:
Timestamp:
02/07/17 13:09:39 (7 years ago)
Author:
Samuli Seppänen
Comment:

Migrate content from DeveloperDocumentation page

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperTips

    v1 v1  
     1= Introduction =
     2
     3This page contains developer documentation that is useful, but rarely needed.
     4 
     5= Converting SVN revisions to Git patches =
     6
     7There's a Python script available that converts SVN revisions into patches ''git am'' can understand:
     8
     9 * http://blog.repl.ca/2009/06/converting-svn-commits-to-git-patches.html
     10
     11To use this script, copy it into the SVN repository root as ''svnrev2git.py''. Then create an authors file using this format:
     12
     13{{{
     14svnusername, firstname lastname, email
     15}}}
     16
     17For example:
     18
     19{{{
     20johndoe, John Doe, john.doe@domain.com
     21}}}
     22To use the script, call it like this:
     23
     24{{{
     25$ python svnrev2git.py authors <revision>
     26$ python svnrev2git.py authors <revision_start>-<revision_end>
     27}}}
     28
     29For example:
     30
     31{{{
     32$ python svnrev2git.py authors 8126
     33$ python svnrev2git.py authors 8126-8225
     34$ for REV in 8206 8212 8219 8225; do python svnrev2git.py authors $REV;done
     35}}}
     36
     37Note that the script is slow in processing long revision ranges: it's usually a better idea to pick the required revisions by hand.
     38
     39= Poor-man's Symdiff =
     40
     41Andj came up with a clever script in [http://thread.gmane.org/gmane.network.openvpn.devel/4869 an IRC meeting] to generate diffs that make reviewing refactoring patches easier:
     42
     43{{{
     44#!/bin/bash
     45git diff $1 $2 >/tmp/difftmp123.txt
     46cat /tmp/difftmp123.txt |grep "^-" |sed s/^-// >/tmp/removed123.txt
     47cat /tmp/difftmp123.txt |grep "^+" |sed s/^+// >/tmp/added123.txt
     48diff /tmp/removed123.txt /tmp/added123.txt -u
     49}}}
     50
     51This is similar to [http://research.microsoft.com/en-us/projects/symdiff Symdiff].