Changeset - 51c4d2e74898
[Not reviewed]
default
0 1 0
Mads Kiilerich - 11 years ago 2015-02-11 03:05:00
madski@unity3d.com
compare: simplify handling of compare with null revision
1 file changed with 1 insertions and 5 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/compare.py
Show inline comments
 
@@ -70,7 +70,7 @@ class CompareController(BaseRepoControll
 
        :param other_rev: revision we want out compare to be made on other_repo
 
        """
 
        ancestor = None
 
        if org_rev == other_rev:
 
        if org_rev == other_rev or org_repo.EMPTY_CHANGESET in (org_rev, other_rev):
 
            org_changesets = []
 
            other_changesets = []
 
            ancestor = org_rev
 
@@ -88,10 +88,6 @@ class CompareController(BaseRepoControll
 
            else:
 
                hgrepo = other_repo._repo
 

	
 
            if org_repo.EMPTY_CHANGESET in (org_rev, other_rev):
 
                # work around unexpected Mercurial behaviour
 
                ancestor = org_repo.EMPTY_CHANGESET
 
            else:
 
                ancestors = hgrepo.revs("ancestor(id(%s), id(%s))", org_rev, other_rev)
 
                if ancestors:
 
                    # FIXME: picks arbitrary ancestor - but there is usually only one
0 comments (0 inline, 0 general)