Re: [web2py] Re: Best practices for using mercurial within web2py

2014-02-28 Thread Dave S


On Friday, February 28, 2014 9:27:50 AM UTC-8, Mark Graves wrote:
>
> Thanks for the replies.
>
> I am using web2py as a front end for bitbucket and mercurial.  Mercurial 
> is managing multiple repos on my site.  I click a button to pull new code 
> in from bitbucket.
>
> The way I am currently doing it is passing a path into a subprocess which 
> runs mercurial commands to do the pulls and updates.
>
> I did this to avoid os.chdir() (for thread safety) ... 
>
> Is it better to use the mercurial python api?
>
>
I know the hg people do not recommend the python interface, they recommend 
the command server or passing the same commands as you'd use in a terminal 
interface.  The command server gives you  performance close to the internal 
calls, and there may be a python flavor of it.   However, it may not make 
sense if you can't keep the connection open, and I'm not sure how web2py 
would deal with that in a non-DAL situation.

The internal API, unlike the user-visible commands and the command server, 
is not guaranteed to be consistent from release to release.  Bundled 
extensions are guaranteed to be updated to match; third-party extensions 
need to be watching for the RC candidates.

/dps


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: Best practices for using mercurial within web2py

2014-02-28 Thread Mark Graves
Thanks for the replies.

I am using web2py as a front end for bitbucket and mercurial.  Mercurial is
managing multiple repos on my site.  I click a button to pull new code in
from bitbucket.

The way I am currently doing it is passing a path into a subprocess which
runs mercurial commands to do the pulls and updates.

I did this to avoid os.chdir() (for thread safety) ...

Is it better to use the mercurial python api?

Anyone have any experience with this?

Mark


On Thu, Feb 27, 2014 at 3:12 PM, Dave S  wrote:

> On Friday, February 21, 2014 7:28:20 PM UTC-8, Mark Graves wrote:
>>
>> Hey everyone,
>>
>> I'm trying to use web2py to manage multiple repos on my local system.
>>
>> I know using os.chdir is a problem.
>>
>> Is the best way to just hg clone [REPO_URL] [FULL_PATH_TO_FILES]?
>>
>>
>  I'm not sure what you mean by "manage multiple repos" ... are you trying
> to use w2p as a front-end for mecurial?  Are you wanting to browse the
> repos and/or push/pull? Mercurial has its own web-server that would run
> directly under apache (it also has a lighter web-server which is mostly
> used for temporary intranet sharing, AIUI).
>
> If you are trying to front the repos from web2py, perhaps you want to
> investigate the command server that mercurial provides.
>
> If I'm off-track on what you want to do, perhaps you could gives us a more
> precise description.
>
> /dps
>
>  --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/KbUVnZTLlEM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.