[Bps-public-commit] App-Changeloggr branch, master, updated. c1bedc219614d5cc50c854b47d9d8db8d4d36653
sartak at bestpractical.com
sartak at bestpractical.com
Fri Feb 27 21:44:53 EST 2009
The branch, master has been updated
via c1bedc219614d5cc50c854b47d9d8db8d4d36653 (commit)
from 02ce3869283ff0138c941dcee2b11f45e2b13077 (commit)
Summary of changes:
lib/App/Changeloggr/Model/Change.pm | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit c1bedc219614d5cc50c854b47d9d8db8d4d36653
Author: Shawn M Moore <sartak at gmail.com>
Date: Fri Feb 27 21:44:45 2009 -0500
create_from_git implementation
diff --git a/lib/App/Changeloggr/Model/Change.pm b/lib/App/Changeloggr/Model/Change.pm
index ddbed80..47aa8b4 100644
--- a/lib/App/Changeloggr/Model/Change.pm
+++ b/lib/App/Changeloggr/Model/Change.pm
@@ -58,5 +58,36 @@ sub guess_type {
return 'unknown';
}
+sub create_from_git {
+ my $self = shift;
+ my $text = shift;
+
+ $text =~ s{
+ ^
+ commit \s* ([0-9a-f]{32}) \n
+ Author: \s* (.*) \n
+ Date: \s* (.*) \n
+ ([\s\S]+?)
+ (?= commit \s* [0-9a-f]{32} \n | \z)
+ }{};
+
+ my ($identifier, $author, $date, $message) = ($1, $2, $3, $4);
+
+ $self->create(
+ identifier => $identifier,
+ author => $author,
+ date => $date,
+ message => $message,
+ );
+
+ return $text;
+}
+
+sub create_from_svk {
+}
+
+sub create_from_darcs {
+}
+
1;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list