projects
/
bak-git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bbbbbf5
)
added revert
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 18 Feb 2010 10:30:56 +0000
(11:30 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 18 Feb 2010 10:30:56 +0000
(11:30 +0100)
server.pl
patch
|
blob
|
history
diff --git
a/server.pl
b/server.pl
index
a481086
..
a61e3db
100755
(executable)
--- a/
server.pl
+++ b/
server.pl
@@
-90,6
+90,9
@@
while (my $client = $server->accept()) {
} elsif ( $command =~ m{(diff|status|log)} ) {
my $opt = '--summary' if $command eq 'log';
print $client `git $command $opt $ip`;
} elsif ( $command =~ m{(diff|status|log)} ) {
my $opt = '--summary' if $command eq 'log';
print $client `git $command $opt $ip`;
+ } elsif ( $command eq 'revert' ) {
+ print $client `git checkout -- $ip/$path`;
+ system 'rsync', '-avv', "$ip/$path", "root\@$ip:$path";
} else {
print $client "Unknown command: $command\n";
}
} else {
print $client "Unknown command: $command\n";
}