Browse files

command for generating svn users list better handles more cases

- grep now catches only commit author lines, instead of anything with
  the word author (e.g. commit messages)
- perl replacement now correctly generates "uname = " line
  • Loading branch information...
tctimmeh committed May 7, 2012
1 parent 9518677 commit 758d464c3d1d9ce31021c70ed2fd0c08d40772b3
Showing with 2 additions and 1 deletion.
  1. +2 −1 en/08-git-and-other-scms/01-chapter8.markdown
@@ -362,7 +362,8 @@ However, the import isn’t perfect; and because it will take so long, you may a
To get a list of the author names that SVN uses, you can run this:
- $ svn log --xml | grep author | sort -u | perl -pe 's/.>(.?)<./$1 = /'
+ $ svn log --xml | grep -P "^<author" | sort -u | \
+ perl -pe 's/<author>(.*?)<\/author>/$1 = /'
That gives you the log output in XML format — you can look for the authors, create a unique list, and then strip out the XML. (Obviously this only works on a machine with `grep`, `sort`, and `perl` installed.) Then, redirect that output into your users.txt file so you can add the equivalent Git user data next to each entry.

0 comments on commit 758d464

Please sign in to comment.