##// END OF EJS Templates
convert: cleanups in monotone converter
Benoit Boissinot -
r8458:f6c99b16 default
parent child Browse files
Show More
@@ -93,19 +93,11 b' class monotone_source(converter_source, '
93 def mtnisfile(self, name, rev):
93 def mtnisfile(self, name, rev):
94 # a non-file could be a directory or a deleted or renamed file
94 # a non-file could be a directory or a deleted or renamed file
95 self.mtnloadmanifest(rev)
95 self.mtnloadmanifest(rev)
96 try:
96 return name in self.files
97 self.files[name]
98 return True
99 except KeyError:
100 return False
101
97
102 def mtnisdir(self, name, rev):
98 def mtnisdir(self, name, rev):
103 self.mtnloadmanifest(rev)
99 self.mtnloadmanifest(rev)
104 try:
100 return name in self.dirs
105 self.dirs[name]
106 return True
107 except KeyError:
108 return False
109
101
110 def mtngetcerts(self, rev):
102 def mtngetcerts(self, rev):
111 certs = {"author":"<missing>", "date":"<missing>",
103 certs = {"author":"<missing>", "date":"<missing>",
@@ -190,11 +182,8 b' class monotone_source(converter_source, '
190
182
191 def getmode(self, name, rev):
183 def getmode(self, name, rev):
192 self.mtnloadmanifest(rev)
184 self.mtnloadmanifest(rev)
193 try:
185 node, attr = self.files.get(name, (None, ""))
194 node, attr = self.files[name]
186 return attr
195 return attr
196 except KeyError:
197 return ""
198
187
199 def getfile(self, name, rev):
188 def getfile(self, name, rev):
200 if not self.mtnisfile(name, rev):
189 if not self.mtnisfile(name, rev):
General Comments 0
You need to be logged in to leave comments. Login now