adam-may / hudson-tray-tracker

Automatically exported from code.google.com/p/hudson-tray-tracker
0 stars 0 forks source link

Parsing author for Mercurial repositories #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Alexis, 

Firstly I want to say thanks for writing a great tool that I use every day!

I have recently switched to using Mercurial as a source control tool, and have 
found that the tray tracker does not display the name of the person who caused 
the build.

With a little investigation I found that the "/*/changeSet/item/user" section 
in the hudson XML API is specific to Subversion repositories, and the Mercurial 
plugin does not include such information in the output.

Instead it appears that the "/*/culprit/fullName" section is consistent across 
both Subversion and Mercurial builds.

The other difference is that by default the usernames also include email 
addresses (such as "User Name <user@example.com>") and it clutters up the 
interface is the email address is not filtered out.

I've attached a patch file (from revision 168) that I've tested to work with 
both Mercurial and Subversion repositories. 

If you accept this change could you please release the software again soon so 
that we can start using the patched version as soon as possible.

Cheers, Matthew

Original issue reported on code.google.com by matthew....@gmail.com on 12 Jul 2010 at 4:49

Attachments:

GoogleCodeExporter commented 9 years ago
Hi Matthew,

Thanks for the report and for the patch!
One question though: what do you mean by "it clutters up the interface"?

Thanks,
Alexis

Original comment by Alexis.S...@gmail.com on 12 Jul 2010 at 12:45

GoogleCodeExporter commented 9 years ago
Hi Alexis,

Compared to Subversion's username format (eg euser), Mercurial's format 
(Example User <euser@example.com>) takes up a lot more space in the columns. 
The full name and complete email address for the user usually doesn't fit 
within the space. It is generally known who has write access to the repository, 
and so the full email address isn't really required.

Cheers, Matthew

Original comment by matthew....@gmail.com on 12 Jul 2010 at 12:52

GoogleCodeExporter commented 9 years ago
Attached is an example of the culprit section for a Mercurial build.

Original comment by matthew....@gmail.com on 12 Jul 2010 at 12:58

Attachments:

GoogleCodeExporter commented 9 years ago
All right. I have integrated your patch. I will see if there are other issues I 
can fix before doing a release. Thanks again.

Original comment by Alexis.S...@gmail.com on 12 Jul 2010 at 3:39

GoogleCodeExporter commented 9 years ago
Hi Matthew,

Someone just reported (issue #58) that usernames containing a dash ("-") were 
truncated by HTT. In the patch you submitted, the code looks for brackets and 
dashes. I was wondering if you remembered why you included the dash in this 
list. I wouldn't want to introduce a regression when changing that.

Thanks,
Alexis

Original comment by Alexis.S...@gmail.com on 9 Sep 2010 at 3:29

GoogleCodeExporter commented 9 years ago
Hi Alexis,

At the time of producing the patch, I was aware of a number of users that chose 
to use the alternative username format: Example User - euser@example.com. Note 
that in this case there is a space character on either side of the dash. 

Perhaps to satisfy issue #58 you could check for the presence of " - " rather 
than the dash character which should allow for dashes in usernames and also 
email addresses. For example: Example Long-Name - e.long-name@example.com would 
be valid and parse correctly.

Cheers, Matthew

Original comment by matthew....@gmail.com on 10 Oct 2010 at 12:23