~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2007-12-22 17:57:04 UTC
  • mto: This revision was merged to the branch mainline in revision 637.
  • Revision ID: aaron.bentley@utoronto.ca-20071222175704-fu8o76bovj1aqt6h
Simplify code by letting find_branches handle standalone branches

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
                self.head_mark[head] = 'dead'
91
91
            # give the list of live branches in repository or current branch
92
92
            # tip
93
 
            if not branch:
94
 
                # runs from shared repo root
95
 
                self._iter_branches_update_marks(repo, self.outf.encoding)
96
 
            else:
97
 
                # runs from branch
98
 
                repo_base = repo.bzrdir.transport.base
99
 
                branch_base = branch.bzrdir.transport.base
100
 
                if repo_base == branch_base:
101
 
                    # standalone branch
102
 
                    last_revid = branch.last_revision()
103
 
                    if last_revid in self.heads:
104
 
                        self.head_mark[last_revid] = 'alive'
105
 
                    else:
106
 
                        self.head_mark[last_revid] = 'tip'
107
 
                    self.tips.setdefault(last_revid, []).\
108
 
                        append(unescape_for_display(branch.base,
109
 
                               self.outf.encoding))
110
 
                else:
111
 
                    # repo
112
 
                    self._iter_branches_update_marks(repo, self.outf.encoding)
 
93
            self._iter_branches_update_marks(repo, self.outf.encoding)
113
94
            self._print_elapsed_time('make head marks:')
114
95
 
115
96
            if tips: