summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2010-12-03 16:52:36 -0800
committerStig Thormodsrud <stig@vyatta.com>2010-12-03 16:52:36 -0800
commitd0a92dbffbb43c7626920af415f51628a9f6be5c (patch)
treeda7100958f3ea68c49b31a830b509dd6b4069cd4 /lib
parentbaa9c61160c8fdee7d0d4719501ff6a558577338 (diff)
downloadvyatta-config-mgmt-d0a92dbffbb43c7626920af415f51628a9f6be5c.tar.gz
vyatta-config-mgmt-d0a92dbffbb43c7626920af415f51628a9f6be5c.zip
Return -1 if commit log is missing.
Diffstat (limited to 'lib')
-rw-r--r--lib/Vyatta/ConfigMgmt.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Vyatta/ConfigMgmt.pm b/lib/Vyatta/ConfigMgmt.pm
index 21f8f3c..f896922 100644
--- a/lib/Vyatta/ConfigMgmt.pm
+++ b/lib/Vyatta/ConfigMgmt.pm
@@ -119,7 +119,7 @@ sub cm_get_max_revs {
}
sub cm_get_num_revs {
-
+ return -1 if ! -e $commit_log_file;
my @lines = cm_read_file($commit_log_file);
my $num_revs = scalar(@lines);
$num_revs-- if $num_revs > 0; # rev files start at 0