convert/gnuarch: retrieve known archive names list
authorEdouard Gomez <ed.gomez@free.fr>
Sun, 04 Jan 2009 02:36:48 +0100
changeset 7584 28563e94c471
parent 7583 77fec2d270ae
child 7585 075b7ef0f84d
convert/gnuarch: retrieve known archive names list This will make possible in a followup patch to prevent following history that is not reachable because an archive is unknown to the user.
hgext/convert/gnuarch.py
--- a/hgext/convert/gnuarch.py	Sun Jan 04 02:36:48 2009 +0100
+++ b/hgext/convert/gnuarch.py	Sun Jan 04 02:36:48 2009 +0100
@@ -50,8 +50,13 @@
         self.modecache = {}
         self.catlogparser = Parser()
         self.locale = locale.getpreferredencoding()
+        self.archives = []
 
     def before(self):
+        # Get registered archives
+        self.archives = [i.rstrip('\n')
+                         for i in self.runlines0('archives', '-n')]
+
         if self.execmd == 'tla':
             output = self.run0('tree-version', self.path)
         else: