~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-03-19 08:45:40 UTC
  • mfrom: (5098.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100319084540-odnankeqqjlnjfjh
(vila) Don't crash on bzr log -n0 -r ...A.B.C

Show diffs side-by-side

added added

removed removed

Lines of Context:
553
553
                    # may not raise _StartNotLinearAncestor for a revision that
554
554
                    # is an ancestor but not a *linear* one. But since we have
555
555
                    # loaded the graph to do the check (or calculate a dotted
556
 
                    # revno), we may as well accept to show the log... 
557
 
                    # -- vila 100201
 
556
                    # revno), we may as well accept to show the log...  We need
 
557
                    # the check only if start_rev_id is not None as all
 
558
                    # revisions have _mod_revision.NULL_REVISION as an ancestor
 
559
                    # -- vila 20100319
558
560
                    graph = branch.repository.get_graph()
559
 
                    if not graph.is_ancestor(start_rev_id, end_rev_id):
 
561
                    if (start_rev_id is not None
 
562
                        and not graph.is_ancestor(start_rev_id, end_rev_id)):
560
563
                        raise _StartNotLinearAncestor()
561
564
                    end_rev_id = rev_id
562
565
                    break
1424
1427
        """
1425
1428
        # Revision comes directly from a foreign repository
1426
1429
        if isinstance(rev, foreign.ForeignRevision):
1427
 
            return self._format_properties(rev.mapping.vcs.show_foreign_revid(rev.foreign_revid))
 
1430
            return self._format_properties(
 
1431
                rev.mapping.vcs.show_foreign_revid(rev.foreign_revid))
1428
1432
 
1429
1433
        # Imported foreign revision revision ids always contain :
1430
1434
        if not ":" in rev.revision_id:
2006
2010
        bug_rows = [line.split(' ', 1) for line in bug_lines]
2007
2011
        fixed_bug_urls = [row[0] for row in bug_rows if
2008
2012
                          len(row) > 1 and row[1] == 'fixed']
2009
 
        
 
2013
 
2010
2014
        if fixed_bug_urls:
2011
2015
            return {'fixes bug(s)': ' '.join(fixed_bug_urls)}
2012
2016
    return {}