From 9dacacce3bf327c93812919523e6868e2fbecd3f Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Thu, 18 Feb 2010 11:30:56 +0100 Subject: [PATCH] added revert --- server.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server.pl b/server.pl index a481086..a61e3db 100755 --- 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 eq 'revert' ) { + print $client `git checkout -- $ip/$path`; + system 'rsync', '-avv', "$ip/$path", "root\@$ip:$path"; } else { print $client "Unknown command: $command\n"; } -- 2.20.1