Bug #19530 autopush does not detect parent tree for 5.1
Submitted: 4 May 2006 8:18 Modified: 16 Mar 2009 11:13
Reporter: Ingo Strüwing Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:autopush version 2.20, 4.12 OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[4 May 2006 8:18] Ingo Strüwing
Description:
autopush --force_clone --build_host=sles9-x86.mysql.com --build_user=istruewing --build_dir=/nfstmp1/ingo/autopush --target_user=istruewing --suffix=autopush --background --email_addr=ingo@mysql.com

results in this log file:

autopush.4952: Pulling latest from target source tree (target host)
autopush.4952: Now executing: bk pull
Pull istruewing@bk-internal.mysql.com:/home/bk/mysql-5.1
  -> file://nfstmp1/ingo/autopush/mysql-5.1-bug10405autopush
ERROR-cannot cd to /home/bk/mysql-5.1 (illegal, nonexistant, or not package root)

How to repeat:
See above, but please use your own user, dir, and email settings.

Suggested fix:
For version 5.1 we need to pull from bk-internal.mysql.com:/home/bk/mysql-5.1-new.
[26 Jun 2006 17:52] Ingo Strüwing
The same applies to 5.0:

The parent of the launch directory is file://home/mydev/mysql-5.0--main.
The parent of file://home/mydev/mysql-5.0--main is istruewing@bk-internal.mysql.com:/home/bk/mysql-5.0.

The command
autopush --build_host=localhost --build_dir=$HOME/autopush/bug16986 --target_user=istruewing
resulted in
...
Set parent to istruewing@bk-internal.mysql.com:/home/bk/mysql-5.0--main
...
which doesn't work.
[23 Jan 2007 10:06] Ingo Strüwing
This happens in version 4.12 too.
My hierarchy of repositories is as follows:
bk-internal.mysql.com:/home/bk/mysql-5.1-engines ->
  ~/mysql-5.1--team ->
  ~/mysql-5.1-bug24607

The latest is my work tree from which I try to run autopush:

~/internals/dev/autopush.pl --build_dir=autopush --email_addr=ingo@mysql.com --bk_user=xxx --use_bkd
autopush.pl: Checking for needed tools and access to machines..
autopush.pl: Preparing source tree at build host
autopush.pl: Preparing build clone..
Add parent istruewing@bk-internal.mysql.com:/home/bk/mysql-5.1--team
autopush.pl.8031: Pulling latest from source tree (target host)
ERROR: Pull from parent failed
ERROR: Failed to start remote build

In the log file on production.mysql.com:~/autopush/mysql-5.1-bug24607/autopush/autopush.8031.log I read:

autopush.pl.8031: Pulling latest from source tree (target host)
Running: bk pull -s
Pull istruewing@bk-internal.mysql.com:/home/bk/mysql-5.1--team
  -> file://usersnfs/istruewing/autopush/mysql-5.1-bug24607
ERROR-cannot cd to /home/bk/mysql-5.1--team (illegal, nonexistent, or not package root)
ERROR: Pull from parent failed

So it seems like autopush assumes the base name of the parent repository of the work tree is the same as the base name of the target repository.

Please let autopush do recursive parent searches until the top repository is found. This should be the one that starts with the values from --target_host and --target_dir (bk-internal.mysql.com:/home/bk in my case).

The found repository should be treated as the default target repository. In cases that one wants to push elsewhere there should be an option for the target repository. For example --target_repository.

If --target_dir is meant to have this meaning, then please document it as such. And do not give it a default of /home/bk. If you can't find the matching repository in /home/bk, then leave it empty. I took the default as the root directory for all master repositories. So I thought it was correct and I didn't need to use the --target_dir option.
[27 Aug 2008 6:25] Sveta Smirnova
Ingo, please answer Trudy's question. I believe this should be "Unsupported" or "Not a Bug" now.
[1 Sep 2008 15:58] Ingo Strüwing
Hi Trudy, yes and no. Yes, because the search-parent feature has not been implemented yet (as far as I know). No, because autopush isn't converted to bzr yet, and as such completely useless at the moment (I just pulled the internals repository to be sure).
[16 Mar 2009 11:13] Daniel Fischer
autopush is not used anymore with bzr.