Re: [Trac] mapping between git author/committer and trac user

2014-01-30 Thread Christophe Domas
Hi,

I don't have user email in trac. I think I have to install the Account 
Manager Plugin, right?

I was thinking to patch the _parse_user_time(s)in git_fs.py to return the 
git user.name without email. Is it a bad idea?

Regards

Christophe


Le jeudi 30 janvier 2014 02:15:31 UTC+1, Ethan Jucovy a écrit :


 On Jan 29, 2014 7:43 PM, Ethan Jucovy ethan@gmail.com javascript: 
 wrote:
 
  Hi Christophe,
 
  On Wed, Jan 29, 2014 at 5:27 AM, Christophe Domas 
  christop...@gmail.comjavascript: 
 wrote:
 
  My trac user is chdomas.
  When I push a commit, the autor/committer is chdomas 
 christophe.domas@__.com and trac cannot map the git author with trac 
 user:
 
 
  I've been dealing with this problem too.  I have a patch applied against 
 my Trac installation:

 Actually you may not need the patch, if your git commits are authored with 
 the same email address that your trac user account is associated with.

 In that case, I think an existing configuration option would work:

 [git]
 trac_user_rlookup = true

 The patch is only needed if your git commits do not correspond with your 
 trac account's email address.

 -Ethan


-- 
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Trac] mapping between git author/committer and trac user

2014-01-30 Thread Ethan Jucovy
Hi Christophe,

On Thu, Jan 30, 2014 at 4:43 AM, Christophe Domas 
christophe.do...@gmail.com wrote:

 I don't have user email in trac. I think I have to install the Account
 Manager Plugin, right?


You can set an email address for your own Trac account without Account
Manager.  Just look in /prefs.

I think you can also set all users' email addresses from the command line
using `trac-admin` -- look for the `trac-admin session list` and
`trac-admin session set` commands.

Account Manager is needed only if you want an admin panel for setting all
users' email addresses through the web.


 I was thinking to patch the _parse_user_time(s)in git_fs.py to return the
 git user.name without email. Is it a bad idea?


If you're comfortable patching your Trac installation, and prefer to patch
your site instead of using trac_user_rlookup + Trac session emails, I would
recommend the patch I posted earlier:


http://trac.edgewall.org/attachment/ticket/10640/changeset_user_mapper_component.diff

It's much more flexible, since it lets you maintain a list of git-trac
names in your trac.ini file.

-Ethan

-- 
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Trac] mapping between git author/committer and trac user

2014-01-30 Thread Christophe Domas

I've used the mapping by email (trac_user_rlookup = true) with trac-admin 
session set to add emails to my users and it works perfectly.

Thanks a lot!


Le jeudi 30 janvier 2014 14:23:17 UTC+1, Ethan Jucovy a écrit :

 Hi Christophe,

 On Thu, Jan 30, 2014 at 4:43 AM, Christophe Domas 
 christop...@gmail.comjavascript:
  wrote:

 I don't have user email in trac. I think I have to install the Account 
 Manager Plugin, right?


 You can set an email address for your own Trac account without Account 
 Manager.  Just look in /prefs.

 I think you can also set all users' email addresses from the command line 
 using `trac-admin` -- look for the `trac-admin session list` and 
 `trac-admin session set` commands.

 Account Manager is needed only if you want an admin panel for setting all 
 users' email addresses through the web.
  

 I was thinking to patch the _parse_user_time(s)in git_fs.py to return 
 the git user.name without email. Is it a bad idea?


 If you're comfortable patching your Trac installation, and prefer to patch 
 your site instead of using trac_user_rlookup + Trac session emails, I would 
 recommend the patch I posted earlier:

   
 http://trac.edgewall.org/attachment/ticket/10640/changeset_user_mapper_component.diff

 It's much more flexible, since it lets you maintain a list of git-trac 
 names in your trac.ini file.

 -Ethan



-- 
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Trac] mapping between git author/committer and trac user

2014-01-29 Thread Christophe Domas
Hi, 

I'm using trac 1.0.1 with git plugin and basic authentication based on a 
file.

My trac user is chdomas.
When I push a commit, the autor/committer is chdomas 
christophe.domas@__.com and trac cannot map the git author with trac 
user:

Trac[api] DEBUG: Event changeset_added on sphinx-git for revision 
94a5b114ff5b878a6ddae8f14f417471d5cb9a6e
Trac[commit_updater] DEBUG: Updating ticket #1288
Trac[api] DEBUG: action controllers for ticket workflow: 
['ConfigurableTicketWorkflow']
Trac[perm] DEBUG: No policy allowed chdomas christophe.domas@__.com 
performing TICKET_APPEND on Resource u'ticket:1288'
Trac[commit_updater] INFO: chdomas christophe.domas@__.com doesn't 
have TICKET_APPEND permission for #1288

It seems to have been corrected: http://trac-hacks.org/ticket/7844 but I 
cannot open the patch.

It works if I add a trac user chdomas christophe.domas@__.com with 
TICKET_APPEND permission but it is just a work-around and I cannot modify 
chdomas trac user because of history.

How can I manage that?

Regards,

Christophe

-- 
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Trac] mapping between git author/committer and trac user

2014-01-29 Thread Ethan Jucovy
Hi Christophe,

On Wed, Jan 29, 2014 at 5:27 AM, Christophe Domas 
christophe.do...@gmail.com wrote:

 My trac user is chdomas.
 When I push a commit, the autor/committer is chdomas christophe.domas@
 __.com and trac cannot map the git author with trac user:


I've been dealing with this problem too.  I have a patch applied against my
Trac installation:

http://trac.edgewall.org/attachment/ticket/10640/changeset_user_mapper_component.diff

If you apply that patch, you can then add a git-trac user mapping in your
trac.ini file like this:

 [repository-changeset-user-mapper]
 Lammy Lammerson la...@example.com = lammy
 chdomas christophe.domas@__.com = chdomas

More details at http://trac.edgewall.org/ticket/10640#comment:7

Hope that helps,
Ethan

-- 
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Trac] mapping between git author/committer and trac user

2014-01-29 Thread Ethan Jucovy
On Jan 29, 2014 7:43 PM, Ethan Jucovy ethan.juc...@gmail.com wrote:

 Hi Christophe,

 On Wed, Jan 29, 2014 at 5:27 AM, Christophe Domas 
christophe.do...@gmail.com wrote:

 My trac user is chdomas.
 When I push a commit, the autor/committer is chdomas 
 christophe.domas@__.com
and trac cannot map the git author with trac user:


 I've been dealing with this problem too.  I have a patch applied against
my Trac installation:

Actually you may not need the patch, if your git commits are authored with
the same email address that your trac user account is associated with.

In that case, I think an existing configuration option would work:

[git]
trac_user_rlookup = true

The patch is only needed if your git commits do not correspond with your
trac account's email address.

-Ethan

-- 
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.