Mercurial > evolve
diff hgext3rd/evolve/obshistory.py @ 3932:35b2d201eb71 stable
compat: fix obslog compatiblity with 4.3
Due to the way of how successor sets are retrieved in new Mercurial version,
retrieving it again in 4.3 way would be a performance hit and complexify the
code too much.
Don't retrieve markers of successor sets which makes obslog filtered output
more limited in 4.3.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 03 Aug 2018 00:52:10 +0200 |
parents | 28824ad64a12 |
children | cd0c331c430a |
line wrap: on
line diff
--- a/hgext3rd/evolve/obshistory.py Thu Aug 02 16:54:40 2018 +0300 +++ b/hgext3rd/evolve/obshistory.py Fri Aug 03 00:52:10 2018 +0200 @@ -107,7 +107,7 @@ fullsuccessorsets = [] # successor set + markers for sset in ssets: if sset: - fullsuccessorsets.append(sset) + fullsuccessorsets.append(compat.wrap_succs(sset)) else: # successorsset return an empty set() when ctx or one of its # successors is pruned. @@ -123,11 +123,11 @@ for mark in succsmap.get(ctx.node(), ()): if not mark[1]: foundany = True - sset = obsutil._succs() + sset = compat._succs() sset.markers.add(mark) fullsuccessorsets.append(sset) if not foundany: - fullsuccessorsets.append(obsutil._succs()) + fullsuccessorsets.append(compat._succs()) values = [] for sset in fullsuccessorsets: @@ -673,7 +673,7 @@ label="evolve.node") # Operations - operations = obsutil.markersoperations(markers) + operations = compat.markersoperations(markers) if operations: fm.plain(' using ') fm.write('operation', '%s', ", ".join(operations), label="evolve.operation") @@ -681,13 +681,13 @@ fm.plain(' by ') # Users - users = obsutil.markersusers(markers) + users = compat.markersusers(markers) fm.write('user', '%s', ", ".join(users), label="evolve.user") fm.plain(' ') # Dates - dates = obsutil.markersdates(markers) + dates = compat.markersdates(markers) if dates: min_date = min(dates) max_date = max(dates)