Edgewall Software
Modify

Opened 13 years ago

Last modified 14 months ago

#10620 new defect

'trac-admin changeset added' adds changeset as invalid user

Reported by: cv.mail@… Owned by:
Priority: low Milestone: next-stable-1.6.x
Component: contrib Version: 0.12.2
Severity: normal Keywords: trac-admin, changeset, added
Cc: cv.mail@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I'm trying to explicitly notify trac about new changeset in mirrored repository (which is updated by svnsync). Instead of getting username of author from SVN (from specified REV), it uses current UID as author name.

Behaviour without explicit notification of trac is normal (uses author from SVN, not apache's one).

Attachments (0)

Change History (12)

comment:1 by cv.mail@…, 13 years ago

Cc: cv.mail@… added

comment:2 by Remy Blank, 13 years ago

Yes, that's a known issue. When mirroring, svnsync first commits with user "svnsync", then modifies the changeset metadata to match what the changeset says. This runs the changeset hook twice, once with "changeset added" and once with "changeset modified". The ticket update is done in the former, when the user isn't available.

I haven't found a solution for that yet, so all suggestions are welcome.

comment:3 by cv.mail@…, 13 years ago

Component: admin/consolecontrib
Priority: highlow

In this case this isn't problem of trac.

As for instructions of using svnsync, it should be added to manual that admin have to add post-revprop-change hook with lines like following:

REPOS="$1"
REV="$2"
USER="$3"
PROPNAME="$4"
ACTION="$5"
read PROPVAL

if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:author" -a "$PROPVAL" = "svnsync" ]; then
  trac-admin (URL) changeset added "(default)" $REV
fi

Also notice, that there is ChangesetNotifier plug-in, which executes on changeset added, not changeset modified, that's why "changeset added" was actually added to revprop-change hook (changing author with "changeset modified" is too late because e-mail has already sent).

comment:4 by Remy Blank, 13 years ago

That's a valid workaround as you don't ever change revprops "by hand". Ideally I would prefer finding a correct solution, especially since svnsync is what we suggest to people who want to access a remote SVN repository with Trac.

comment:5 by cv.mail@…, 13 years ago

It's almost ideal, since you will hardly change author to "svnsync" user and back, also change of author could be prohibited by hook on original repository.

comment:6 by Remy Blank, 13 years ago

Oh, I didn't notice that you checked the property value. But isn't the property change from svnsync instead of to?

comment:7 by anonymous, 13 years ago

No, it's from: # [STDIN] PROPVAL ** the old property value is passed via STDIN.

comment:8 by Christian Boos, 12 years ago

Milestone: 0.12.4next-minor-0.12.x

No need to delay 0.12.4 for this one.

comment:9 by Ryan J Ollos, 10 years ago

Milestone: next-minor-0.12.xnext-stable-1.0.x

comment:10 by Ryan J Ollos, 8 years ago

Milestone: next-stable-1.0.xnext-stable-1.2.x

Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.

comment:11 by Ryan J Ollos, 5 years ago

Milestone: next-stable-1.2.xnext-stable-1.4.x

comment:12 by Ryan J Ollos, 14 months ago

Milestone: next-stable-1.4.xnext-stable-1.6.x

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.