2
  
   mÊ239ÌÂÑ  ï    m<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access this resource.</p>
</body></html>
     oˆÐÏÔ523ÎÂÑ     o‹      Å•ßoÚ0ÇßûWx~Ø[rùA'µu2uih- ši›¦=˜Øk!AöQ ýœ„µ¬ƒn•�x‰�ó×w÷9Çö&vÓo£ù˜ÞÞ�Ñç7ý.¡À—°�¤I»Ðq= 7 „æˆ‹K€Õjå®B·Ò3HÇ�ã¼è€A­2t
Ÿ±ÚŸ–K.ìH*,dÜ/…\“jJ Z¢QBv`i4˜œk	(×…ºoÆùÔÊ`=…‚×Ïe©²JHgÎ1gÐz³þa€M*±©ãúG‹a]5‰óIªžê˜aNîy¡feD±ZÐ˜©ùŒ�EìæÒÀ¤àåOw¦¦”ð#ú½ßþ°:À¼Þ3Nr-§}ß�WÃ(¡ñ€Ï%¾_sk5×4¾áÉ¼jª¤8(¾kÅwêá°Ã¤Õ$ÒdZ-PUå“,â.jVfÁ-ë¹%Èõ®ª•ˆUƒgct=îÒ¤?nK"jOÙ½úÄh<²šI¢´Ì°Ò›-Këøm91‹«ß¯d›©V³iLˆCö*_�gsÀ]¼ôkºl÷ËrŠe�»kpCã»ÏÒ¼Às<ß	=„—�OÈ¡†ŸNÂ×Ü×n}†÷h‘Î¿p¼ÀñÏºð ]¾;ÝZî?¼GûQÎ.¸8	Ýß\G#r;/ýgË�m3fÐ´{íoæ‚ü©vÉ        qˆÈ�þZtŒ¬Ü¢#á�a	HçÕ„ÌºÔÇÂÑ ?÷     q# Copyright (C) 2005-2011 Canonical Ltd
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

__docformat__ = "google"

"""Copying of history from one branch to another.

The basic plan is that every branch knows the history of everything
that has merged into it.  As the first step of a merge, pull, or
branch operation we copy history from the source into the destination
branch.
"""

import operator

from .. import (
    errors,
    ui,
    )
from ..i18n import gettext
from ..revision import NULL_REVISION
from ..trace import mutter


class RepoFetcher:
    """Pull revisions and texts from one repository to another.

    This should not be used directly, it's essential a object to encapsulate
    the logic in InterRepository.fetch().
    """

    def __init__(self, to_repository, from_repository, last_revision=None,
                 find_ghosts=True, fetch_spec=None):
        """Create a repo fetcher.

        Args:
          last_revision: If set, try to limit to the data this revision
            references.
          fetch_spec: A SearchResult specifying which revisions to fetch.
            If set, this overrides last_revision.
          find_ghosts: If True search the entire history for ghosts.
        """
        # repository.fetch has the responsibility for short-circuiting
        # attempts to copy between a repository and itself.
        self.to_repository = to_repository
        self.from_repository = from_repository
        self.sink = to_repository._get_sink()
        # must not mutate self._last_revision as its potentially a shared instance
        self._last_revision = last_revision
        self._fetch_spec = fetch_spec
        self.find_ghosts = find_ghosts
        with self.from_repository.lock_read():
            mutter("Using fetch logic to copy between %s(%s) and %s(%s)",
                   str(self.from_repository), str(self.from_repository._format),
                   str(self.to_repository), str(self.to_repository._format))
            self.__fetch()

    def __fetch(self):
        """Primary worker function.

        This initialises all the needed variables, and then fetches the
        requested revisions, finally clearing the progress bar.
        """
        # Roughly this is what we're aiming for fetch to become:
        #
        # missing = self.sink.insert_stream(self.source.get_stream(search))
        # if missing:
        #     missing = self.sink.insert_stream(self.source.get_items(missing))
        # assert not missing
        self.count_total = 0
        self.file_ids_names = {}
        wit