Mercurial > evolve
changeset 4451:a019067fea9e
branching: merge with stable
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 28 Mar 2019 12:37:55 +0100 |
parents | ab5bc57ba897 (current diff) 9b0cde5efbc9 (diff) |
children | 444e664616c7 |
files | hgext3rd/evolve/__init__.py hgext3rd/topic/topicmap.py |
diffstat | 2 files changed, 16 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/__init__.py Tue Mar 12 09:48:05 2019 -0700 +++ b/hgext3rd/evolve/__init__.py Thu Mar 28 12:37:55 2019 +0100 @@ -836,14 +836,14 @@ created = ret[1] if (opts['obsolete'] and None not in (created, expected['node']) and created != expected['node']): - tr = repo.transaction('import-obs') - try: - metadata = {'user': ui.username()} - repo.obsstore.create(tr, expected['node'], (created,), - metadata=metadata) - tr.close() - finally: - tr.release() + tr = repo.transaction('import-obs') + try: + metadata = {'user': ui.username()} + repo.obsstore.create(tr, expected['node'], (created,), + metadata=metadata) + tr.close() + finally: + tr.release() return ret
--- a/hgext3rd/topic/topicmap.py Tue Mar 12 09:48:05 2019 -0700 +++ b/hgext3rd/topic/topicmap.py Thu Mar 28 12:37:55 2019 +0100 @@ -9,6 +9,7 @@ cmdutil, extensions, repoview, + util, ) basefilter = set(['base', 'immutable']) @@ -164,8 +165,13 @@ def copy(self): """return an deep copy of the branchcache object""" - new = self.__class__(self, self.tipnode, self.tiprev, self.filteredhash, - self._closednodes) + if util.safehasattr(self, '_entries'): + _entries = self._entries + else: + # hg <= 4.9 (624d6683c705, b137a6793c51) + _entries = self + new = self.__class__(_entries, self.tipnode, self.tiprev, + self.filteredhash, self._closednodes) new.phaseshash = self.phaseshash return new