public SvnError SimpleAuth(out SvnAuthCredSimple cred, IntPtr baton, AprString realm, AprString username, bool maySave, AprPool pool) { cred = SvnAuthCredSimple.Alloc(pool); cred.Username = new AprString(this.UserName, pool); cred.Password = new AprString(this.Password, pool); cred.MaySave = maySave; return(SvnError.NoError); }
// private void CheckoutSvnPartial(string subdir) // { // if (!Directory.Exists(m_svndir + Slash.DirectorySeparatorChar + subdir)) // Directory.CreateDirectory(m_svndir + Slash.DirectorySeparatorChar + subdir); // m_svnClient.Checkout2(m_svnurl + "/" + subdir, m_svndir, Svn.Revision.Head, Svn.Revision.Head, true, false); // } // private void CheckoutSvnPartial(string subdir, SvnRevision revision) // { // if (!Directory.Exists(m_svndir + Slash.DirectorySeparatorChar + subdir)) // Directory.CreateDirectory(m_svndir + Slash.DirectorySeparatorChar + subdir); // m_svnClient.Checkout2(m_svnurl + "/" + subdir, m_svndir, revision, revision, true, false); // } #endregion #region SvnDotNet Callbacks private SvnError SimpleAuth(out SvnAuthCredSimple svnCredentials, IntPtr baton, AprString realm, AprString username, bool maySave, AprPool pool) { svnCredentials = SvnAuthCredSimple.Alloc(pool); svnCredentials.Username = new AprString(m_svnuser, pool); svnCredentials.Password = new AprString(m_svnpass, pool); svnCredentials.MaySave = false; return(SvnError.NoError); }
public SvnError SimpleAuth(out SvnAuthCredSimple cred, IntPtr baton, AprString realm, AprString username, bool maySave, AprPool pool) { Console.WriteLine("Simple Authentication"); Console.WriteLine("---------------------"); Console.WriteLine("Realm: {0}", realm); Console.WriteLine(""); bool valid = false; string line = ""; while (!valid) { if (!username.IsNull) { Console.Write("Enter Username ({0}): ", username); } else { Console.Write("Enter Username: "******"Enter Password: "); cred.Password = new AprString(Console.ReadLine(), pool); cred.MaySave = maySave; return(SvnError.NoError); }