Kallithea with non-publishing repos and evolve

Arun Chandrasekaran aruncxy at gmail.com
Tue Oct 9 18:43:33 UTC 2018


It throws an error that Ui.get_or_create is not defined (or similar).

So I tried modifying the patch to something like this:

                sett = Ui.get_by_key('phases')
                if not sett:
                    #make one if it's not there !
                    sett = Ui()
                    sett.ui_key = 'public'
                    sett.ui_section = 'phases'
                    sett.ui_active = 1
                    sett.ui_value = 1
                    Session().add(sett)

It still doesn't work. After dummy setting save and after the push,
the local changesets become public.

Am I missing something here?

Regards,
Arun

On Tue, Oct 9, 2018 at 9:25 AM Thomas De Schampheleire
<patrickdepinguin at gmail.com> wrote:
>
> Yes that is possible, you can just import it using 'hg import' after having switched to the stable branch with 'hg update'.
>
> Best regards,
> Thomas
>
> On Tue, Oct 9, 2018, 17:48 Arun Chandrasekaran <aruncxy at gmail.com> wrote:
>>
>> Hi Thomas,
>>
>> Thanks for your reply. The patch works with default branch.
>>
>> Is there a way to enable this on 0.3.5 as well?
>>
>> Best regards,
>> Arun
>>
>> On Tue, Oct 9, 2018 at 7:22 AM Thomas De Schampheleire
>> <patrickdepinguin at gmail.com> wrote:
>> >
>> > Hi,
>> >
>> > El mar., 9 oct. 2018 a las 16:10, Arun Chandrasekaran
>> > (<aruncxy at gmail.com>) escribió:
>> > >
>> > > Hello,
>> > >
>> > > I'm not sure if this PR has been merged with the default branch, as I
>> > > couldn't get it working.
>> > >
>> > > If it is too complicated to integrate evolve, is it possible to have a
>> > > feature that allows stripping selected changesets?
>> > >
>> > > Users edit their local history and their forks get outdated. At the
>> > > moment the only way to synchronize their forks properly is to delete
>> > > the fork and refork. This is not scaling well as Kallithea stores a
>> > > copy of the deleted repos as "rm__reponame".
>> > >
>> > > Something like this would be fantastic to have: https://i.imgur.com/3aBJtjF.png
>> > >
>> > > Is stripping the csets a feasible option to implement in Kallithea?
>> > >
>> > > I tried doing this change myself, but since I'm not familiar with web
>> > > development I couldn't get any far.
>> > >
>> > > Appreciate the help!
>> >
>> > In the Kallithea instances that I am administering, I am using the
>> > following old patch:
>> >
>> > # HG changeset patch
>> > # User Sean Farley <sean.michael.farley at gmail.com>
>> > # Date 1405350468 -7200
>> > #      Mon Jul 14 17:07:48 2014 +0200
>> > # Node ID 62e0e1e58b38ef2d31552a9c0402f8fdfb50c2a3
>> > # Parent  38d25e749154f715b1220bfd5a95f16e2eaeca91
>> > settings: add non-publishing setting for use with evolve
>> >
>> > NOTE (tdescham): to enable this setting, one needs to save the VCS settings at
>> > least once, even though there is no new configurable option.
>> >
>> > diff --git a/kallithea/controllers/admin/settings.py
>> > b/kallithea/controllers/admin/settings.py
>> > --- a/kallithea/controllers/admin/settings.py
>> > +++ b/kallithea/controllers/admin/settings.py
>> > @@ -130,6 +130,9 @@ class SettingsController(BaseController)
>> >  #                sett = Ui.get_or_create('extensions', 'hggit')
>> >  #                sett.ui_active = form_result['extensions_hggit']
>> >
>> > +                sett = Ui.get_or_create('phases', 'publish')
>> > +                sett.ui_value = 'false'
>> > +
>> >                  Session().commit()
>> >
>> >                  h.flash(_('Updated VCS settings'), category='success')
>> >
>> >
>> > As noted in the commit msg, you need to save the VCS settings of
>> > Kallithea at least once to make this have effect, but after that, the
>> > Kallithea repos will have phases.publish set to False.
>> >
>> > Best regards,
>> > Thomas


More information about the kallithea-general mailing list