Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #380 from ckorn/users.txt

08-git-and-other-scms: Fix command for svn author names
  • Loading branch information...
commit 9b390c2a34c7177bf482b3149a7a49613c670456 2 parents 1dff88c + 2427098
@jnavila jnavila authored
View
3  ar/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 = /' > users.txt
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.
View
3  az/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 = /' > users.txt
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.
View
3  ca/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 = /' > users.txt
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.
View
2  cs/08-git-and-other-scms/01-chapter8.markdown
@@ -363,7 +363,7 @@ Takový import však není úplně dokonalý a vzhledem k tomu, jak dlouho můž
Chcete-li získat seznam jmen autorů používaných v SVN, spusťte tento příkaz:
$ svn log --xml | grep -P "^<author" | sort -u | \
- perl -pe 's/<author>(.*?)<\/author>/$1 = /'
+ perl -pe 's/<author>(.*?)<\/author>/$1 = /' > users.txt
Vytvoříte tím log ve formátu XML. Můžete v něm vyhledávat autory, vytvořit si vlastní seznam a XML zase vyjmout. (Tento příkaz pochopitelně funguje pouze na počítačích, v nichž je nainstalován `grep`, `sort` a `perl`.) Poté tento výstup přesměrujte do souboru users.txt, abyste mohli vedle každého záznamu přidat stejná data o uživatelích Git.
View
3  de/08-git-and-other-scms/01-chapter8.markdown
@@ -487,7 +487,8 @@ Trotzdem ist der Import nicht perfekt. Und weil das ziemlich lange dauern wird,
Um eine Liste der Namen der Autoren bekommen, die SVN benutzen, kannst Du folgendes Kommando ausführen:
- $ 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 = /' > users.txt
<!--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.-->
View
2  en/08-git-and-other-scms/01-chapter8.markdown
@@ -363,7 +363,7 @@ 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 -P "^<author" | sort -u | \
- perl -pe 's/<author>(.*?)<\/author>/$1 = /'
+ perl -pe 's/<author>(.*?)<\/author>/$1 = /' > users.txt
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.
View
3  es-ni/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 = /' > users.txt
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.
View
3  es/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 = /' > users.txt
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.
View
2  fr/08-git-and-other-scms/01-chapter8.markdown
@@ -446,7 +446,7 @@ Créez un fichier appelé `users.txt` contenant cette équivalence dans le forma
Pour récupérer la liste des noms d'auteurs utilisés par SVN, vous pouvez utiliser la ligne suivante :
$ svn log --xml | grep -P "^<author" | sort -u | \
- perl -pe 's/<author>(.*?)<\/author>/$1 = /'
+ perl -pe 's/<author>(.*?)<\/author>/$1 = /' > users.txt
Cela génère une sortie au format XML — vous pouvez visualiser les auteurs, créer une liste unique puis éliminer l'XML.
Évidemment, cette ligne ne fonctionne que sur une machine disposant des commandes `grep`, `sort` et `perl`.
View
3  ja/08-git-and-other-scms/01-chapter8.markdown
@@ -363,7 +363,8 @@ Subversion に慣れているので SVN が出力する形式で歴史を見た
SVN で使っている作者の一覧を取得するには、このようにします。
- $ 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 = /' > users.txt
これは、まずログを XML フォーマットで出力します。その中から作者を捜して重複を省き、XML を除去します (ちょっと見ればわかりますが、これは `grep` や `sort`、そして `perl` といったコマンドが使える環境でないと動きません)。この出力を users.txt にリダイレクトし、そこに Git のユーザーデータを書き足していきます。
View
3  ko/08-git-and-other-scms/01-chapter8.markdown
@@ -362,7 +362,8 @@ Subversion 저장소를 클론하면 쓸데 없는 파일을 커밋하지 않도
SVN에 기록된 Author 이름은 어떤 것들이 있는지 다음 명령으로 조회한다:
- $ 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 = /' > users.txt
우선 XML 형식으로 SVN 로그를 출력하고, 거기서 Author 정보만 찾고, 중복된 것을 제거하고, XML Tag는 버린다. 물론 `grep`, `sort`, `perl` 명령이 동작하는 시스템에서만 이 명령을 사용할 수 있다. 이 결과에 Git Author 정보를 더해서 `users.txt` 만든다.
View
3  mk/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 = /' > users.txt
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.
View
3  nl/08-git-and-other-scms/01-chapter8.markdown
@@ -362,7 +362,8 @@ Maar, de import is niet perfect; en omdat het zo lang zal duren, kun je het maar
Om een lijst te krijgen van de auteurnamen, die SVN gebruikt kun je dit uitvoeren:
- $ 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 = /' > users.txt
Daarmee krijg je de log output in XML formaat – je kunt hierin zoeken naar de auteurs, een lijst met unieke vermeldingen creëren en dan de XML eruit halen. (Dit werkt natuurlijk alleen op een machine waarop `grep`, `sort` en `Perl` geïnstalleerd is.) Daarna stuur je die output naar je users.txt bestand zodat je de gelijkwaardige Git gebruiker data naast iedere vermelding kunt zetten.
View
3  no-nb/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 = /' > users.txt
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.
View
3  pt-br/08-git-and-other-scms/01-chapter8.markdown
@@ -362,7 +362,8 @@ No entanto, a importação não é perfeita; e já que vai demorar tanto tempo,
Para obter uma lista dos nomes de autores que o SVN usa, você pode executar isto:
- $ 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 = /' > users.txt
Isso te dá a saída do log em formato XML — você pode pesquisar pelos autores, criar uma lista única, e depois tirar o XML. (Obviamente isso só funciona em uma máquina com `grep`, `sort`, e `perl` instalados.) Em seguida, redirecione a saída em seu arquivo users.txt assim, você pode adicionar os dados de usuários do Git equivalentes ao lado de cada entrada.
View
3  ru/08-git-and-other-scms/01-chapter8.markdown
@@ -362,7 +362,8 @@ Git определяет ветку, в которую он отправит в
Для того чтобы получить список авторов, который использует SVN, вы можете выполнить следующее:
- $ 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 = /' > users.txt
Это даст вам на выходе журнал в формате XML — в нём вы можете просмотреть информацию об авторах, создать из неё список с уникальными записями и избавиться от XML-разметки. (Конечно, эта команда сработает только на машине с установленными `grep`, `sort`, и `perl`). Затем перенаправьте вывод этого скрипта в свой файл users.txt, чтобы потом можно было добавить к каждой записи данные о соответствующих пользователях Git'а.
View
3  th/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 = /' > users.txt
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.
View
3  tr/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 = /' > users.txt
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.
View
3  zh-tw/08-git-and-other-scms/01-chapter8.markdown
@@ -363,7 +363,8 @@ Git 通過搜尋提交歷史中 Subversion 分支的頭部(tip)來決定 dcommit
通過以下命令可以獲得 SVN 作者的列表:
- $ 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 = /' > users.txt
它將輸出 XML 格式的日誌——你可以找到作者,建立一個單獨的列表,然後從 XML 中抽取出需要的資訊。(顯而易見,本方法要求主機上安裝了`grep`,`sort` 和 `perl`.)然後把輸出重定向到 user.txt 檔,然後就可以在每一項的後面添加相應的 Git 使用者資料。
View
3  zh/08-git-and-other-scms/01-chapter8.markdown
@@ -362,7 +362,8 @@ Git 通过搜寻提交历史中 Subversion 分支的头部来决定 dcommit 的
通过该命令可以获得 SVN 作者的列表:
- $ 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 = /' > users.txt
它将输出 XML 格式的日志——你可以找到作者,建立一个单独的列表,然后从 XML 中抽取出需要的信息。(显而易见,本方法要求主机上安装了`grep`,`sort` 和 `perl`.)然后把输出重定向到 user.txt 文件,然后就可以在每一项的后面添加相应的 Git 用户数据。
Please sign in to comment.
Something went wrong with that request. Please try again.