File tree Expand file tree Collapse file tree 2 files changed +17
-14
lines changed
branches/snap-stage3/src/etc Expand file tree Collapse file tree 2 files changed +17
-14
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: a0f86de49748b472d4d189d9688b0d856c000914
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: 68372ae65597839c800c653d0c64152523c6b978
4
+ refs/heads/snap-stage3: de3ea99ec55d5f544abef6df836d67e6b87cb299
5
5
refs/heads/try: 08f6380a9f0b866796080094f44fe25ea5636547
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
Original file line number Diff line number Diff line change 1
- # !/usr/bin/perl
2
- use strict;
3
- use warnings;
1
+ #!/usr/bin/env python
2
+ import re
3
+ import sys
4
4
5
- my $indent = 0;
6
- while (<>) {
7
- if (/ ^rust: ~">>/ ) {
8
- $indent += 1;
9
- }
5
+ indent = 0
6
+ more_re = re .compile (r"^rust: ~\">>" )
7
+ less_re = re .compile (r"^rust: ~\"<<" )
8
+ while True :
9
+ line = sys .stdin .readline ()
10
+ if not line :
11
+ break
10
12
11
- printf " %03d %s%s " , $indent , (" " x $indent ), $_ ;
13
+ if more_re .match (line ):
14
+ indent += 1
12
15
13
- if ( / ^rust: ~"<< / ) {
14
- $indent -= 1;
15
- }
16
- }
16
+ print "%03d %s%s" % ( indent , " " * indent , line . strip ())
17
+
18
+ if less_re . match ( line ):
19
+ indent -= 1
You can’t perform that action at this time.
0 commit comments