Re: [ros-users] hudson prerelease error

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ bzr.patch (text/x-patch)
Delete this message
Reply to this message
Author: User discussions
Date:  
To: Tully Foote
CC: User discussions, wim
Subject: Re: [ros-users] hudson prerelease error
Ok, I updated my _rules and it now compiles happily in the prerelease.

Concerning the release process, I have a new patch to propose (attached) for
bzr.

I added the uri parameter to the bzr rules: I needed the base url, to be
able to push to base_url + release_tag.

I tested the tag_bzr part of the create.py script and it worked for me.

Cheers,

Ugo


On Thu, Mar 31, 2011 at 9:14 AM, Ugo Cupcic <> wrote:

> Ok, thanks a lot for adding the bzr support so quickly!
>
> My stack is not at the root in the trunk, but is in the stable branch, from
> which I was planning to do the releases anyway.
>
> Cheers,
>
> Ugo
>
>
> On Thu, Mar 31, 2011 at 2:48 AM, Tully Foote <>wrote:
>
>> Ugo,
>>
>> I think that we have worked out everything at our end now. This latest
>> test build
>> http://build.willowgarage.com/view/pre-release/job/prerelease_diamondback_shadow_robot_maverick_i386/13/consolefailed because you didn't have a stack.xml at the root of your tree. This
>> is a requirement because distributed VCSs like bzr only allow branching at
>> the root. Consequently we require stacks to be at the root to allow the
>> release toolchain to automatically operate.
>>
>> Tully
>>
>> On Wed, Mar 30, 2011 at 1:55 PM, Wim Meeussen <>wrote:
>>
>>> Ugo,
>>>
>>> > The command to branch is just:
>>> > > bzr branch lp:sr-ros-interface/stable
>>>
>>> I changed your rosdistro entry uri to: uri: 'lp:sr-ros-interface'.
>>> This solves part of the problem, but now we hit a bug in the
>>> rosinstall script. Tully will be pushing out a fix.
>>>
>>> Wim
>>>
>>>
>>>
>>>
>>> --
>>> --
>>> Wim Meeussen
>>> Willow Garage Inc.
>>> <http://www.willowgarage.com)
>>> _______________________________________________
>>> ros-users mailing list
>>>
>>> https://code.ros.org/mailman/listinfo/ros-users
>>>
>>
>>
>>
>> --
>> Tully Foote
>> Systems Engineer
>> Willow Garage, Inc.
>>
>> (650) 475-2827
>>
>
>
>
> --
> Ugo Cupcic | Shadow Robot Company |
> Software Engineer | 251 Liverpool Road |
> need a Hand? | London N1 1LX | +44 20 7700 2487
> http://www.shadowrobot.com/hand/ @shadowrobot
>
>



--
Ugo Cupcic | Shadow Robot Company |
Software Engineer | 251 Liverpool Road |
need a Hand? | London N1 1LX | +44 20 7700 2487
http://www.shadowrobot.com/hand/ @shadowrobot
Index: release/scripts/create.py
===================================================================
--- release/scripts/create.py    (revision 13594)
+++ release/scripts/create.py    (working copy)
@@ -297,13 +297,12 @@
     cmds = []


     config = distro_stack.vcs_config
     from_url = config.repo_uri


     # First create a release tag in the bzr repository.
     make_tag = False
     while True:
-        prompt = raw_input("Would you like to tag %s as %s in %s, [y/n]"%(config.dev_branch, config.release_tag, from_url))
+        prompt = raw_input("Would you like to tag %s as %s in %s, [y/n]"%(config.dev, config.release_tag, from_url))
         if prompt == 'y':
             make_tag = True
             break
@@ -314,11 +313,10 @@
         tempdir = tempfile.mkdtemp()
         temp_repo = os.path.join(tempdir, distro_stack.name)
         bzr_client = BZRClient(temp_repo)
-        bzr_client.checkout(from_url, config.dev_branch)
+        bzr_client.checkout(config.dev)


-        #bzr tag -d lp:sr-ros-interface --force tes
         #directly create and push the tag to the repo
-        subprocess.check_call(['bzr', 'tag', '-d', config.dev_branch,'--force',config.release_tag], cwd=temp_repo)
+        subprocess.check_call(['bzr', 'tag', '-d', config.dev,'--force',config.release_tag], cwd=temp_repo)


     # Now create a distro branch.
     # In bzr a branch is a much better solution since
@@ -326,7 +324,7 @@
     make_tag = False
     while True:
         branch_name = config.release_tag
-        prompt = raw_input("Would you like to create the branch %s as %s in %s, [y/n]"%(config.dev_branch, branch_name, from_url))
+        prompt = raw_input("Would you like to create the branch %s as %s in %s, [y/n]"%(config.dev, branch_name, from_url))
         if prompt == 'y':
             make_tag = True
             break
@@ -337,10 +335,14 @@
         tempdir = tempfile.mkdtemp()
         temp_repo = os.path.join(tempdir, distro_stack.name)
         bzr_client = BZRClient(temp_repo)
-        bzr_client.checkout(from_url, config.dev_branch)
+        bzr_client.checkout(config.dev)


-        #subprocess.check_call(['bzr', 'branch', '-f', branch_name, config.dev_branch], cwd=temp_repo)
-        subprocess.check_call(['bzr', 'push', '--create-prefix', from_url+"/"+branch_name], cwd=temp_repo)
+        #Make sure we only have one /, otherwise the push fails
+        if from_url[-1] == "/":
+            branch_url = from_url + branch_name
+        else:
+            branch_url = from_url + "/" + branch_name
+        subprocess.check_call(['bzr', 'push', '--create-prefix', branch_url], cwd=temp_repo)


     urls.append(config.distro_tag)
     return urls
Index: rosdistro/src/rosdistro.py
===================================================================
--- rosdistro/src/rosdistro.py    (revision 13594)
+++ rosdistro/src/rosdistro.py    (working copy)
@@ -100,6 +100,7 @@
                 import vcstools.bzr
                 vcs_config = vcstools.bzr.BZRConfig()
                 r = rules['bzr']
+                vcs_config.repo_uri      = rule_eval(r['uri'])


             for k in ['dev', 'distro-tag', 'release-tag']:
                 if not k in r:
Index: vcstools/src/vcstools/bzr.py
===================================================================
--- vcstools/src/vcstools/bzr.py    (revision 13594)
+++ vcstools/src/vcstools/bzr.py    (working copy)
@@ -107,13 +107,15 @@
     of code. The configuration we maintain is specific to ROS
     toolchain concepts and is not a general notion of BZR configuration.


+     * repo_uri: You'll be pushing to repo_uri+release_tag.
      * dev: where the code is developed
      * distro_tag: a tag of the code for a specific ROS distribution
      * release_tag: a tag of the code for a specific release
     """


     def __init__(self):
         self.type = 'bzr'
+        self.repo_uri = None
         self.dev = None
         self.distro_tag = None
         self.release_tag = None
@@ -127,7 +129,8 @@
         self.anon_release_tag = None


     def __eq__(self, other):
-        return self.dev == other.dev and \
+        return self.repo_uri == other.repo_uri and \
+            self.dev == other.dev and \
             self.distro_tag == other.distro_tag and \
             self.release_tag == other.release_tag and \
             self.anon_dev == other.anon_dev and \
@@ -135,4 +138,4 @@
             self.anon_release_tag == other.anon_release_tag


     def __repr__(self):
-        return "{dev: '%s', distro-tag: '%s', 'release-tag': '%s', anon-dev: '%s', anon-distro-tag: '%s', anon-release-tag: '%s'}"%(self.dev, self.distro_tag, self.release_tag, self.anon_dev, self.anon_distro_tag, self.anon_release_tag)
+        return "{repo-uri: '%s', dev: '%s', distro-tag: '%s', 'release-tag': '%s', anon-dev: '%s', anon-distro-tag: '%s', anon-release-tag: '%s'}"%(self.repo_uri, self.dev, self.distro_tag, self.release_tag, self.anon_dev, self.anon_distro_tag, self.anon_release_tag)
Index: rosdeb/src/rosdeb/rosutil.py
===================================================================
--- rosdeb/src/rosdeb/rosutil.py    (revision 13594)
+++ rosdeb/src/rosdeb/rosutil.py    (working copy)
@@ -130,9 +130,11 @@
         if key == 'svn':
             uri = distro_stack.expand_rule(distro_stack._rules[key]['dev'])
             version = ''
-        elif key in ['hg', 'git', 'bzr']:
+        elif key in ['hg', 'git']:
             uri = distro_stack.expand_rule(distro_stack._rules[key]['uri'])
             version = distro_stack.expand_rule(distro_stack._rules[key]['dev-branch'])
+        elif key == 'bzr':
+            uri = distro_stack.expand_rule(distro_stack._rules[key]['dev'])
         else:
             raise Exception ("key %s not implemented"%key)


@@ -143,7 +145,10 @@
     dest = os.path.join(tmp_dir, name)
     print 'Checking out a fresh copy of %s from %s to %s...'%(name, uri, dest)
     vcs_client = vcstools.vcs_abstraction.VCSClient(key, dest)
-    vcs_client.checkout(uri, version)
+    if key == 'bzr':
+        vcs_client.checkout(uri)
+    else:
+        vcs_client.checkout(uri, version)
     return tmp_dir


def convert_html_to_text(d):