Mercurial > hg > nginx-vendor-import
comparison nginx-vendor-import.pl @ 1:216d6c84d918 default tip
Make it a bit more pretty (i.e. not so ugly).
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 04 Aug 2008 01:14:31 +0400 |
parents | 0272fd3371b2 |
children |
comparison
equal
deleted
inserted
replaced
0:0272fd3371b2 | 1:216d6c84d918 |
---|---|
1 #!/usr/bin/perl -w | 1 #!/usr/bin/perl -w |
2 | |
3 # (C) Maxim Dounin | |
2 | 4 |
3 # Import nginx source history into Mercurial repo. | 5 # Import nginx source history into Mercurial repo. |
4 | 6 |
5 # perl -nle 'BEGIN { $/ = "\n\nChanges with nginx "; }; m/^([\d.]+)\s+/gs && print "$1 -- \n\n$_\n\n--\n\n"' CHANGES | less | 7 ############################################################################### |
8 | |
9 use strict; | |
10 use warnings; | |
6 | 11 |
7 use HTTP::Date qw/ str2time /; | 12 use HTTP::Date qw/ str2time /; |
8 use POSIX qw/ strftime /; | 13 use POSIX qw/ strftime /; |
9 use Getopt::Long; | 14 use Getopt::Long; |
10 | 15 |
14 my $userepo; | 19 my $userepo; |
15 | 20 |
16 { | 21 { |
17 GetOptions( | 22 GetOptions( |
18 'changes=s' => \$changes, | 23 'changes=s' => \$changes, |
19 'userepo=s' => \$userepo, | 24 'repo=s' => \$userepo, |
20 'stopat=s' => \$stopat, | 25 'stopat=s' => \$stopat, |
21 'startat=s' => \$startat, | 26 'startat=s' => \$startat, |
22 ); | 27 ); |
23 } | 28 } |
24 | 29 |
108 } | 113 } |
109 | 114 |
110 if ($userepo) { | 115 if ($userepo) { |
111 `mv $prev/.hg $prev/.hgtags $userepo/`; | 116 `mv $prev/.hg $prev/.hgtags $userepo/`; |
112 } | 117 } |
118 | |
119 ############################################################################### |