[Bps-public-commit] SD branch, master, updated. 020c104f011e1b81ef501c1a5dcbde41a63a6baf
jesse
jesse at bestpractical.com
Fri Apr 24 18:49:44 EDT 2009
The branch, master has been updated
via 020c104f011e1b81ef501c1a5dcbde41a63a6baf (commit)
via e88465220ad940de0c354864c915c27efdee265b (commit)
via 028c814c0a875c788284d16389425172d768d733 (commit)
via dbd6b6a49d5ac3cd14b273f0e9cfed47a465df4e (commit)
via f4637d4b612bc11836999418bc0e2cd23f534331 (commit)
via 0d97770652ce3620cf00d13a7e57a88dd6cb44e7 (commit)
via 177c2a303a62b91652467a0e04ab4556a3caf47a (commit)
from 1e1a24145a29f17e9c237089ad64a5561055f5ca (commit)
Summary of changes:
contrib/sdticket.vim | 52 ++++++++++++++++++++++++++++
lib/App/SD/CLI/Command/Help/Environment.pm | 4 +-
lib/App/SD/Replica/debbugs.pm | 8 ++++-
lib/App/SD/Replica/hm.pm | 4 +-
4 files changed, 63 insertions(+), 5 deletions(-)
create mode 100644 contrib/sdticket.vim
- Log -----------------------------------------------------------------
commit 177c2a303a62b91652467a0e04ab4556a3caf47a
Author: c9s <cornelius.howl at gmail.com>
Date: Tue Apr 21 22:05:42 2009 +0800
add BUILD function for github replica
diff --git a/lib/App/SD/Replica/github.pm b/lib/App/SD/Replica/github.pm
new file mode 100644
index 0000000..6b6ff30
--- /dev/null
+++ b/lib/App/SD/Replica/github.pm
@@ -0,0 +1,58 @@
+package App::SD::Replica::github;
+use Any::Moose;
+extends qw/App::SD::ForeignReplica/;
+
+use Params::Validate qw(:all);
+use Memoize;
+
+use UNIVERSAL::require;
+use URI;
+use Memoize;
+
+use Prophet::ChangeSet;
+
+use constant scheme => 'github';
+use constant pull_encoder => 'App::SD::Replica::github::PullEncoder';
+use constant push_encoder => 'App::SD::Replica::github::PushEncoder';
+
+has github => ( isa => 'Net::Github', is => 'rw' );
+has remote_url => ( isa => 'Str', is => 'rw' );
+has owner => ( isa => 'Str', is => 'rw' );
+has repo => ( isa => 'Str', is => 'rw' );
+
+
+sub BUILD {
+ my $self = shift;
+ use Net::Github;
+
+ my ( $server , $owner , $repo ) = $self->{url} =~ m/^github:(.+?)\|(\w+)\|(\w+)\|$/
+ or die "Can't parse Github server spec. Expected github:http://user\@github.com|owner|repository|";
+
+
+ my $uri = URI->new($server);
+ my ( $username, $apikey );
+ if ( my $auth = $uri->userinfo ) {
+ ( $username, $apikey ) = split /:/, $auth, 2;
+ $uri->userinfo(undef);
+ }
+
+ ( $username, $apikey ) = $self->prompt_for_login( $uri, $username ) unless $apikey ;
+
+ $self->remote_url("$uri");
+ $self->owner( $owner );
+ $self->repo( $repo );
+
+ $self->github(
+ Net::GitHub->new(
+ login => $username,
+ token => $apikey,
+ repo => $repo,
+ owner => $owner,
+ ) );
+}
+
+sub record_pushed_transactions {}
+
+__PACKAGE__->meta->make_immutable;
+no Any::Moose;
+1;
commit 0d97770652ce3620cf00d13a7e57a88dd6cb44e7
Author: c9s <cornelius.howl at gmail.com>
Date: Tue Apr 21 22:14:50 2009 +0800
uuid method for github replica
diff --git a/lib/App/SD/Replica/github.pm b/lib/App/SD/Replica/github.pm
index 6b6ff30..29196e9 100644
--- a/lib/App/SD/Replica/github.pm
+++ b/lib/App/SD/Replica/github.pm
@@ -53,6 +53,14 @@ sub BUILD {
sub record_pushed_transactions {}
+sub uuid {
+ my $self = shift;
+ Carp::cluck "- can't make a uuid for this" unless ($self->remote_url && $self->owner && $self->repo );
+ return $self->uuid_for_url( join( '/', $self->remote_url, $self->owner , $self->repo ) );
+}
+
+
+
__PACKAGE__->meta->make_immutable;
no Any::Moose;
1;
commit f4637d4b612bc11836999418bc0e2cd23f534331
Author: c9s <cornelius.howl at gmail.com>
Date: Tue Apr 21 22:18:37 2009 +0800
move 'use net::github' out of build function
diff --git a/lib/App/SD/Replica/github.pm b/lib/App/SD/Replica/github.pm
index 29196e9..5d5fe0a 100644
--- a/lib/App/SD/Replica/github.pm
+++ b/lib/App/SD/Replica/github.pm
@@ -8,6 +8,7 @@ use Memoize;
use UNIVERSAL::require;
use URI;
use Memoize;
+use Net::Github;
use Prophet::ChangeSet;
@@ -20,10 +21,8 @@ has remote_url => ( isa => 'Str', is => 'rw' );
has owner => ( isa => 'Str', is => 'rw' );
has repo => ( isa => 'Str', is => 'rw' );
-
sub BUILD {
my $self = shift;
- use Net::Github;
my ( $server , $owner , $repo ) = $self->{url} =~ m/^github:(.+?)\|(\w+)\|(\w+)\|$/
or die "Can't parse Github server spec. Expected github:http://user\@github.com|owner|repository|";
@@ -59,8 +58,6 @@ sub uuid {
return $self->uuid_for_url( join( '/', $self->remote_url, $self->owner , $self->repo ) );
}
-
-
__PACKAGE__->meta->make_immutable;
no Any::Moose;
1;
commit dbd6b6a49d5ac3cd14b273f0e9cfed47a465df4e
Merge: f4637d4... 1e1a241...
Author: c9s <cornelius.howl at gmail.com>
Date: Wed Apr 22 00:51:57 2009 +0800
Merge branch 'master' of git://github.com/obra/sd
commit 028c814c0a875c788284d16389425172d768d733
Author: c9s <cornelius.howl at gmail.com>
Date: Wed Apr 22 00:54:12 2009 +0800
fix pod
diff --git a/lib/App/SD/Replica/debbugs.pm b/lib/App/SD/Replica/debbugs.pm
index cf8c06c..115ffc2 100644
--- a/lib/App/SD/Replica/debbugs.pm
+++ b/lib/App/SD/Replica/debbugs.pm
@@ -14,7 +14,13 @@ has debbugs => ( isa => 'Net::Debbugs', is => 'rw');
has remote_url => ( isa => 'Str', is => 'rw');
has debbugs_query => ( isa => 'Str', is => 'rw');
-sub setup {
+=head2 BUILD
+
+Open a connection to the source identified by C<$self->{url}>.
+
+=cut
+
+sub BUILD {
my $self = shift;
# require any specific libs needed by this foreign replica
diff --git a/lib/App/SD/Replica/hm.pm b/lib/App/SD/Replica/hm.pm
index 639ff0f..21dfb98 100644
--- a/lib/App/SD/Replica/hm.pm
+++ b/lib/App/SD/Replica/hm.pm
@@ -20,9 +20,9 @@ use constant push_encoder => 'App::SD::Replica::hm::PushEncoder';
use App::SD::Replica::rt;
-=head2 setup
+=head2 BUILD
-Open a connection to the source identified by C<$self->url>.
+Open a connection to the source identified by C<$self->{url}>.
=cut
commit e88465220ad940de0c354864c915c27efdee265b
Author: c9s <cornelius.howl at gmail.com>
Date: Wed Apr 22 10:39:17 2009 +0800
add vim syntax support for sd-ticket in contrib directory.
diff --git a/contrib/sdticket.vim b/contrib/sdticket.vim
new file mode 100644
index 0000000..49e8d26
--- /dev/null
+++ b/contrib/sdticket.vim
@@ -0,0 +1,52 @@
+" vim:et:sw=2:fdm=marker:
+" SD Ticket Syntax File
+" Maintainer: Yo-An Lin < cornelius.howl at gmail.com >
+" URL: http://www.vim.org/scripts/script.php?script_id=2614
+" Last Change: 09 Apr 21 04/21/2009
+" Version: 0.1
+" Intro:
+"
+" This syntax file is for ticket summary file of SD (peer-to-peer bug
+" tracking system)
+" http://syncwith.us/
+"
+" Usage:
+" To let vim known the editing file is SD ticket
+" add the below settings to your .vimrc
+"
+" au BufNewFile,BufRead *
+" \ if getline(1) =~ "required ticket metadata" |
+" \ setf sdticket |
+" \ endif
+"
+
+" For version 5.x: Clear all syntax items.
+" For version 6.x: Quit when a syntax file was already loaded.
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+syn region sdHeader start="^===" end="===$"
+syn region sdColumn start="^\w\+" end=":"
+
+syn keyword sdStatus new open close
+syn keyword sdComponent core
+
+if version >= 508 || !exists("did_sdticket_syn_inits")
+ if version < 508
+ let did_sdticket_syn_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+
+ " The default highlighting.
+ HiLink sdHeader Comment
+ HiLink sdColumn Identifier
+ HiLink sdStatus Type
+ delcommand HiLink
+endif
+
+let b:current_syntax = "sdticket"
commit 020c104f011e1b81ef501c1a5dcbde41a63a6baf
Author: c9s <cornelius.howl at gmail.com>
Date: Fri Apr 24 14:10:59 2009 +0800
fix interpolation of env help text.
diff --git a/lib/App/SD/CLI/Command/Help/Environment.pm b/lib/App/SD/CLI/Command/Help/Environment.pm
index 48af619..6007ee8 100644
--- a/lib/App/SD/CLI/Command/Help/Environment.pm
+++ b/lib/App/SD/CLI/Command/Help/Environment.pm
@@ -15,8 +15,8 @@ configuration. Example syntax is for bash-like shells.
export SD_REPO=/path/to/sd/replica
Specify where the ticket database SD is using should reside.
- export PROPHET_EMAIL=jesse at example.com
- Use 'jesse at example.com' as the creator of changesets. Prophet
+ export PROPHET_EMAIL=jesse\@example.com
+ Use 'jesse\@example.com' as the creator of changesets. Prophet
will use EMAIL if PROPHET_EMAIL isn't defined.
export SD_CONFIG=/path/to/sd/config/file
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list