"running" code on client side with cherrypy?

M

Mr BigSmoke

Hi All,
I'm developing a website to handle some code/application version
control on a intranet. I'm using cherrypy and pysvn. Everything runs
quite good but i want the user to be able to checkout some projects
from the server. The user(on the client side) selects a folder in his
machine (i.e.: C:\Project1) and the server should checkout
(download/copy) all the project selected to the client machine. But
what happens is that the webserver shckout the project on the same
folder selected by the user but at server side. Everything works if
the user gives a network path (like \\pcname\sharedFolder). Any hint?

tnx!

Fabio
 
J

jay graves

Mr said:
Hi All,
I'm developing a website to handle some code/application version
control on a intranet. I'm using cherrypy and pysvn. Everything runs
quite good but i want the user to be able to checkout some projects
from the server. The user(on the client side) selects a folder in his
machine (i.e.: C:\Project1) and the server should checkout
(download/copy) all the project selected to the client machine. But
what happens is that the webserver shckout the project on the same
folder selected by the user but at server side. Everything works if
the user gives a network path (like \\pcname\sharedFolder). Any hint?

The folder is created on the server because that is where the CherryPy
code is running. It's not running on the client. Security concerns
dictate that this will never work the way you want. It's a fundamental
restriction of the web.
How would the user feel if they accidentally selected 'C:\windows\' as
the download path and their computer got messed up? ;-) Or more
likely, a spyware website could download a trojan to your computer when
you thought your were downloading a movie. When this kind of thing
happens today it's considered an exploit.

The reason that the UNC path works is that you are on an intranet and
the target PC has a shared folder. If you are actually signed on the
the web server and you open a CMD prompt you could key an equivalent
copy command and it would work. CherryPy is just doing the same thing.
But if your CheryPy app was exposed to the internet and I was running
it and asked to save the code to \\jgraves\share it would not work
because your intranet does not have a machine named 'jgraves'
(presumably).

I think the best that you could do would be to give a link to a zip
file and let the user choose the path they want to unzip to once they
have downloaded the file.

As for working with SVN, I really like TortoiseSVN but you would have
to install it on all machines which is what you are trying to avoid (I
think.)

Sorry to be the bearer of bad news.

....
jay graves
 
M

Mr BigSmoke

Tnx Jay... as i supposed there's no easy solution... I just thought
that, maybe, being on an intranet there was a possible solution...
About pysvn a tortoise... i do use tortoiseSVN and t works really
really fine.. we (developers) use it, but i'm writting server for
"normal" users that can checkout our applications releases... I'll try
some other solution... thanks very much!
cheers

Fabio
 
P

Paul Rubin

Mr BigSmoke said:
Tnx Jay... as i supposed there's no easy solution... I just thought
that, maybe, being on an intranet there was a possible solution...

There are ways to ask the user for permission to install stuff on the
client (that's how self-installers work) but they're messy and browser
specific.
 
B

Bruno Desthuilliers

Mr said:
Tnx Jay... as i supposed there's no easy solution... I just thought
that, maybe, being on an intranet there was a possible solution...
About pysvn a tortoise... i do use tortoiseSVN and t works really
really fine.. we (developers) use it, but i'm writting server for
"normal" users that can checkout our applications releases...

If the goal is to allow final users to download releases, then it's
simpler - you just have to serve them with archived (zipped, tarballs,
Python-Eggs, whatever) versions of the last release so they can download
it - the browser will then ask them where tehy want to save it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top