# HG changeset patch # User Pierre-Yves David # Date 1494614400 -7200 # Node ID 5c5f982b98f794a016af10537aa0e7d2abc19bd3 # Parent 89938bebc6f97ad2eb670cdd378ca4b0a4ae3799 obshashrange: exit early if nothing to write diff -r 89938bebc6f9 -r 5c5f982b98f7 hgext3rd/evolve/obsdiscovery.py --- a/hgext3rd/evolve/obsdiscovery.py Fri May 12 20:29:54 2017 +0200 +++ b/hgext3rd/evolve/obsdiscovery.py Fri May 12 20:40:00 2017 +0200 @@ -512,10 +512,12 @@ return con def save(self, repo): + if self._cachekey is None: + return + if self._cachekey == self._ondiskcachekey and not self._new: + return repo = repo.unfiltered() try: - if not self._new: - return with repo.lock(): self._save(repo) except error.LockError: