What is the URL of this tortoise svn repository? - php

Using TortoiseSVN, I created a "repository" folder in htdocs directory (Apache web server and PHP). Opened repo-browser Included some files into it. The local URL is:
http://127.0.0.1:8080/repository/project
Now I wanna checkout files into a working folder. When I try to provide URL http://127.0.0.1:8080/repository/project, it doesn't work ?
This is the first time I am using URL (http://).
Previously i have been using file:// successfully. Also have used VisualSVN (for http://) but doing it with Tortoise directly, seems a better idea for me.

Creating repository inside web-space does not convert this repository automagically to be http-served by Apache
Single Apache instance can be ordinary web-server and backend for SVN|WebDAV at the same time
You must to read SVN Book and configure your Apache in order to have http-repositories

Try this link dude Work with Visual SVN Server & Tortoise SVN. This is step by step procedure how to install Visual SVN Server + Tortoise SVN Client Application and how to configure them.
For the Tortoise Url in my case I'm using https://fullcomputername/svn/NameofYourRepository or could find it in your Visual SVN Server Manager. The link that I provide to you will guide you how to find it. :)
It's Highly Recommended to use TortoiseSVN with VisualSVN because they work well together see VisualSVN Testimonials here.

Related

GitHub coding setup

I am new to GitHub. I managed to install GitHub for Windows and created a github repository. I'm a PHP developer and this is my current situation before GitHub.
Currently, all of my work go to C:\xampp\Dropbox\* ("htdocs"). Everything I code is in there with each application under its own subdirectory. Whenever I need to update the production server, I FTP our production server and upload the necessary files. This is good when I am working alone but working with other developers would be hard because we need to know who edited which, when what was edited, etc.
Could you help explain how I can maintain my codes using GitHub? I suppose that I shouldn't make the entire htdocs as a local repository. I access my codes via http://localhost/ when testing it locally. Since I develop web applications using PHP, code changes regularly. We don't compile codes and I was used to simply saving all the files and letting Dropbox save all the versions I made.
It's a bit confusing what to do next since the GitHub for Windows application created local repositories in C:\Users\Admin\Documents\GitHub\test-app folder. Should I edit the code in htdocs and ALSO edit the code in My Documents\GitHub? Then also "push" the update to GitHub AND also update our production server via FTP?
So, to summarize, from the primitive perspective of web development, what steps must be changed so that I can enjoy the benefits of using version control systems such as GitHub?
Thank you!
The global idea is to use a versioning server to push code directly into your production server, bypassing FTP boring method.
You can tell GitHub application to clone your code at Xampp htdocs root, instead cloning it into your documents, if you have already initialized your repositories.
Every project must be a GitHub (or Git, more generally) repository.
So, you have to :
git init all your projects into your local server, at root of your project (so, not htdocs, but htdocs\<YOURPROJECT>
create repositories on GitHub for each of your projects
Follow GitHub instructions to initialize projects, git push on GitHub to finish.
You can do all that with a command line. In my opinion, it's easier.
Your code is on GitHub now. You won't have to edit your code into your documents AND htdocs if you initialize your repos in htdocs.
Next, it could be "fun" to install Git on your production server to grab most recent code from GitHub repository. Without Git, it's a pain in the a** to push code on a production server.
Now, when your local dev server and your production server are in sync, every time you will commit and push on GitHub, you can grab latest copy with a simple git pull on your production server.

Web development; no server source control support

I'm developing web app using CodeIgniter PHP framework. The server I'm working with does not support any type of source control (i.e. Subversion) unless you go to a higher price tier.
I would still like to put the code under some sort of source control. Does it make sense to do the following:
Install git or SVN on my local machine and develop there
Copy changes from my local machine to development directory on the server (using FileZilla, WinSCP, etc.) and test
Copy changes from development directory to production directory on the server
Does that sound reasonable? Are there better alternatives? Thanks!
If you are using svn locally it's a bit dangerous because then you will need to protect also your computer - I think the best way is to work with the commercial sites offer fully supported svn/git - like http://www.beanstalkapp.com/ or http://www.github.com
You could use source control on your local machine (SVN, Git, etc.) and use an open source tool like Capistrano to deploy the code from your local source control repo to your server via SSH. Or if you're limited to FTP, this blog post has a potential solution.
An advantage of using a tool like Capistrano instead of directly mirroring the files on your local machine to the server via FileZilla or WinSCP is that Capistrano will version your deployed files so that, if you end up breaking something and need to roll back quickly to the previously-deployed version, it can be as easy as changing a symlink to the previous deployment directory.
Does that sound reasonable?
Partially, in p.1. But even in this case I'll suggest to have your repository also at some Repository-Hosting (BitBucket, GitHub, Assembla)
For pp. 2-3: your deploys must to be automatic and non-interactive, thus - you'll have to select another tools (for using in post-commit hook of SCM-of-choice)
Somehow better alternative to 2-3 may be:
Use 2 different branches (DEVEL and PROD) as sources of DEVEL and PROD dir
Post-commit hook, which upload only changed in committed revision files to corresponding dir (NCFTP for FTP, SCP with scenario for ssh)
Main development happens in DEVEL branch
PROD have only mergesets from DEVEL
Workflow is SCM-agnostic and scalable to any reasonable amount of branches and developers

PHP + MySQL Deployment

I'm just trying to find an easier way to deploy a site I'm working on. I'm working alone with a test a production server and right now deployment means copying a subset of the files and database data onto my computer and uploading it to the prod site. I'm sure there's a simple synchronization tool out there but so far I've had no luck in finding anything.
What I'd really like is an application I can run locally (on windows) or something I could install on my server for let me have a one-click deployment. Any suggestions?
Thanks!
godwin
Edit
I have decided for now to go with GoodSync and Toad. Thanks for the suggestions.
man scp
SCP(1) BSD General Commands Manual SCP(1)
NAME
scp - secure copy (remote file copy program)
SYNOPSIS
scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user#]host1:]file1
[...] [[user#]host2:]file2
DESCRIPTION
scp copies files between hosts on a network. It uses ssh(1) for data transfer, and uses the same authentication and provides the same
security as ssh(1). Unlike rcp(1), scp will ask for passwords or passphrases if they are needed for authentication.
Any file name may contain a host and user specification to indicate that the file is to be copied to/from that host. Copies between two
remote hosts are permitted.
When copying a source file to a target file which already exists, scp will replace the contents of the target file (keeping the inode).
If the target file does not yet exist, an empty file with the target file name is created, then filled with the source file contents. No
attempt is made at "near-atomic" transfer using temporary files.
The options are as follows:
-1 Forces scp to use protocol 1.
-2 Forces scp to use protocol 2.
...
I use GoodSync http://www.goodsync.com/ for this sort of thing. It's really good. Runs on windows, can sync between any combination of local files (S)FTP, windows, linux network shares etc.
Then create a scheduled task/cronjob to run an export of the database into the syncronised folder and have one do an import at the other end. Obviously this process is one way.
http://www.phing.info/docs/guide/stable/
PHing is an automated build system made for PHP. Works with GIT, SVN, PHPUnit, etc...
You basically set up XML files that give PHing instructions on what to do. Allows you to run test suites along with build creation, build multiple varied versions at a time, copy files as well as db, and a bunch of other cool features.
Also, it's open source and platform independent.
What are you using for source control? Some tools like Git and SVN have ready-made methods for this sort of thing. See here for a quick Git solution.
I would second the advice about Git/SVN, but would put in a strong plug for Git via GitHub. Use GitHub as your "central" Git repository. Your local Git repository will push to GitHub, and your production server will pull from GitHub.
There is some overhead to learning Git/GitHub, but really, in the situation you've described (a single engineer and two servers), Git isn't any more complicated then SVN (or CVS or anything else).
We use an FTP Synchronizer, which seems to work pretty well. I don't know offhand of any good free ones.
Example: http://www.ftpsynchronizer.com/
Depends on what type of server you are running, but you could run SVN (Subversion). There is a plugin for Eclipse, Aptana, and Zend Studio if you use that to develop.
Essentially you could have a development repository that sits on the server. You would pull your code down to your local environment and commit it back after changes. Then you can setup another repository that is your live data or production thats linked back to your Development repository.
When you want to update the live data, you just update it so if any trouble happens you can roll back that code without having to roll back your development code. Once you get good at all that you can start branching and tagging your projects.
I personally use both SVN and Git, but I prefer Git because it works so much better. Though if you are using Windows, the command line tools just aren't the same as linux.

How do I use GIT with my structure/environment?

I want to use GIT as version control for the PHP/MySQL web app I'm developing. I'm going with the server style setup since a couple of developers will also be working on it. I have the sandbox/dev server running (Ubuntu 10.10 server, LAMP package, CodeIgniter 2.01 framework) and its web root is /data/www/webapp.
How do I correctly set up GIT with my environment? Essentially how do I get GIT's "push to" or "I'm up to date and ready to test" directory the same as the web root (so I can just hit refresh in the browser and see the changes results)?
I'm still learning how GIT works so please excuse any incorrect use of terms. Also please no comments about other VCS systems - I'm sticking with GIT for sure.
Thanks in advance
One possible solution is to use a hook in your repo that will react to either new changes or a tag being updated that will export the new content into the appropriate location for your webserver.
The use of hooks makes things very flexible. There are hook points for quite a few actions in a repository and they can do just about anything (if you write it).

SVN checkout browser

I've been looking all over for a SVN browser. Now I'm not talking about anything like WebSVN or TRAC, I don't want to browse the repository; I want to browse the checkout.
I'm looking for a program that lets me browse the checkout (working copy) and shows me the info I'd normally need to SSH for. So I could mark specific files or folders for some commit button, or see the status, or view a diff between the working and a prev version. Basically a web GUI for a svn checkout.
A [windows] program that can let you work on a remote checkout as if it were local would also work.
Currently I have a checkout on my server running under dev.mysite.com. I log in via ftp and edit and upload the files. I also keep SSH open so I can do a svn st to see what files I've worked on and to commit changes. I want to work on the files on the same environment so I can't simply use a local checkout. But I don't want to need to work via SSH.
Are there any apps such as I described? Like a repo browser but for checkouts to do commits. Like WebTortoiseSVN or such.
Thanks
Why don't you SFTP-mount the remote site locally and use something like Tortoise SVN ( http://tortoisesvn.tigris.org/ ) to manage the SVN stuff locally?
For example you mount dev.yoursite.com as drive Z: and you can use it as a local drive. Tortoise SVN automatically finds that it holds a SVN checkout and you can use it transparently.
As the checkout information is stored in the file system is there any reason that you cant mount the ftp directory as a local folder (or just browse to the ftp:// url) and use tortoise on it?
Have you tried the pecl package?
http://www.php.net/manual/en/book.svn.php
It's an API for SVN, so it's not a GUI, but I'm sure you can build one on top.
On a sidenote: your question is somewhat difficult to understand for me. I am not sure what you are really asking for, so if you could clearify some more, I might be able to add to my question.
EDIT If you just need an SVN manager, then go with Tortoise (mentioned elsewhere) or consider using an IDE that has built-in SVN support, like Eclipse.

Categories