@@ -41,23 +41,10 @@ $eventum_url = 'http://eventum.example.com/';
41
41
//
42
42
// DO NOT CHANGE ANYTHING AFTER THIS LINE
43
43
//
44
- // save name of this script
45
- $ PROGRAM = basename (array_shift ($ argv ));
46
44
47
- if (isset ($ eventum_url )) {
48
- $ data = parse_url ($ eventum_url );
49
- } else {
50
- // legacy
51
- $ data = array ();
52
- $ data ['host ' ] = $ eventum_domain ;
53
- $ data ['path ' ] = $ eventum_relative_url ;
54
- $ data ['port ' ] = $ eventum_port ;
55
- $ data ['scheme ' ] = 'http ' ;
56
- }
57
45
58
- if (!isset ($ data ['port ' ])) {
59
- $ data ['port ' ] = $ data ['scheme ' ] == 'https ' ? 443 : 80 ;
60
- }
46
+ // save name of this script
47
+ $ PROGRAM = basename (array_shift ($ argv ));
61
48
62
49
if (!isset ($ svnlook )) {
63
50
$ svnlook = '/usr/bin/svnlook ' ;
@@ -74,31 +61,30 @@ if ($argc < 3) {
74
61
}
75
62
76
63
$ repos = $ argv [1 ];
77
- $ rev = $ argv [2 ];
78
- $ oldRev = $ rev - 1 ;
64
+ $ new_revision = $ argv [2 ];
65
+ $ old_revision = $ new_revision - 1 ;
79
66
80
67
$ scm_module = rawurlencode (basename ($ repos ));
81
68
82
- $ results = array ();
83
- exec ($ svnlook . ' info ' . $ repos . ' -r ' . $ rev , $ results );
84
-
69
+ exec ($ svnlook . ' info ' . $ repos . ' -r ' . $ new_revision , $ results );
85
70
$ username = array_shift ($ results );
86
71
$ date = array_shift ($ results );
87
- array_shift ($ results ); // ignore file length
72
+ // ignore file length
73
+ array_shift ($ results );
88
74
75
+ // get the full commit message
89
76
$ commit_msg = join ("\n" , $ results );
90
- // now we have to strip html-tags from the commit message
91
- $ commit_msg = strip_tags ($ commit_msg );
92
77
93
- $ files = array ();
94
- exec ($ svnlook . ' changed ' . $ repos . ' -r ' . $ rev , $ files );
78
+ // now parse the list of modified files
79
+ $ modified_files = array ();
80
+ exec ($ svnlook . ' changed ' . $ repos . ' -r ' . $ new_revision , $ files );
95
81
foreach ($ files as $ file_info ) {
96
82
$ pieces = explode (' ' , $ file_info );
97
83
$ filename = $ pieces [1 ];
98
84
$ modified_files [] = array (
99
85
'filename ' => $ filename ,
100
- 'old_revision ' => $ oldRev ,
101
- 'new_revision ' => $ rev
86
+ 'old_revision ' => $ old_revision ,
87
+ 'new_revision ' => $ new_revision
102
88
);
103
89
}
104
90
0 commit comments