/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 breezy/plugins/propose/launchpad.py

  • Committer: Jelmer Vernooij
  • Date: 2019-06-16 02:23:42 UTC
  • mfrom: (7340 work)
  • mto: This revision was merged to the branch mainline in revision 7350.
  • Revision ID: jelmer@jelmer.uk-20190616022342-ihxzayq04x5culzd
merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
        return False
75
75
    if url.startswith('lp:'):
76
76
        return True
77
 
    regex = re.compile('([a-z]*\+)*(bzr\+ssh|http|ssh|git|https)'
78
 
                       '://(bazaar|git).*\.launchpad\.net')
 
77
    regex = re.compile(r'([a-z]*\+)*(bzr\+ssh|http|ssh|git|https)'
 
78
                       r'://(bazaar|git).*\.launchpad\.net')
79
79
    return bool(regex.match(url))
80
80
 
81
81
 
203
203
        return plausible_launchpad_url(branch.user_url)
204
204
 
205
205
    @classmethod
206
 
    def probe_from_url(cls, url):
 
206
    def probe_from_url(cls, url, possible_transports=None):
207
207
        if plausible_launchpad_url(url):
208
208
            return Launchpad()
209
209
        raise UnsupportedHoster(url)
687
687
 
688
688
def modified_files(old_tree, new_tree):
689
689
    """Return a list of paths in the new tree with modified contents."""
690
 
    for f, (op, path), c, v, p, n, (ok, k), e in new_tree.iter_changes(
691
 
            old_tree):
692
 
        if c and k == 'file':
 
690
    for change in new_tree.iter_changes(old_tree):
 
691
        if change.changed_content and change.kind[1] == 'file':
693
692
            yield str(path)