tags: return empty list of heads for no .hgtags case
authorGregory Szorc <gregory.szorc@gmail.com>
Thu, 16 Apr 2015 11:32:46 -0400
changeset 24761 61a6d83280d3
parent 24760 410f3856196f
child 24762 1062663808ce
tags: return empty list of heads for no .hgtags case The caller only uses the heads to resolve tags from content of .hgtags. Returning a non-empty array is pointless if there is no .hgtags file.
mercurial/tags.py
--- a/mercurial/tags.py	Thu Apr 16 12:01:00 2015 -0400
+++ b/mercurial/tags.py	Thu Apr 16 11:32:46 2015 -0400
@@ -326,7 +326,7 @@
     if not len(repo.file('.hgtags')):
         # No tags have ever been committed, so we can avoid a
         # potentially expensive search.
-        return (repoheads, {}, valid, None, True)
+        return ([], {}, valid, None, True)
 
     starttime = time.time()