##// END OF EJS Templates
debugcommands: support wrapping long lines...
Gregory Szorc -
r40210:64360202 default
parent child Browse files
Show More
@@ -2829,6 +2829,7 b' def debugwireargs(ui, repopath, *vals, *'
2829 def _parsewirelangblocks(fh):
2829 def _parsewirelangblocks(fh):
2830 activeaction = None
2830 activeaction = None
2831 blocklines = []
2831 blocklines = []
2832 lastindent = 0
2832
2833
2833 for line in fh:
2834 for line in fh:
2834 line = line.rstrip()
2835 line = line.rstrip()
@@ -2845,6 +2846,7 b' def _parsewirelangblocks(fh):'
2845
2846
2846 activeaction = line
2847 activeaction = line
2847 blocklines = []
2848 blocklines = []
2849 lastindent = 0
2848 continue
2850 continue
2849
2851
2850 # Else we start with an indent.
2852 # Else we start with an indent.
@@ -2852,7 +2854,14 b' def _parsewirelangblocks(fh):'
2852 if not activeaction:
2854 if not activeaction:
2853 raise error.Abort(_('indented line outside of block'))
2855 raise error.Abort(_('indented line outside of block'))
2854
2856
2855 blocklines.append(line)
2857 indent = len(line) - len(line.lstrip())
2858
2859 # If this line is indented more than the last line, concatenate it.
2860 if indent > lastindent and blocklines:
2861 blocklines[-1] += line.lstrip()
2862 else:
2863 blocklines.append(line)
2864 lastindent = indent
2856
2865
2857 # Flush last block.
2866 # Flush last block.
2858 if activeaction:
2867 if activeaction:
General Comments 0
You need to be logged in to leave comments. Login now