~ubuntu-branches/ubuntu/maverick/codelite/maverick

« back to all changes in this revision

Viewing changes to Subversion/subversion.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Chow Loong Jin
  • Date: 2009-02-10 02:27:55 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090210022755-m5692nfc1t5uf1w9
Tags: 1.0.2759+dfsg-0ubuntu1
* New upstream release (LP: #327216).
* debian/patches/series, debian/patches/00_fix-ia64-build.patch:
  + Dropped, applied upstream already.
* debian/patches/02_fix-desktop.patch,
  debian/patches/03_fix-sh.patch:
  + Refreshed to patch cleanly.
* debian/rules:
  + Make get-orig-source honour UPSTREAM_VERSION if set.
* debian/ctags-le.1,
  debian/codelite_indexer.1,
  debian/codelite.manpages:
  + Dropped ctags-le manpage, since ctags-le was replaced by
    codelite_indexer.
  + Added codelite_indexer manpage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
        m_svn = new SvnDriver(this, manager);
125
125
 
126
126
        manager->GetConfigTool()->ReadObject(wxT("SubversionOptions"), &m_options);
127
 
        //m_timer->Start((int)m_options.GetRefreshInterval(), true);
 
127
 
 
128
        // Set SSH client environment variable
 
129
        DoSetSshEnv();
128
130
 
129
131
        m_longName = wxT("Subversion");
130
132
        m_shortName = wxT("SVN");
598
600
void SubversionPlugin::OnOptions(wxCommandEvent &event)
599
601
{
600
602
        wxUnusedVar(event);
601
 
        SvnOptionsDlg *dlg = new SvnOptionsDlg(NULL, m_options, m_mgr);
602
 
        if (dlg->ShowModal() == wxID_OK) {
603
 
                m_options = dlg->GetOptions();
 
603
        SvnOptionsDlg dlg(NULL, m_options, m_mgr);
 
604
        if (dlg.ShowModal() == wxID_OK) {
 
605
                m_options = dlg.GetOptions();
604
606
                m_mgr->GetConfigTool()->WriteObject(wxT("SubversionOptions"), &m_options);
 
607
 
 
608
                DoSetSshEnv();
605
609
        }
606
 
        dlg->Destroy();
607
610
}
608
611
 
609
612
void SubversionPlugin::UnPlug()
1261
1264
        wxUnusedVar(e); // don't skip
1262
1265
        DoRefreshIcons();
1263
1266
}
 
1267
 
 
1268
void SubversionPlugin::DoSetSshEnv()
 
1269
{
 
1270
        wxString ssh_client = m_options.GetSshClient();
 
1271
        wxString ssh_client_args = m_options.GetSshClientArguments();
 
1272
 
 
1273
        ssh_client.Trim().Trim(false);
 
1274
        ssh_client_args.Trim().Trim(false);
 
1275
 
 
1276
        // on Windows, SVN demands that the ssh client will not contain any
 
1277
        // backward slashes
 
1278
        ssh_client.Replace(wxT("\\"), wxT("/"));
 
1279
 
 
1280
        if(ssh_client.empty() == false){
 
1281
                wxString env_value(ssh_client + wxT(" ") + ssh_client_args);
 
1282
                wxSetEnv(wxT("SVN_SSH"), env_value.c_str());
 
1283
                wxLogMessage(wxString::Format(wxT("Environment variable SVN_SSH is set to %s"), env_value.c_str()));
 
1284
        }
 
1285
}