Change tabs to two spaces.

This commit is contained in:
Lymia Aluysia
2017-01-18 08:43:21 -06:00
parent d7f5f0dc3b
commit d2c635f739
329 changed files with 41307 additions and 41496 deletions
+36 -36
View File
@@ -12,57 +12,57 @@
// ----------------------------------------------------------------------------- : SVN File Manipulation
bool run_svn(const Char** arguments) {
switch (wxExecute(const_cast<Char**>(arguments), wxEXEC_SYNC)) { // Yuck, const_cast
// Success
case 0:
return true;
// Couldn't run SVN
case -1:
handle_error(String(_("Can't run SVN.")));
return false;
// SVN error
default:
handle_error(String(_("SVN encountered an error")));
return false;
}
switch (wxExecute(const_cast<Char**>(arguments), wxEXEC_SYNC)) { // Yuck, const_cast
// Success
case 0:
return true;
// Couldn't run SVN
case -1:
handle_error(String(_("Can't run SVN.")));
return false;
// SVN error
default:
handle_error(String(_("SVN encountered an error")));
return false;
}
}
void SubversionVCS::addFile(const wxFileName& filename)
{
String name = filename.GetFullPath();
const Char* name_c[] = {_("svn"), _("add"), name.c_str(), nullptr};
if (!run_svn(name_c)) {
VCS::addFile(filename);
}
String name = filename.GetFullPath();
const Char* name_c[] = {_("svn"), _("add"), name.c_str(), nullptr};
if (!run_svn(name_c)) {
VCS::addFile(filename);
}
}
void SubversionVCS::moveFile(const wxFileName& source, const wxFileName& dest)
{
String source_name = source.GetFullPath(), dest_name = dest.GetFullPath();
const Char* name_c[] = {_("svn"), _("mv"), source_name.c_str(), dest_name.c_str(), nullptr};
if (!run_svn(name_c)) {
VCS::moveFile(source, dest);
}
String source_name = source.GetFullPath(), dest_name = dest.GetFullPath();
const Char* name_c[] = {_("svn"), _("mv"), source_name.c_str(), dest_name.c_str(), nullptr};
if (!run_svn(name_c)) {
VCS::moveFile(source, dest);
}
}
void SubversionVCS::removeFile(const wxFileName& filename)
{
String name = filename.GetFullPath();
const Char* name_c[] = {_("svn"), _("rm"), name.c_str(), nullptr};
queue_message(MESSAGE_WARNING, String(name_c[0]) + name_c[1] + name_c[2]);
// TODO: do we really need to remove the file before calling "svn remove"?
VCS::removeFile(filename);
if (!run_svn(name_c)) {
VCS::removeFile(filename);
}
String name = filename.GetFullPath();
const Char* name_c[] = {_("svn"), _("rm"), name.c_str(), nullptr};
queue_message(MESSAGE_WARNING, String(name_c[0]) + name_c[1] + name_c[2]);
// TODO: do we really need to remove the file before calling "svn remove"?
VCS::removeFile(filename);
if (!run_svn(name_c)) {
VCS::removeFile(filename);
}
}
IMPLEMENT_REFLECTION(SubversionVCS) {
REFLECT_IF_NOT_READING {
String type = _("subversion");
REFLECT(type);
}
REFLECT_IF_NOT_READING {
String type = _("subversion");
REFLECT(type);
}
}
// ----------------------------------------------------------------------------- : EOF
+5 -5
View File
@@ -16,11 +16,11 @@
class SubversionVCS : public VCS {
public:
virtual void addFile (const wxFileName& filename);
virtual void moveFile (const wxFileName& source, const wxFileName& destination);
virtual void removeFile (const wxFileName& filename);
DECLARE_REFLECTION();
virtual void addFile (const wxFileName& filename);
virtual void moveFile (const wxFileName& source, const wxFileName& destination);
virtual void removeFile (const wxFileName& filename);
DECLARE_REFLECTION();
};
// ----------------------------------------------------------------------------- : EOF