Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

08-git-and-other-scms: Fix command for svn author names #380

Merged
merged 1 commit into from

3 participants

@ckorn

The command for creating the svn user list is wrong.
It does not output the list in the format which is required
by git-svn clone.
This issue has already been fixed for some languages in
commit 758d464.
This patch applies this fix for all languages.
Additionally the output is directly written into the file
users.txt where it is expected to be according to the
subsequent git-svn clone command.

Christoph Korn 08-git-and-other-scms: Fix command for svn author names
The command for creating the svn user list is wrong.
It does not output the list in the format which is required
by git-svn clone.
This issue has already been fixed for some languages in
commit 758d464c3d1d9ce31021c70ed2fd0c08d40772b3.
This patch applies this fix for all languages.
Additionally the output is directly written into the file
users.txt where it is expected to be according to the
subsequent git-svn clone command.
2427098
@jnavila
Collaborator

Merged. Thanks!

@jnavila jnavila merged commit 9b390c2 into progit:master
@GArik

Additionally the output is directly written into the file users.txt where it is expected to be according to the subsequent git-svn clone command.

What for? The paragraph below says "redirect that output into your users.txt file". Do you think that a reader don't know how to redirect output into a file?
If you change some code snippet then change its description accordingly!

@ckorn

Hum, I had a look at the German translation where it says "Anschließend wird die Ausgabe in die Datei users.txt umgeleitet" which means "Afterwards the output is redirected to the file users.txt file".
So I assumed the command should also do this.
But you are correct in the English (aka the original) version it commands the user to do so by himself.
Do you want the German paragraph to match the English meaning better and then to remove the redirect to users.txt again?

@jnavila
Collaborator

I am not against describing the action and adding the redirect in the command. Not all users know how to redirect the output of a command into a file.

@GArik

Do you want <...> to remove the redirect to users.txt again?

Yep. I do think that your changeset is a regression.
For me it makes perfect sense to first look at the output of this code snippet and then if it looks fine redirect it to users.txt.

@ckorn

Please have a look at merge request #381

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 1, 2013
  1. 08-git-and-other-scms: Fix command for svn author names

    Christoph Korn authored
    The command for creating the svn user list is wrong.
    It does not output the list in the format which is required
    by git-svn clone.
    This issue has already been fixed for some languages in
    commit 758d464c3d1d9ce31021c70ed2fd0c08d40772b3.
    This patch applies this fix for all languages.
    Additionally the output is directly written into the file
    users.txt where it is expected to be according to the
    subsequent git-svn clone command.
This page is out of date. Refresh to see the latest.
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 用户数据。
Something went wrong with that request. Please try again.