changeset 1415:d6cec13b4bb0

svnmeta: add the "revmapexists" method This is a part of the bigger plan to get rid of reading or writing rev_map directly without going through the RevMap class. The revset functions "fromsvn" and "svnrev" will read the rev_map file directly, and throw an exception if the file does not exist. This makes the check possible via svnmeta.
author Jun Wu <quark@fb.com>
date Fri, 13 May 2016 23:21:21 +0100
parents 99bc6003ac56
children 020917cde9f5
files hgsubversion/svnmeta.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnmeta.py
+++ b/hgsubversion/svnmeta.py
@@ -348,6 +348,10 @@ class SVNMeta(object):
             self._revmap = maps.RevMap(self)
         return self._revmap
 
+    @property
+    def revmapexists(self):
+        return maps.RevMap.exists(self)
+
     def fixdate(self, date):
         if date is not None:
             date = date.replace('T', ' ').replace('Z', '').split('.')[0]