[PATCH V2 libvirt-python] Fix duplicate entries in AUTHORS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The generated AUTHORS file contains many duplicates.  If an author
has N commits, there will be N entries for the author in AUTHORS.
Check if an author already exists in the list before appending.
While at it, add a .mailmap (derived from libivrt's .mailmap) to
futher tidy the generated AUTHORS list.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx>
---

V2:
  Add .mailmap.  I started with libvirt's .mailmap and removed
  entries where there was no corresponding author in the
  libvirt-python repo.

 .mailmap | 16 ++++++++++++++++
 setup.py |  4 +++-
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
new file mode 100644
index 0000000..d8ac934
--- /dev/null
+++ b/.mailmap
@@ -0,0 +1,16 @@
+# 'git shortlog --help' and look for mailmap for the format of each line
+
+# Email consolidation:
+# <Preferred address in AUTHORS> <other alias used by same author>
+
+<jdenemar@xxxxxxxxxx> <Jiri.Denemark@xxxxxxxxx>
+<jfehlig@xxxxxxxx> <jfehlig@xxxxxxxxxx>
+<stefanb@xxxxxxxxxx> <stefanb@xxxxxxxxxxxxxxxxxx>
+
+# Name consolidation:
+# Preferred author spelling <preferred email>
+Alex Jia <ajia@xxxxxxxxxx>
+Ján Tomko <jtomko@xxxxxxxxxx>
+MATSUDA Daiki <matsudadik@xxxxxxxxxxxxxxxxx>
+Serge E. Hallyn <serge.hallyn@xxxxxxxxxxxxx>
+Philipp Hahn <hahn@xxxxxxxxxxxxx>
diff --git a/setup.py b/setup.py
index 2571742..7a1964b 100755
--- a/setup.py
+++ b/setup.py
@@ -176,7 +176,9 @@ class my_sdist(sdist):
         f = os.popen("git log --pretty=format:'%aN <%aE>'")
         authors = []
         for line in f:
-            authors.append("   " + line.strip())
+            line = "   " + line.strip()
+            if line not in authors:
+                authors.append(line)
 
         authors.sort(key=str.lower)
 
-- 
2.3.7

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]