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

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. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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

Am 11.05.2015 um 21:08 schrieb Jim Fehlig:
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.
Reported-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
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)
Reviewed-by: Andreas Färber <afaerber@suse.de> Thanks, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB 21284 (AG Nürnberg)

Andreas Färber wrote:
Am 11.05.2015 um 21:08 schrieb Jim Fehlig:
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.
Reported-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
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)
Reviewed-by: Andreas Färber <afaerber@suse.de>
Thanks. I just noticed a .mailmap would remove three other duplicates, where the author's name has a different spelling or the author's mail address is different. I'll let other libvirt maintainers comment on whether that is desirable. Regards, Jim

On 11.05.2015 22:05, Jim Fehlig wrote:
Andreas Färber wrote:
Am 11.05.2015 um 21:08 schrieb Jim Fehlig:
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.
Reported-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
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)
Reviewed-by: Andreas Färber <afaerber@suse.de>
Thanks. I just noticed a .mailmap would remove three other duplicates, where the author's name has a different spelling or the author's mail address is different. I'll let other libvirt maintainers comment on whether that is desirable.
Regards, Jim
Yeah, I think we should go with .mailmap (copied from libvirt.git). Otherwise we will have 'Philip Hahn' and 'Philipp Hahn', Jim from both novel and suse domains, Jiri, Stefan, ... Michal

On 05/28/2015 03:33 AM, Michal Privoznik wrote:
On 11.05.2015 22:05, Jim Fehlig wrote:
Andreas Färber wrote:
Am 11.05.2015 um 21:08 schrieb Jim Fehlig:
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.
Reported-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
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)
Reviewed-by: Andreas Färber <afaerber@suse.de>
Thanks. I just noticed a .mailmap would remove three other duplicates, where the author's name has a different spelling or the author's mail address is different. I'll let other libvirt maintainers comment on whether that is desirable.
Regards, Jim
Yeah, I think we should go with .mailmap (copied from libvirt.git).
I've sent V2 which includes a trimmed version of libvirt's .mailmap https://www.redhat.com/archives/libvir-list/2015-May/msg01100.html Regards, Jim
participants (3)
-
Andreas Färber
-
Jim Fehlig
-
Michal Privoznik