changeset 51547:0ddc34330d41

branchcache: do not accept "empty update" This currently does not happens and it will be simpler that is remains that way. If all update do something, we will be able to simply declare, in a later changesets, that all update to result in a dirty branchcache.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 08 Mar 2024 15:06:54 +0100
parents 2b5f4013f79f
children 1a9bdd0e1c44
files mercurial/branchmap.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/branchmap.py	Thu Mar 07 11:04:34 2024 +0100
+++ b/mercurial/branchmap.py	Fri Mar 08 15:06:54 2024 +0100
@@ -302,7 +302,8 @@
                 self._closednodes.add(cl.node(r))
             max_rev = max(max_rev, r)
         if max_rev < 0:
-            max_rev = None
+            msg = "running branchcache.update without revision to update"
+            raise error.ProgrammingError(msg)
 
         # Delay fetching the topological heads until they are needed.
         # A repository without non-continous branches can skip this part.