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
This commit is contained in:
François Revol 2010-01-08 23:37:05 +00:00
parent ee8e73e751
commit b9418c74d6
3 changed files with 18 additions and 4 deletions

View File

@ -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) ;

View File

@ -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;

View File

@ -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"
};