/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/bugtracker.py

  • Committer: Jonathan Lange
  • Date: 2007-04-13 06:42:25 UTC
  • mto: This revision was merged to the branch mainline in revision 2446.
  • Revision ID: jml@canonical.com-20070413064225-cmuz00itroirlro4
Use urlutils.join instead of ugly, buggy, string mashing

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
from bzrlib import registry
19
19
from bzrlib.lazy_import import lazy_import
20
20
lazy_import(globals(), """
21
 
from bzrlib import errors
 
21
from bzrlib import errors, urlutils
22
22
""")
23
23
 
24
24
 
84
84
    def get_bug_url(self, bug_id):
85
85
        """Return the URL for bug_id."""
86
86
        self.check_bug_id(bug_id)
87
 
        return self.base_url + bug_id
 
87
        return urlutils.join(self.base_url, bug_id)
88
88
 
89
89
    def check_bug_id(self, bug_id):
90
90
        """Check that the bug_id is valid."""
143
143
            int(bug_id)
144
144
        except ValueError:
145
145
            raise errors.MalformedBugIdentifier(bug_id, "Must be an integer")
146
 
        return '%s/ticket/%s' % (self._url, bug_id)
 
146
        return urlutils.join(self._url, 'ticket', bug_id)
147
147
 
148
148
tracker_registry.register('trac', TracTracker)