Changeset - 3b3de7c68ae1
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-11-29 22:19:16
marcin@python-works.com
fixed issue with no-cached dulwich repos
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/diffs.py
Show inline comments
 
@@ -703,49 +703,49 @@ class InMemoryBundleRepo(bundlerepositor
 

	
 

	
 
def differ(org_repo, org_ref, other_repo, other_ref, discovery_data=None,
 
           remote_compare=False, context=3, ignore_whitespace=False):
 
    """
 
    General differ between branches, bookmarks, revisions of two remote or
 
    local but related repositories
 

	
 
    :param org_repo:
 
    :param org_ref:
 
    :param other_repo:
 
    :type other_repo:
 
    :type other_ref:
 
    """
 

	
 
    org_repo_scm = org_repo.scm_instance
 
    other_repo_scm = other_repo.scm_instance
 

	
 
    org_repo = org_repo_scm._repo
 
    other_repo = other_repo_scm._repo
 

	
 
    org_ref = org_ref[1]
 
    other_ref = other_ref[1]
 

	
 
    if org_repo == other_repo:
 
    if org_repo_scm == other_repo_scm:
 
        log.debug('running diff between %s@%s and %s@%s'
 
                  % (org_repo.path, org_ref, other_repo.path, other_ref))
 
        _diff = org_repo_scm.get_diff(rev1=org_ref, rev2=other_ref,
 
            ignore_whitespace=ignore_whitespace, context=context)
 
        return _diff
 

	
 
    elif remote_compare:
 
        opts = diffopts(git=True, ignorews=ignore_whitespace, context=context)
 
        common, incoming, rheads = discovery_data
 
        org_repo_peer = localrepo.locallegacypeer(org_repo.local())
 
        # create a bundle (uncompressed if other repo is not local)
 
        if org_repo_peer.capable('getbundle'):
 
            # disable repo hooks here since it's just bundle !
 
            # patch and reset hooks section of UI config to not run any
 
            # hooks on fetching archives with subrepos
 
            for k, _ in org_repo.ui.configitems('hooks'):
 
                org_repo.ui.setconfig('hooks', k, None)
 
            unbundle = org_repo.getbundle('incoming', common=None,
 
                                          heads=None)
 

	
 
            buf = BytesIO()
 
            while True:
 
                chunk = unbundle._stream.read(1024 * 4)
 
                if not chunk:
0 comments (0 inline, 0 general)