Ticket #6554 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 weeks ago

[patch] Add Trac 0.12 support

Reported by: kevin.mcconnell@gmail.com Assigned to: hvr
Priority: normal Component: GitPlugin
Severity: normal Keywords:
Cc: tolsen, lkraav, peter@stuge.se Trac Release: 0.12

Description

Attached is a patch to make the plugin work in 0.12, as mentioned in #1040. It updates the code to match the recent API changes in Trac:MultiRepos, and also makes abbreviated SHA-1's work in Trac:TracLinks.

You'll need to make the 0.12 branch first (svn cp 0.11 0.12) before applying this. I wasn't sure if there was a way to include that in the patch itself. It seems that Git has pushed all the SVN knowledge out of my brain :)

Also, it currently only works if cached_repository is disabled; not sure why at the moment. But the rest of it seems to be working.

Attachments

gitplugin-0.12.diff (9.1 kB) - added by kevin.mcconnell@gmail.com on 02/07/10 04:31:50.
changes for Trac 0.12
gitplugin-0.12.v2.diff (9.7 kB) - added by kevin.mcconnell@gmail.com on 02/07/10 23:37:23.
updated to include cached_repository support

Change History

02/07/10 04:31:50 changed by kevin.mcconnell@gmail.com

  • attachment gitplugin-0.12.diff added.

changes for Trac 0.12

02/07/10 23:37:23 changed by kevin.mcconnell@gmail.com

  • attachment gitplugin-0.12.v2.diff added.

updated to include cached_repository support

02/07/10 23:39:45 changed by kevin.mcconnell@gmail.com

Added revised patch (gitplugin-0.12.v2.diff). It now also works when cached_repository=true.

02/17/10 00:17:25 changed by lkraav

is this the same thing as http://github.com/lentil/trac-git-plugin?

02/17/10 00:17:39 changed by lkraav

  • cc changed from tolsen to tolsen, lkraav.

02/21/10 23:28:18 changed by hvr

(In [7695]) created 0.12/ branch, tweaked setup.py, and applied patch by kevin.mcconnell@gmail.com (see #6554)

02/26/10 00:22:36 changed by irrshade

Does this patch still work with cached_repository enabled? I'm running a copy of Trac I checked out last night and it appears to have problems when cached_repository is on. (Seems related to a change made to Trac a few days ago to pad changeset numbers to ten digits).

I didn't have any luck figuring out a fix.

02/26/10 10:46:17 changed by irrshade

And of course I should have read the tickets on Trac before posting-- caching appears to have been fixed again for non-SVN repos in the latest HEAD for Trac.

02/28/10 14:59:43 changed by lkraav

re comment:6, for anyone else running into breakage, trac:#9089 -> trac:r9280 fixed git for me.

(follow-up: ↓ 9 ) 07/04/10 17:41:07 changed by andy.czerwonka@gmail.com

If I do the following:

easy_install http://trac-hacks.org/svn/gitplugin/0.12

I get a:

error: Unexpected HTML page found at http://trac-hacks.org/svn/gitplugin/0.12

(in reply to: ↑ 8 ) 09/13/10 01:50:54 changed by jhough

Replying to andy.czerwonka@gmail.com:

If I do the following: easy_install http://trac-hacks.org/svn/gitplugin/0.12 I get a: error: Unexpected HTML page found at http://trac-hacks.org/svn/gitplugin/0.12

Do you have a recent version of setuptools installed(>= 0.6c9)? There's a known problem in earlier versions that causes a similar error.

10/06/10 06:40:29 changed by peter@stuge.se

  • status changed from new to closed.
  • cc changed from tolsen, lkraav to tolsen, lkraav, peter@stuge.se.
  • resolution set to fixed.

The plugin works beautifully for me in Trac 0.12, so I'm closing this.

05/02/13 04:12:11 changed by jteh

Kevin, do you remember by any chance why you made GitCachedRepository.normalize_rev call self.repos.get_youngest_rev() rather than self.youngest_rev; i.e. doesn't use the cached metadata? I'm guessing performance would be better if the cache were used. I realise this was a long time ago, so you probably don't remember, but thought I'd ask in case you do. :)

05/02/13 05:26:33 changed by kevin.mcconnell@gmail.com

Sorry, I'm afraid my memory doesn't go back that far :) It might be that I just wasn't aware of a better way to do it. All I can suggest is that you try it the other way and see.

Sorry I couldn't be more help!


Add/Change #6554 ([patch] Add Trac 0.12 support)




Change Properties
Action