1. Alessio Caiazza
  2. redmine_bitbucket_hook
  3. Issues
Issue #4 resolved

Still works with git?

created an issue

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?

Comments (9)

  1. Wiklander Consulting

    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"

    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. Wiklander Consulting

    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.

  3. Alessio Caiazza repo owner

    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.

  4. Alessio Caiazza repo owner

    I would like to apologize for my lack of responsiveness on this topic.

    Today I merged the pull request, fixed the issue with json version and pushed a 1.0.0 release (tested with Redmine 2.2.3).


  5. Log in to comment