0

I have a project I am going to begin co-developing on one of my web servers. Due to the nature of this kind of thing I'd like to have some version control going on. I've been searching all day for something that fits my needs and Bazaar seems the way to go, but I cannot figure out how to configure it.

My web host is Linux, without SSH (or SFTP as far as I can tell). I've read that you can use Bazaar in this situation to make a "dumb" server, but I can't for the life of me figure out how to configure, or find a guide. Everything out there requires either SSH/CLI access (both of which I don't have) or are too vague to follow. I am using the Windows GUI for Bazaar as well.

Can anyone either point me to a guide/instructions on how to do it, or post one here?

Edit Since Original Post

I have been trying to do several things since my original post. It might be that I am misunderstanding how bazaar is meant to work. What I want is to have my php files etc. on my web host (to which i do not have ssh access) so that myself and codevelopers can edit and test files without overwritting each other.

I initially tried to "start a new project" on my server via "ftp://user:pass@server" and it says that is successful. Then it prompts with a "Unable to open location" error saying "C:/ftp:/user:pass@server is not a brand, checkout, or repository. Do you want to open it as a virtual repository, searching for nested locations?"

When I hit yes, it gives me an error "Unable to change to C:/ftp:/user:pass@server - closing page."

if I do the same thing with the "Open an existing location" option, it gives me the same error, except afterwards the Bazaar GUI hangs with "Not Responding" and needs to be killed.

Either way nothing is created that I can then interact with in Bazaar. If I create a local project and then push, it all seems to work. However, if I try to commit changes so I can push them I get an error "Bazaar has encountered an environmental error. Please report a bug if this is not the result of a local problem at https://bugs.launchpad.net/qbzr/+filebug including this traceback, and a description of what you were doing when the error occurred." the show details says "bzr: ERROR: Unable to determine your name. Please, set your name with the 'whoami' command. E.g. bzr whoami "Your Name ""

sharf
  • 2,123
  • 4
  • 24
  • 47
  • Have you tried pushing a branch to your server with `bzr push ftp://user:pass@server/absolute/path/to/somewhere` ? – janos Feb 18 '14 at 20:45
  • I am using the Windows GUI for Bazaar, and as far as I can figure, there is no place for me to run commands like that. – sharf Feb 19 '14 at 19:45
  • Don't you see a large **Push** button in the toolbar? If not, then go to the menu **Bazaar | Collaborate | Push New Revisions...**. It will pop up a dialog, where you can enter the FTP location in the format in my previous comment. If that works, you're golden. – janos Feb 19 '14 at 20:54
  • It seems to do something, perhaps I'm just clueless as to how this works. However whenever I do what you say, or when I try to open a location at the FTP address, Bazaar throws an error and crashes. – sharf Feb 19 '14 at 21:03
  • The entire Bazaar Explorer crashes? Not just the Push window? Does it show an error message? Please paste exactly (maybe edit inside your question). If the GUI doesn't give more information, then please open a DOS prompt, cd into your project directory and run the `bzr push` command. That should give an error message that we can debug. – janos Feb 19 '14 at 21:07
  • Updated my original post with more info and my results, including errors. – sharf Feb 19 '14 at 21:23

1 Answers1

1

Before you can commit revisions, you need to set a name and email address. These are important metadata in a commit. You can set these in the Settings | Configuration | User Configuration menu. On the General tab enter the Name and E-mail fields. It's recommended to use real data in public projects, so that others who view your project can contact you in case they have questions. But it doesn't have to be real. This is a one-time initial setup.

As a next step, I would do a test to make sure you can really use your server over FTP, as a sanity check:

  1. Commit a few revisions in your local repository, just so that you have something to push. It could be anything, doesn't matter.
  2. Try a push to a URL in the format: ftp://user:pass@server/absolute/path/to/somewhere. In the example in your post you wrote ftp://user:pass@server, but it's important to have an absolute path there, like in this example.

If for some reason the push doesn't work well using the GUI, try it on the command line, for example:

bzr push ftp://user:pass@server/absolute/path/to/somewhere

This should really give an error message we can debug. In that case, paste the output into your question.

UPDATE

You said in comments that something was wrong with your name+email setting, and changing that resolved the problem. It would be nice to know what exactly was the problem there.

About bzr push to an FTP server, I double checked, this will never create the files on the server. From bzr push -h:

The target branch will not have its working tree populated because this is both expensive, and is not supported on remote file systems.

Some smart servers or protocols may put the working tree in place in the future.

Over FTP it's a "dumb" server, so it definitely won't put the files there, only the .bzr directory, which is the repository and branch data. If you want to have the files there, I'm afraid you have to copy manually. There is a related bzr-push-and-update plugin, but it requires ssh access, which is not your case.

janos
  • 120,954
  • 29
  • 226
  • 236
  • I have already set a username and email though, that's the thing. – sharf Feb 19 '14 at 21:43
  • Let me get this straight: the GUI doesn't let you commit, claiming you didn't set your name+email, even though you already did. If you check the settings menu, do you see your name+email there? If you run `bzr whoami` command on the command line, do you get the correct result? If you commit using the command line, does it work? `bzr commit -m "test commit"` – janos Feb 19 '14 at 21:46
  • That is correct. The whoami also fails. I tried resetting the credentials to a different one of my emails and my name, and now it works. Can/How do I access the files via my browser once they are pushed? It seems like I can't. – sharf Feb 19 '14 at 22:27
  • If you push to a path that is accessible from your web server, then that should be visible, but only Bazaar creates a working directory when you push. I don't remember if it can do that when pushing over FTP. Check with an FTP client if the files are there after a push, or only the `.bzr` directory is there. – janos Feb 19 '14 at 23:02
  • only the `.bzr` directory is there, does that mean I have to manually upload the files? – sharf Feb 20 '14 at 01:29
  • In that case you'll have to upload files by FTP if you want to browse them. I updated my answer with detailed explanation. – janos Feb 20 '14 at 06:54