mercurial/branchmap.py
changeset 51492 2e8a88e5809f
parent 51491 dd5b5f99940d
child 51493 82c1a388e86a
--- a/mercurial/branchmap.py	Fri Mar 08 16:49:06 2024 +0100
+++ b/mercurial/branchmap.py	Sun Mar 10 04:53:17 2024 +0100
@@ -85,7 +85,8 @@
             bcache._filtername,
             repo.filtername,
         )
-        bcache.write(repo)
+        if bcache._dirty:
+            bcache.write(repo)
 
     def updatecache(self, repo):
         """Update the cache for the given filtered view on a repository"""