Edgewall Software
Modify

Opened 15 years ago

Last modified 11 years ago

#457 new enhancement

Git integration in bitten

Reported by: Yannick LM <yannicklm1337@…> Owned by: osimons
Priority: minor Milestone: 0.7
Component: Recipe commands Version: 0.6b2
Keywords: git recipe commands Cc: tim@…
Operating System:

Description

It would be nice to be able to create recipes doing some git commands.

For instance:

<step>

<git:checkout url="git://myproject.git" />

</step>

Actually, I've started working on this. (in a git-svn repo, of course)

Feel free to have a look at it:

$~ git clone git://sd-5791.dedibox.fr/prog/bittenn

Attachments (3)

gittools.py (2.5 KB) - added by Tim Niemueller <tim@…> 15 years ago.
gittools.py based on hgtools.py for git clone/pull/reset/checkout
gittools.2.py (2.5 KB) - added by Tim Niemueller <tim@…> 15 years ago.
gittools.py based on hgtools.py for git clone/pull/reset/checkout, now with hard reset
gittools.3.py (2.5 KB) - added by Tim Niemueller <tim@…> 15 years ago.
now really with hard reset, forgot to save... sorry for the noise

Download all attachments as: .zip

Change History (15)

comment:1 Changed 15 years ago by Tim Niemueller <tim@…>

The repository is unavailable by now (last couple of days). Can someone post a patch of this?

comment:2 Changed 15 years ago by Yannick LM <yannicklm1337@…>

Damned, the url is wrong! It should be read: git clone git://sd-5791.dedibox.fr/prog/bitten

I'll prepare a patch this week-end anyway.

Sorry...

Changed 15 years ago by Tim Niemueller <tim@…>

gittools.py based on hgtools.py for git clone/pull/reset/checkout

comment:3 follow-up: Changed 15 years ago by Tim Niemueller <tim@…>

  • Cc tim@… added

I have attached my gittools.py, which is based on hgtools.py. It provides a little more features and does not contain the svn code that is in Yannick's version. It's not much of a difference though. He has the proper integration to setup.py.

Changed 15 years ago by Tim Niemueller <tim@…>

gittools.py based on hgtools.py for git clone/pull/reset/checkout, now with hard reset

Changed 15 years ago by Tim Niemueller <tim@…>

now really with hard reset, forgot to save... sorry for the noise

comment:4 in reply to: ↑ 3 Changed 15 years ago by e0425863@…

The gittools work great. Thanks for that.

But there is still the problem with branches. Only changes in the checked out branch are detected and trigger builds.

Has anyone looked into changing the build configuration form, when git is used? Remove "path" and "revision" fields and use a "branch" field instead?

I would be willing to invest some time, but I would at least need a few hints how to implement this cleanly.

comment:5 Changed 14 years ago by anonymous

Could someone provide a small document on how to use this utilty? I'm unable to get it running, and it would be nice to see examples of what you are supposed to do for installation and configuration.

comment:6 Changed 14 years ago by e0425863@…

Go to the directory were bitten is installed. And put the file in the build folder there.

???@??? bitten]# ls build/ api.py gittools.py javatools.py pythontools.py xmltools.py api.pyc gittools.pyc javatools.pyc pythontools.pyc xmltools.pyc config.py hgtools.py monotools.py shtools.py config.pyc hgtools.pyc monotools.pyc shtools.pyc ctools.py init.py phptools.py svntools.py ctools.pyc init.pyc phptools.pyc svntools.pyc [root@pluto bitten]#

Then use the commands in a build recipe (look at gittools.py for commands and parameters). Example: <step id="clone" description="Clone source from repository">

<git:clone url="/path to repository/repository.git" />

</step>

Hope this helps.

comment:7 Changed 14 years ago by hodgestar

  • Owner set to hodgestar

comment:8 Changed 14 years ago by anonymous

I made a modified version of bitten that should be fully compatible with git. See http://trac-hacks.org/wiki/BittenForGitPlugin

comment:9 Changed 14 years ago by anonymous

Hi,

Is there any plan to support multi git repository with bitten and 0.12 ?

Regards,

comment:10 Changed 14 years ago by anonymous

Yes. We will need multi-repo support to problem support Trac 0.12 and we aim to support all the repositories Trac supports. Patches and assistance getting there welcome.

comment:11 Changed 11 years ago by anonymous

Is there any status on integrating Git support into the baseline? Or is manually patching with the attached .py files still the best method for Git integration?

comment:12 Changed 11 years ago by osimons

  • Milestone changed from 0.6.1 to 0.7
  • Owner changed from hodgestar to osimons

Current status:

  • Server: Git is supported by the server and part of multi-repository support (in trunk since closing #765 / #433). Git (and other DVCSs) branch handling is still an open issue, see #342.
  • Slave: The gittools support added in this ticket are convenience helpers for the slave, and are essentially simple wrappers for sh:exec command that always can be used to call git directly (and without patching the slave). Calling sh:exec directly allows full flexibility for custom arguments including hard-coding branch.

The last patch reads OK, but seems to be missing:

  • setup.py build tool references.
  • bitten/doc/commands.txt reference documentation.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain osimons.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.