/breezy-hg/trunk

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy-hg/trunk

« back to all changes in this revision

Viewing changes to branch.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-19 21:21:33 UTC
  • Revision ID: jelmer@jelmer.uk-20181119212133-l9vwjrub3sd8tia8
Fix tests against current brz.

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
 
105
105
    def _get_hg_tags(self):
106
106
        revtree = self.source_branch.repository.revision_tree(self.revid)
107
 
        file_id = revtree.path2id(".hgtags")
108
 
        if file_id is None:
 
107
        if not revtree.is_versioned(".hgtags"):
109
108
            return {}
110
109
        with revtree.lock_read():
111
 
            f = revtree.get_file(".hgtags", file_id)
 
110
            f = revtree.get_file(".hgtags")
112
111
            ret = {}
113
112
            for l in f.readlines():
114
113
                try:
115
114
                    (hgtag, name) = l.strip().split(" ", 1)
116
115
                except ValueError:
117
 
                    pass # Invalid value, just ignore?
 
116
                    pass  # Invalid value, just ignore?
118
117
                else:
119
118
                    ret[name] = hgtag
120
119
            return ret
542
541
        result.source_branch = self.source
543
542
        result.target_branch = self.target
544
543
        result.old_revid = self.target.last_revision()
545
 
        if stop_revision is not None:
 
544
        if stop_revision is None:
546
545
            stop_revision = self.source.last_revision()
547
546
        self.fetch(stop_revision, fetch_tags=True)
548
547
        if overwrite: