From b9418c74d6208fbde486ee27714891c1c5f8bc5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Fri, 8 Jan 2010 23:37:05 +0000 Subject: [PATCH] Add rsync:// support. There seems to be a cvs: uri scheme too according to http://en.wikipedia.org/wiki/URI_scheme but we'd have to decode it. TODO. checkitout needs libtracker. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34961 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/bin/Jamfile | 2 +- src/bin/checkitout.cpp | 14 +++++++++++++- src/bin/checkitout.rdef | 6 ++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/bin/Jamfile b/src/bin/Jamfile index 91f0202783..355d01ae88 100644 --- a/src/bin/Jamfile +++ b/src/bin/Jamfile @@ -110,7 +110,6 @@ StdBinCommands # standard commands that need libbe.so and libsupc++.so StdBinCommands alert.cpp - checkitout.cpp dstcheck.cpp hey.cpp reindex.cpp @@ -183,6 +182,7 @@ StdBinCommands # standard commands that need libbe.so, libtracker.so StdBinCommands + checkitout.cpp filepanel.cpp : be tracker $(TARGET_LIBSUPC++) : $(haiku-utils_rsrc) ; diff --git a/src/bin/checkitout.cpp b/src/bin/checkitout.cpp index 0930b09102..5deeb7850a 100644 --- a/src/bin/checkitout.cpp +++ b/src/bin/checkitout.cpp @@ -165,7 +165,7 @@ CheckItOut::_DoCheckItOut(entry_ref *ref, const char *name) BString user = url.User(); BString pass = url.Pass(); BString path = url.Path(); -printf("url %s\n", url.String()); + PRINT(("url %s\n", url.String())); BPath refPath(ref); if (proto == "git") { @@ -180,6 +180,18 @@ printf("url %s\n", url.String()); be_roster->Launch(kTerminalSig, 3, args); return B_OK; } + if (proto == "rsync") { + BString cmd("rsync "); + cmd << url; + cmd << " '" << refPath.Path() << "/" << name << "'"; + PRINT(("CMD='%s'\n", cmd.String())); + cmd << " && open '" << refPath.Path() << "/" << name << "'"; + cmd << failc; + PRINT(("CMD='%s'\n", cmd.String())); + args[2] = (char*)cmd.String(); + be_roster->Launch(kTerminalSig, 3, args); + return B_OK; + } if (proto == "svn" || proto == "svn+ssh") { BString cmd("svn checkout "); cmd << url; diff --git a/src/bin/checkitout.rdef b/src/bin/checkitout.rdef index 7e71c3b7d6..fcd3276ed7 100644 --- a/src/bin/checkitout.rdef +++ b/src/bin/checkitout.rdef @@ -4,8 +4,10 @@ resource app_flags B_MULTIPLE_LAUNCH | B_BACKGROUND_APP; resource(1, "BEOS:FILE_TYPES") message { + /*"types" = "application/x-vnd.Be.URL.cvs",*/ + "types" = "application/x-vnd.Be.URL.git", + "types" = "application/x-vnd.Be.URL.rsync", "types" = "application/x-vnd.Be.URL.svn", - "types" = "application/x-vnd.Be.URL.svn+ssh", - "types" = "application/x-vnd.Be.URL.git" + "types" = "application/x-vnd.Be.URL.svn+ssh" };