changeset 855:eba7dcfab1bb

overlay: add namespace support to overlayrepo to support Mercurial >= 3.3 This allows test-incoming.t to progress further.
author Siddharth Agarwal <sid0@fb.com>
date Mon, 26 Jan 2015 16:21:23 -0800
parents 89bfb9994732
children 4538981d2c3f
files hggit/overlay.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/overlay.py
+++ b/hggit/overlay.py
@@ -284,6 +284,13 @@
 
         self._makemaps(commits, refs)
 
+        try:
+            # Mercurial >= 3.3
+            from mercurial import namespaces
+            self.names = namespaces.namespaces()
+        except ImportError:
+            pass
+
     def __getitem__(self, n):
         if n not in self.revmap:
             return self.handler.repo[n]