~jelmer/brz/fix-c-extensions

« back to all changes in this revision

Viewing changes to breezy/branch.py

  • Committer: Jelmer Vernooij
  • Date: 2017-07-23 22:06:41 UTC
  • mfrom: (6738 trunk)
  • mto: This revision was merged to the branch mainline in revision 6739.
  • Revision ID: jelmer@jelmer.uk-20170723220641-69eczax9bmv8d6kk
Merge trunk, address review comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
800
800
                try:
801
801
                    url = url.encode('ascii')
802
802
                except UnicodeEncodeError:
803
 
                    raise errors.InvalidURL(url,
 
803
                    raise urlutils.InvalidURL(url,
804
804
                        "Urls must be 7-bit ascii, "
805
805
                        "use breezy.urlutils.escape")
806
806
            url = urlutils.relative_url(self.base, url)
1112
1112
            parent = urlutils.local_path_to_url(parent.decode('utf8'))
1113
1113
        try:
1114
1114
            return urlutils.join(self.base[:-1], parent)
1115
 
        except errors.InvalidURLJoin as e:
 
1115
        except urlutils.InvalidURLJoin as e:
1116
1116
            raise errors.InaccessibleParent(parent, self.user_url)
1117
1117
 
1118
1118
    def _get_parent_location(self):
2259
2259
            try:
2260
2260
                relpath = self.source.user_transport.relpath(normalized)
2261
2261
                source_is_master = (relpath == '')
2262
 
            except (errors.PathNotChild, errors.InvalidURL):
 
2262
            except (errors.PathNotChild, urlutils.InvalidURL):
2263
2263
                source_is_master = False
2264
2264
        if not local and bound_location and not source_is_master:
2265
2265
            # not pulling from master, so we need to update master.