Newbie Q: Can't do first push to web server
Hello,
I have a newbie question about Bazaar, please:
Briefly:
- I'm having trouble getting my first "bzr push" to a web server to work.
- I'm experienced with CVS and SVN, but this is my first time trying to use a DVCS.
- I hope this email is to the right address, and that I'm not violating some protocol as a newbie. I read quite a bit of doc, tried to search the archives, and so on.
System:
======
- OS/X 10.5
- Just installed Bzr 2.1.0 (I think that's stable, right?)
What I'm Trying to Do Generally
=======
Generally
------------
- I have a Mac Desktop, and a Mac Laptop.
- I want to use the Standalone configuration (I think)
- I want to be able to keep the 2 machines in sync 2 ways:
- Via web server (this email)
- Via shared drive (separate email, later)
- Therefore, I want to have 4 Standalone Branches.
- Desktop
- Laptop
- Webserver (trying to create this now)
- Shared drive (later...)
(is this reasonable?)
- I also want to eventually publish the project on this or another web server.
- I have used bzr init to create a local branch. (I'm not sure if that's a repository too - I don't think so).
- I committed 3 files, and bzr status seems ok - those 3 files are not unknown.
What I'm trying to do, Specifically
=======
I am trying to push my first test bzr code tree to my web server.
Webserver Setup
-------
- I have a login account, with a home directory, eg /home/my_username
- There is a public_html link to another filesystem
- Under public_html are directories for 3 domains I manage. I'm interested in "my_domain_dir".
- Under my_domain, I want to put my project directory: my_project:
/www/
- And this is where I want/expect my .bzr directory to go.
Domains
-----------
- There are 2 urls, and I don't know which one you want:
- my_domain.net
- their_server_
- I tried both (see below)
Directory
------------
- It seems I can create the target project directory, or not, and --use-existing-dir depending...
- Tried both with and without (see below)
The documentation says:
"You don’t need a special server to publish a bzr branch, just a normal web server.
Just mirror the files to your server, including the .bzr directory.
One can push a branch (or the changes for a branch) by one of the following three methods:
The best method is to use bzr itself to do it.
% bzr push sftp://
(The destination directory must already exist unless the --create-prefix option is used.)
Question: What is "path/to/directory" supposed to be, based on my server directory structure mentioned above?
public_
public_
my_
my_project_dir
- I tried a variety of these, but could not get anything to work (some examples below).
My Attempts
==========
I usually use ftp to transfer files to that system, so I tried that and also sftp.
(substituting "my_username" for my actual username, "my_domain.net" for my domain, etc)
- These attempts are all from within my local project directory - the directory containing the .bzr directory.
FTP
-----
[/usr/www/
bzr push ftp://my_
FTP my_username@
bzr: ERROR: Target directory ftp://my_
bzr push ftp://my_
FTP my_username@
bzr: ERROR: Target directory ftp://my_
- There is no .bzr directory anywhere on the webserver - I swear.
- Checked:
%pwd
/usr/home/
%ls -al
total 300
drwxr-xr-x 9 my_username users 512 Mar 11 22:49 .
drwx--x--x 171 root wheel 3584 Feb 20 18:13 ..
-rw-r--r-- 1 my_username users 628 Sep 8 2002 .cshrc
[...]
%cd public_html/
%ls -al
total 24
drwxr-xr-x 8 my_username users 512 May 18 2007 .
drwx--x--x 171 root wheel 3584 Feb 20 18:13 ..
drwx---r-x 10 my_username users 512 Jul 20 2008 abc
[...]
%cd jcd
%ls -al
total 28
drwx---r-x 5 my_username users 512 Mar 11 20:06 .
drwxr-xr-x 8 my_username users 512 May 18 2007 ..
drwxr-xr-x 3 my_username users 512 May 18 2007 DProject
[...]
%cd my_proj/
%ls -al
total 4
drwxr-xr-x 2 my_username users 512 Mar 11 20:06 .
drwx---r-x 5 my_username users 512 Mar 11 20:06 ..
%
- remove my_project subdirectory from the server,
=> get the exact same 2 error messages.
- Add my_project to push command:
bzr push ftp://my_
FTP my_username@
bzr: ERROR: Target directory ftp://my_
- Add --use-existing-dir as suggested:
bzr push ftp://my_
FTP my_username@
bzr: ERROR: Parent directory of ftp://my_
You may supply --create-prefix to create all leading parent directories.
- Add --create-prefix as suggested:
bzr push ftp://my_
FTP my_username@
bzr: ERROR: No such file: '/my_proj': error w/ stat: 550 No such directory.
- I thought you were going to create it for me!?
- OK, create that directory on the server and try again.
bzr push ftp://my_
FTP my_username@
bzr: ERROR: No such file: '/my_proj': error w/ stat: 550 No such directory.
Another Angle
=========
OK, maybe I'm supposed to use my ISP's server name, not my domain name. Try that:
> bzr push ftp://my_
FTP my_username@
bzr: ERROR: Target directory ftp://my_
> bzr push ftp://my_
FTP my_username@
bzr: ERROR: Target directory ftp://my_
> bzr push ftp://my_
FTP my_username@
bzr: ERROR: Parent directory of ftp://my_
You may supply --create-prefix to create all leading parent directories.
> bzr push ftp://my_
FTP my_username@
bzr: ERROR: No such file: '/my_proj': error w/ stat: 550 No such directory.
[Tried some other variations of the URL - really unclear what that's supposed to be]
Questions
========
- Am I supposed to install Bazaar on the web server? I'm not sure if I can do that.
- What path is that supposed to be in the 'bzr push' command?
- Starting at my ftp login home directory?
- Starting under public_html?
- Something else?
- Is there something wrong with my whole approach?
- I tried using 'branch' instead of 'push', but that didn't seem to work, and didn't seem right.
- Should I be trying to run something on the server first?
- Is there another tutorial somewhere, which gives an example of how to do this?
- Other ideas?
Thanks very much in advance,
- Jim
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Bazaar Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask James Dean for more information if necessary.