librelist archives

« back to archive

[PATCH] Check the existence of a default host before turning into a daemon

[PATCH] Check the existence of a default host before turning into a daemon

From:
Dalton Barreto
Date:
2011-04-17 @ 22:09
Hello Zed,

Here is a simple patch that makes mongrel2 check the existence of
default_host before turning into a daemon. This is useful mainly for
scripts that start mongrel2 instances. Without this patch mongrel2
returns 0 to the shell, but exits right after when it realizes that
default_host does not exist.

The patch is here: http://fossil.daltonmatos.com

Please review and merge, if appropriate.

Thanks!

-- 
Dalton Barreto
http://daltonmatos.wordpress.com
http://wsgid.com

Re: [mongrel2] [PATCH] Check the existence of a default host before turning into a daemon

From:
Zed A. Shaw
Date:
2011-04-18 @ 07:44
On Sun, Apr 17, 2011 at 07:09:05PM -0300, Dalton Barreto wrote:
> Hello Zed,
> 
> The patch is here: http://fossil.daltonmatos.com

You're out of sync with the main repository.  Can you do this:

fossil sync
fossil up

Then you'll be able to do:

fossil leaves

You'll see your leaf and the trunk.  Try this:

fossil merge trunk

Which *should* merge your changes into trunk and let you then commit
them.

There's a bug right now with our repo that sometimes a checkout produces
a ton of leaves in fossil leaves.  If you see that, just try a fossil
merge trunk and let me know if it worked.

And, tomorrow how about I set you up with access to the main repo?

-- 
Zed A. Shaw
http://zedshaw.com/

Re: [mongrel2] [PATCH] Check the existence of a default host before turning into a daemon

From:
Dalton Barreto
Date:
2011-04-18 @ 19:49
2011/4/18 Zed A. Shaw <zedshaw@zedshaw.com>:
> On Sun, Apr 17, 2011 at 07:09:05PM -0300, Dalton Barreto wrote:
>> Hello Zed,
>>
>> The patch is here: http://fossil.daltonmatos.com
>
> You're out of sync with the main repository.  Can you do this:
>
> fossil sync
> fossil up
>
> Then you'll be able to do:
>
> fossil leaves
>
> You'll see your leaf and the trunk.  Try this:
>
> fossil merge trunk
>
> Which *should* merge your changes into trunk and let you then commit
> them.
>
> There's a bug right now with our repo that sometimes a checkout produces
> a ton of leaves in fossil leaves.  If you see that, just try a fossil
> merge trunk and let me know if it worked.
>

Makes sense. Actually when I cloned mongrel2 main repo I changed the
remote-url setting so I could commit/push to my own copy of the repo.
What I didn't know was the "fossil push [URL]" command (I didn't
RTFM!). I think this would give me the possibility to have a
mongrel2.fossil pointing to mongrel2.org and at the same time I could
commit to this repo but push the changes into fossil.daltonmatos.com.
Anyway I try do follow your instructions later today.

If nothing of this works I can just start from scratch (I have the
patch saved) and apply the patch again. We will see.


> And, tomorrow how about I set you up with access to the main repo?
>

That would be great!
Could be the same username: daltonmatos.

Thanks!

-- 
Dalton Barreto
http://daltonmatos.wordpress.com
http://wsgid.com

Re: [mongrel2] [PATCH] Check the existence of a default host before turning into a daemon

From:
Dalton Barreto
Date:
2011-04-18 @ 23:05
2011/4/18 Dalton Barreto <daltonmatos@gmail.com>:
> 2011/4/18 Zed A. Shaw <zedshaw@zedshaw.com>:
>> On Sun, Apr 17, 2011 at 07:09:05PM -0300, Dalton Barreto wrote:
>>> Hello Zed,
>>>
>>> The patch is here: http://fossil.daltonmatos.com
>>
>> You're out of sync with the main repository.  Can you do this:
>>
>> fossil sync
>> fossil up
>>
>> Then you'll be able to do:
>>
>> fossil leaves
>>
>> You'll see your leaf and the trunk.  Try this:
>>
>> fossil merge trunk
>>
>> Which *should* merge your changes into trunk and let you then commit
>> them.
>>
>> There's a bug right now with our repo that sometimes a checkout produces
>> a ton of leaves in fossil leaves.  If you see that, just try a fossil
>> merge trunk and let me know if it worked.
>>
>
> Makes sense. Actually when I cloned mongrel2 main repo I changed the
> remote-url setting so I could commit/push to my own copy of the repo.
> What I didn't know was the "fossil push [URL]" command (I didn't
> RTFM!). I think this would give me the possibility to have a
> mongrel2.fossil pointing to mongrel2.org and at the same time I could
> commit to this repo but push the changes into fossil.daltonmatos.com.
> Anyway I try do follow your instructions later today.
>
> If nothing of this works I can just start from scratch (I have the
> patch saved) and apply the patch again. We will see.
>

OK, here we go. Round 2!

It was able to merge the changes that my repo didn't have. But my
timeline is now different from mongrel2.org's timeline. Repo's content
is the same, thought.
All checkins that my repo didn't have, are now in a same checkin (just
a big patch). <http://fossil.daltonmatos.com/info/cf1eb1e71a>

I pushed all this to http://fossil.daltonmatos.com. Let me know if
it's ok for you to pull my patch.
If it's not, just let me know and I will start all over, re-apply the
patch and push again.

Thanks!

-- 
Dalton Barreto
http://daltonmatos.wordpress.com
http://wsgid.com

Re: [mongrel2] [PATCH] Check the existence of a default host before turning into a daemon

From:
Zed A. Shaw
Date:
2011-04-19 @ 21:46
On Mon, Apr 18, 2011 at 08:05:33PM -0300, Dalton Barreto wrote:
> OK, here we go. Round 2!

Alright, all merged in and I've rolled it out on trunk.

Go ahead and email me privately so I can give you access to the repo and
get you to just commit directly.

-- 
Zed A. Shaw
http://zedshaw.com/

Re: [mongrel2] [PATCH] Check the existence of a default host before turning into a daemon

From:
Dalton Barreto
Date:
2011-04-19 @ 23:33
2011/4/19 Zed A. Shaw <zedshaw@zedshaw.com>:
> On Mon, Apr 18, 2011 at 08:05:33PM -0300, Dalton Barreto wrote:
>> OK, here we go. Round 2!
>
> Alright, all merged in and I've rolled it out on trunk.
>

Great, thanks!

> Go ahead and email me privately so I can give you access to the repo and
> get you to just commit directly.
>

Alright.

-- 
Dalton Barreto
http://daltonmatos.wordpress.com
http://wsgid.com