Skip to content

Commit cb1b5de

Browse files
authored
Update SourceHgWeb.php
Adding a message to clarify that the repository is possibly empty when SourceHgWeb fails to find the changeset header.
1 parent 903800a commit cb1b5de

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

SourceHgWeb/SourceHgWeb.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,10 @@ private function commit_changeset( $p_repo, $p_input, $p_branch='' ) {
254254
while( $i < count( $t_input ) && strpos( $t_input[$i++], '# HG changeset patch' ) === false );
255255

256256
# Check we haven't exhausted the input
257-
if ( $i == count( $t_input )) return array (null, array());
257+
if ( $i == count( $t_input )) {
258+
echo 'repository may be empty?\n';
259+
return array (null, array());
260+
}
258261

259262
# Process changeset metadata
260263
$t_commit = array();

0 commit comments

Comments
 (0)