/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 bzrlib/progress.py

  • Committer: Robert Collins
  • Date: 2009-05-23 20:57:12 UTC
  • mfrom: (4371 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4441.
  • Revision ID: robertc@robertcollins.net-20090523205712-lcwbfqk6vwavinuv
MergeĀ .dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
 
18
18
"""Progress indicators.
70
70
    """
71
71
 
72
72
    def __init__(self, parent_task=None, ui_factory=None):
 
73
        """Construct a new progress task.
 
74
 
 
75
        Normally you should not call this directly but rather through
 
76
        `ui_factory.nested_progress_bar`.
 
77
        """
73
78
        self._parent_task = parent_task
74
79
        self._last_update = 0
75
80
        self.total_cnt = None
112
117
        if self.current_cnt is not None and self.total_cnt:
113
118
            own_fraction = (float(self.current_cnt) + child_fraction) / self.total_cnt
114
119
        else:
115
 
            own_fraction = None
 
120
            # if this task has no estimation, it just passes on directly
 
121
            # whatever the child has measured...
 
122
            own_fraction = child_fraction
116
123
        if self._parent_task is None:
117
124
            return own_fraction
118
125
        else: