mercurial/templateutil.py
changeset 38228 8bded7eae26c
parent 38226 7824783a6d5e
child 38229 7701c2d4a438
equal deleted inserted replaced
38227:1c8098cf560a 38228:8bded7eae26c
   187 
   187 
   188     def itermaps(self, context):
   188     def itermaps(self, context):
   189         yield self.tomap()
   189         yield self.tomap()
   190 
   190 
   191     def join(self, context, mapping, sep):
   191     def join(self, context, mapping, sep):
   192         # TODO: just copies the old behavior where a value was a generator
   192         w = makewrapped(context, mapping, self._value)
   193         # yielding one item, but reconsider about it. join() over a string
   193         return w.join(context, mapping, sep)
   194         # has no consistent result because a string may be a bytes, or a
       
   195         # generator yielding an item, or a generator yielding multiple items.
       
   196         # Preserving all of the current behaviors wouldn't make any sense.
       
   197         return self.show(context, mapping)
       
   198 
   194 
   199     def show(self, context, mapping):
   195     def show(self, context, mapping):
   200         # TODO: switch gen to (context, mapping) API?
   196         # TODO: switch gen to (context, mapping) API?
   201         gen = self._gen
   197         gen = self._gen
   202         if gen is None:
   198         if gen is None: