~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: Vincent Ladeuil
  • Date: 2010-04-12 16:54:35 UTC
  • mto: (5148.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5151.
  • Revision ID: v.ladeuil+lp@free.fr-20100412165435-gzdnwuybj9rvddiz
Fix bug #519319 by defaulting to a warning for dirty trees.

* bzrlib/mutabletree.py:
(MutableTree.warn_if_changed_or_out_of_date): Factor out the
checks done by send, push and dpush.

* bzrlib/send.py:
(send): Use warn_if_changed_or_out_of_date().

* bzrlib/foreign.py:
(cmd_dpush.run): Use warn_if_changed_or_out_of_date().

* bzrlib/builtins.py:
(cmd_push.run): Use warn_if_changed_or_out_of_date().

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2011 Canonical Ltd
 
1
# Copyright (C) 2005-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
20
20
 
21
21
from bzrlib.lazy_import import lazy_import
22
22
lazy_import(globals(), """
 
23
from bzrlib import deprecated_graph
23
24
from bzrlib import bugtracker
24
25
""")
25
26
from bzrlib import (
120
121
        else:
121
122
            return ''
122
123
 
 
124
    @symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((1, 13, 0)))
 
125
    def get_apparent_author(self):
 
126
        """Return the apparent author of this revision.
 
127
 
 
128
        This method is deprecated in favour of get_apparent_authors.
 
129
 
 
130
        If the revision properties contain any author names,
 
131
        return the first. Otherwise return the committer name.
 
132
        """
 
133
        authors = self.get_apparent_authors()
 
134
        if authors:
 
135
            return authors[0]
 
136
        else:
 
137
            return None
 
138
 
123
139
    def get_apparent_authors(self):
124
140
        """Return the apparent authors of this revision.
125
141