Alessio Caiazza is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

nolith / redmine-bitbucket

Allow your Redmine installation to be notified when changes have been pushed to a Bitbucket repository.

Clone this repository (size: 36.2 KB): HTTPS / SSH
hg clone https://bitbucket.org/nolith/redmine-bitbucket
hg clone ssh://hg@bitbucket.org/nolith/redmine-bitbucket

Issues

#4 Still works with git?

Reported by Jason Mitchell (last edited )

Since this was a fork of the project to integrate redmine with github and git, will it work also with git and bitbucket now that bitbucket has git as well?

Status: open Responsible: Alessio Caiazza Type: enhancement Priority: major
Milestone: none Component: none Version: none

Attachments

No attachments added for this issue yet.

Comments and changes

  1. #1 Per Wiklander

    written

    Lines 17 to 23 in redmine-bitbucket / app / controllers / bitbucket_hook_controller.rb would indicate a NO on that question:

    repository = project.repository
    raise TypeError, "Project '#{identifier}' has no repository" if repository.nil?
    raise TypeError, "Repository for project '#{identifier}' is not a Mercurial repository" unless repository.is_a?(Repository::Mercurial)
    
    # Get updates from the bitbucket repository
    command = "cd \"#{repository.url}\" && hg pull"
    exec(command)
    

    But replacing hg with git there should fix it, I think. How about letting the call from bitbucket include the intended repository type? And btw, is command = "cd \"#{repository.url}\" && hg pull" really nescessary? Doesn’t redmine have a better API for pulling repos?

  2. #2 Alessio Caiazza

    written

    • Changed status from new to open.

    redmine-bitbacket was born as a quick-and-dirty patch to github-redmine and I didn't updated it whan atlassian introduced the git support.

    So, no, it didn't support git by now, I'll work on it ASAP.

    @WiklanderConsulting there's no way to pull with redmine API as you can see here. You can only force the changesets fetching from a local repo to the database

  3. #3 Per Wiklander

    written

    I wasn’t talking about the webservice API but the ruby API. Is it nescessary to use command line strings? How does redmine do it internally? I was just thinking the script could get a bit more repository agnostic.

  4. #4 Alessio Caiazza

    written

    The link wasn't for the API but for the Repository and MercurialAdapter classes.

    Redmine is repos agnostic and fetching changeset for distributed versioning system was implemented only against local repo, so you must pull manually, there's no way to perform a pull within redmine code.

Add comment / attachment

Verification: Please write the text from the image in the box (letters only)

captcha

Is that you, Humanoid? Is this me?