Repository alias trigger

61 views
Skip to first unread message

Roi Rodriguez

unread,
Dec 2, 2014, 4:29:12 AM12/2/14
to gito...@googlegroups.com
Hi,

I've browsed the doc and found about the Alias trigger, which allows to alias a repository that i want to move. Unfortunately, there's no much documentation on the docs about the topic. I've found a blog post here: http://techblog.adrianlowdon.co.uk/2013/07/22/renaming-a-git-repository-under-gitolite-keeping-an-alias-for-the-old-name/

This uses INPUT in rc file, but taking a look at mine's this seems to have changed. I tried:

1 - Move old repository to new location physically.
2 - Update and push conf/gitolite.conf accordingly.
3 - At .gitolite.rc, inside %RC (keys):

ENABLE => [
...,
'Alias',
...,
],

REPO_ALIASES =>
{
'alias' => 'moved-repo',
},

Now cloning 'moved-repo' works as expected, but cloning 'alias' does not work.
Does anybody know how to make this work?

Sitaram Chamarty

unread,
Dec 2, 2014, 9:03:55 AM12/2/14
to Roi Rodriguez, gito...@googlegroups.com
On 12/02/2014 02:59 PM, Roi Rodriguez wrote:
> Hi,
>
> I've browsed the doc and found about the Alias trigger, which allows to alias a repository that i want to move. Unfortunately, there's no much documentation on the docs about the topic. I've found a blog post here: http://techblog.adrianlowdon.co.uk/2013/07/22/renaming-a-git-repository-under-gitolite-keeping-an-alias-for-the-old-name/

As [1] says in the "Important Notes" section at the very top:

If a non-core feature is shipped with gitolite, but information
about it is not found in this page, it can be found within the
source code; please look there.

[1]: http://gitolite.com/gitolite/list-non-core.html

Looking in src/lib/Gitolite/Triggers/Alias.pm will give you the
documentation.

Shamefully (for me!) that appears to be out of date (with respect to the
new format rc file). That does not mean it is wrong, per se, but people
may have to guess. I will fix that.

> This uses INPUT in rc file, but taking a look at mine's this seems to
> have changed. I tried:
>
> 1 - Move old repository to new location physically.
> 2 - Update and push conf/gitolite.conf accordingly.
> 3 - At .gitolite.rc, inside %RC (keys):

Meanwhile, what you did below is perfectly fine and should work
(assuming your rc file has stuff like this in it:

> ENABLE => [
> ...,
> 'Alias',
> ...,
> ],
>
> REPO_ALIASES =>
> {
> 'alias' => 'moved-repo',
> },
>
> Now cloning 'moved-repo' works as expected, but cloning 'alias' does not work.
> Does anybody know how to make this work?

Can you send us the gitolite log lines for the two clone attempts?

Also, make sure

gitolite query-rc INPUT

shows "Alias::input" as one of the items (or the only item).

Roi Rodriguez

unread,
Dec 3, 2014, 7:22:49 AM12/3/14
to gito...@googlegroups.com, roi.rodrig...@gmail.com
Hello. As you said doc inside the source code is a bit out of date, but i guessed it right. What i posted works, all my problem was a typo which made me loose my morning... Sorry and thank you.
Reply all
Reply to author
Forward
0 new messages