Skip to content

The plugin deletes all gitolite mirroring attributes #415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue Apr 8, 2015 · 16 comments
Closed

The plugin deletes all gitolite mirroring attributes #415

ghost opened this issue Apr 8, 2015 · 16 comments
Assignees
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Apr 8, 2015

Hi Nicolas,

We are using the gitolite mirroring feature (http://gitolite.com/gitolite/mirroring.html), which requires to add attributes to the repository description in gitolite.conf such as:
repo foo
...access rules...

option mirror.master        =   mars
option mirror.slaves        =   phobos deimos
option mirror.redirectOK    =   all

We have setup such mirroring for some of our redmine managed repos and it works fine, until someone makes changes through redmine, e.g. adding new project members.
At this point, the repo configuration is rewritten and the mirroring attributes are lost.

Do you think it would be possible that all attributes that the plugin does not manage be kept as they are found?

If you agree with that design and are willing to head me to the code where the rewrite operation is done, I'd fork and suggest a pull request with pleasure.

Please let me know and thank you for this great plugin!

Cheers,

Paolo

@n-rodriguez
Copy link
Contributor

Hi Paolo!

Why not using the provided mirroring feature?

@n-rodriguez n-rodriguez self-assigned this Apr 9, 2015
@ghost
Copy link
Author

ghost commented Apr 10, 2015

Hi Nicolas,

We need a two way mirroring between a private (intranet) gitolite and a public (internet acces but restricted to authorised users) gitolite, both of them being administrated by us.

Does the provided feature support two way mirroring ?
Does it support mirroring to another gitolite managed server ?

Thank you in advance.

Cheers,

Paolo

@n-rodriguez
Copy link
Contributor

Does the provided feature support two way mirroring ?

No.

Does it support mirroring to another gitolite managed server ?

Yes. (actually it supports mirroring to any Git repository)

But I'm not sure this will fit your needs...

@ghost
Copy link
Author

ghost commented Apr 13, 2015

Hi,

Thank you for your answers.

Well we do need the two way mirroring.

So do you think my suggestion that mirroring attributes (and perhaps any gitolite attribute not managed by the plugin) should be kept as is makes sense?

If yes, as I was telling you, I could do the job, provided that you give me a few hints on where to start.

Thank you in advance.

Paolo

@ghost
Copy link
Author

ghost commented May 5, 2015

Hi Nicolas,

Any news on this topic?

Thank you in advance.

Paolo

@n-rodriguez
Copy link
Contributor

Hi Paolo,

Unfortunately no. If you want to work on this you can take a look a these classes :

RepositoryUpdater inherits from RepositoryHandler which defines most of the instance methods needed to update a repository config.

The real things happen here https://github.com/jbox-web/redmine_git_hosting/blob/devel/lib/redmine_git_hosting/gitolite_handlers/repository_handler.rb#L61

@ghost
Copy link
Author

ghost commented May 11, 2015

Thank you very much, I'll do my best!

Cheers,

Paolo

@n-rodriguez
Copy link
Contributor

Hi Paolo! Any news?

@ghost
Copy link
Author

ghost commented Jun 2, 2015

Hi Nicolas,
No, sorry. May is not the most productive month nearby :-)
I don't see that I'll be able to work on the topic in the close future, I'll publish a proposal to work on this to my colleagues.
Wait and see...

@alessandroleite
Copy link

Hello @n-rodriguez
I've talked with @paolosystemx, and I will work on this issue.
All best.

@n-rodriguez
Copy link
Contributor

@alessandroleite Great! May the force be with you!

@n-rodriguez
Copy link
Contributor

Hi! I've added support for Gitolite option in commit : 7b7e458.
Next to 'Git config keys' you'll be able to add 'Gitolite options' such as your mirroring options :)

@n-rodriguez n-rodriguez added this to the v1.2.0 milestone Jul 5, 2015
@n-rodriguez
Copy link
Contributor

Example :

repo    blibl
  RW+                            = redmine_admin
  -     master                   = redmine_developer1 redmine_developer2 redmine_developer3
  -     refs/tags/v[0-9]         = redmine_developer1 redmine_developer2
  RW+   dev/                     = redmine_developer1 redmine_developer2 redmine_developer3
  RW                             = redmine_developer1 redmine_developer2 redmine_developer3
  R                              = redmine_reporter1
  config redminegitolite.projectid = blibl
  config redminegitolite.repositoryid = 
  config redminegitolite.repositorykey = bMs2qj6sPl1ttTZJH5vWJOClIQ2V8ZhwK2d7Szy1CnSDX0EYzE7SuTgAnyrVS7b
  config http.uploadpack = true
  config http.receivepack = true
  config multimailhook.enabled = false
  option mirror.master = mars
  option mirror.slaves = phobos deimos
  option mirror.redirectOK = all

@ghost
Copy link
Author

ghost commented Jul 20, 2015

Thank you @n-rodriguez , we'll try this ASAP!

@timoc
Copy link

timoc commented Jun 10, 2016

Hi,

I have a similar requirement. Did this work for you?

@paolo-crisafulli
Copy link

@timoc , yes, it works fine for us.
Our config:

  • redmine 3.3.0
  • redmine-git-hosting 1.2.0
  • gitolite3 v3.6.4-0-g93e6524 on git 1.9.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants