Changeset 63

Show
Ignore:
Timestamp:
07/17/04 01:53:18
Author:
DenisG
Message:

[SubversionSharp] Add subcommand Add and Status to the test client program.

Also fix structure packing to 4 (which is a major fix)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/SubversionSharp/dev/src/SvnAuthCred.cs

    r61 r63  
    3737        private svn_auth_cred_simple_t *mCred; 
    3838 
    39         [StructLayout( LayoutKind.Sequential )] 
     39        [StructLayout( LayoutKind.Sequential, Pack=4 )] 
    4040        private struct svn_auth_cred_simple_t 
    4141        {   
     
    159159        private svn_auth_cred_username_t *mCred; 
    160160 
    161         [StructLayout( LayoutKind.Sequential )] 
     161        [StructLayout( LayoutKind.Sequential, Pack=4 )] 
    162162        private struct svn_auth_cred_username_t 
    163163        {   
     
    261261        private svn_auth_cred_ssl_server_trust_t *mCred; 
    262262 
    263         [StructLayout( LayoutKind.Sequential )] 
     263        [StructLayout( LayoutKind.Sequential, Pack=4 )] 
    264264        private struct svn_auth_cred_ssl_server_trust_t 
    265265        {   
     
    353353        private svn_auth_cred_ssl_client_cert_t *mCred; 
    354354 
    355         [StructLayout( LayoutKind.Sequential )] 
     355        [StructLayout( LayoutKind.Sequential, Pack=4 )] 
    356356        private struct svn_auth_cred_ssl_client_cert_t 
    357357        { 
     
    446446        private svn_auth_cred_ssl_client_cert_pw_t *mCred; 
    447447 
    448         [StructLayout( LayoutKind.Sequential )] 
     448        [StructLayout( LayoutKind.Sequential, Pack=4 )] 
    449449        private struct svn_auth_cred_ssl_client_cert_pw_t 
    450450        { 
  • trunk/SubversionSharp/dev/src/SvnAuthSslServerCertInfo.cs

    r60 r63  
    3838        private svn_auth_ssl_server_cert_info *mSslServerCertInfo; 
    3939 
    40         [StructLayout( LayoutKind.Sequential )] 
     40        [StructLayout( LayoutKind.Sequential, Pack=4 )] 
    4141        private struct svn_auth_ssl_server_cert_info 
    4242        {   
  • trunk/SubversionSharp/dev/src/SvnClientCommitInfo.cs

    r61 r63  
    3737        private svn_client_commit_info_t *mCommitInfo; 
    3838 
    39         [StructLayout( LayoutKind.Sequential )] 
     39        [StructLayout( LayoutKind.Sequential, Pack=4 )] 
    4040        private struct svn_client_commit_info_t 
    4141        { 
  • trunk/SubversionSharp/dev/src/SvnClientCommitItem.cs

    r61 r63  
    3737        private svn_client_commit_item_t *mCommitItem; 
    3838 
    39         [StructLayout( LayoutKind.Sequential )] 
     39        [StructLayout( LayoutKind.Sequential, Pack=4 )] 
    4040        private struct svn_client_commit_item_t 
    4141        { 
  • trunk/SubversionSharp/dev/src/SvnClientContext.cs

    r60 r63  
    4242        private SvnDelegate mCancelFunc; 
    4343 
    44         [StructLayout( LayoutKind.Sequential )] 
     44        [StructLayout( LayoutKind.Sequential, Pack=4 )] 
    4545        private struct svn_client_ctx_t 
    4646        {   
  • trunk/SubversionSharp/dev/src/SvnClientPropListItem.cs

    r60 r63  
    3737        private svn_client_proplist_item_t *mPropList; 
    3838 
    39         [StructLayout( LayoutKind.Sequential )] 
     39        [StructLayout( LayoutKind.Sequential, Pack=4 )] 
    4040        private struct svn_client_proplist_item_t 
    4141        { 
  • trunk/SubversionSharp/dev/src/SvnDirEnt.cs

    r61 r63  
    3737        private svn_dirent_t *mDirEnt; 
    3838 
    39         [StructLayout( LayoutKind.Sequential )] 
     39        [StructLayout( LayoutKind.Sequential, Pack=4 )] 
    4040        private struct svn_dirent_t 
    4141        { 
  • trunk/SubversionSharp/dev/src/SvnError.cs

    r60 r63  
    3737        private svn_error_t *mError; 
    3838 
    39         [StructLayout( LayoutKind.Sequential )] 
     39        [StructLayout( LayoutKind.Sequential, Pack=4 )] 
    4040        private struct svn_error_t 
    4141        { 
  • trunk/SubversionSharp/dev/src/SvnString.cs

    r60 r63  
    3737        private svn_string_t *mString; 
    3838 
    39         [StructLayout( LayoutKind.Sequential )] 
     39        [StructLayout( LayoutKind.Sequential, Pack=4 )] 
    4040        private struct svn_string_t 
    4141        { 
  • trunk/SubversionSharp/dev/src/SvnStringBuf.cs

    r60 r63  
    3737        private svn_stringbuf_t *mStringBuf; 
    3838 
    39         [StructLayout( LayoutKind.Sequential )] 
     39        [StructLayout( LayoutKind.Sequential, Pack=4 )] 
    4040        private struct svn_stringbuf_t 
    4141        { 
  • trunk/SubversionSharp/dev/src/SvnWcEntry.cs

    r61 r63  
    4444        private svn_wc_entry_t *mEntry; 
    4545 
    46         [StructLayout( LayoutKind.Sequential )] 
     46        [StructLayout( LayoutKind.Sequential, Pack=4 )] 
    4747        private struct svn_wc_entry_t 
    4848        { 
     
    7070            public long cmt_date; 
    7171            public IntPtr cmt_author; 
    72         }  
     72        } 
    7373 
    7474        #region Generic embedding functions of an IntPtr 
  • trunk/SubversionSharp/dev/src/SvnWcStatus.cs

    r61 r63  
    5656        private svn_wc_status_t *mStatus; 
    5757 
    58         [StructLayout( LayoutKind.Sequential )] 
     58        [StructLayout( LayoutKind.Sequential, Pack=4 )] 
    5959        private struct svn_wc_status_t 
    6060        { 
  • trunk/SubversionSharp/test/src/Checkout.cs

    r56 r63  
     1//  SvnTest, a client program used to test SubversionSharp library 
     2#region Copyright (C) 2004 SOFTEC sa. 
     3// 
    14//  SvnTest, a client program used to test SubversionSharp library 
    25//  Copyright 2004 by SOFTEC sa 
     
    2427//      Denis Gervalle 
    2528//      Olivier Desaive 
     29#endregion 
    2630// 
    2731using System; 
     
    3640    [SubCommand("checkout","co",  
    3741  @"URL... [PATH] 
    38     retrieve data from a repository and create a working copy. 
     42  Check out a working copy from a repository. 
    3943 
    40     Note: If PATH is omitted, the basename of the URL will be used as 
    41     the destination. If multiple URLs are given each will be checked 
    42     out into a sub-directory of PATH, with the name of the sub-directory 
    43     being the basename of the URL." 
     44  Note: If PATH is omitted, the basename of the URL will be used as 
     45  the destination. If multiple URLs are given each will be checked 
     46  out into a sub-directory of PATH, with the name of the sub-directory 
     47  being the basename of the URL." 
    4448    )] 
    4549    class CheckoutCmd : CmdBaseWithAuth 
     
    8993                { 
    9094                    string[] seg = urls[i].Segments; 
    91                     client.Checkout(new SvnUrl(urls[i], client.Pool), 
    92                                     new SvnPath(path + seg[seg.Length-1], client.Pool), 
    93                                     oRevision, 
    94                                     oRecurse); 
     95                    try  
     96                    { 
     97                        client.Checkout(new SvnUrl(urls[i], client.Pool), 
     98                                        new SvnPath(path + seg[seg.Length-1], client.Pool), 
     99                                        oRevision, 
     100                                        oRecurse); 
     101                    } 
     102                    catch( Exception e ) 
     103                    { 
     104                        if( oDebug ) 
     105                            Console.WriteLine(e); 
     106                        else 
     107                            Console.WriteLine(e.Message); 
     108                    } 
    95109                    client.Clear(); 
    96110                } 
  • trunk/SubversionSharp/test/src/CmdBase.cs

    r60 r63  
     1//  SvnTest, a client program used to test SubversionSharp library 
     2#region Copyright (C) 2004 SOFTEC sa. 
     3// 
    14//  SvnTest, a client program used to test SubversionSharp library 
    25//  Copyright 2004 by SOFTEC sa 
     
    2427//      Denis Gervalle 
    2528//      Olivier Desaive 
     29#endregion 
    2630// 
    2731using System; 
     
    9599             
    96100            mSubCmd = sc; 
     101            BreakSingleDashManyLettersIntoManyOptions = true; 
    97102            ProcessArgs(args); 
    98103 
     
    153158        { 
    154159            if(mSubCmd.Description != string.Empty) 
    155                 Console.WriteLine("{0} {1}",mSubCmd.LongName,mSubCmd.Description); 
     160                Console.WriteLine("\n{0} {1}\n",mSubCmd.LongName,mSubCmd.Description); 
    156161            return(ret); 
    157162        } 
     
    180185            { 
    181186                case SvnWcNotify.Action.Add: 
    182                     if (!mimeType.IsNull && mimeType.ToString().StartsWith("text/")) 
     187                    if (!mimeType.IsNull && !mimeType.ToString().StartsWith("text/")) 
    183188                        Console.WriteLine("A  (bin)  {0}", Path); 
    184189                    else 
     
    191196                 
    192197                case SvnWcNotify.Action.CommitAdded: 
    193                     if (!mimeType.IsNull && mimeType.ToString().StartsWith("text/")) 
     198                    if (!mimeType.IsNull && !mimeType.ToString().StartsWith("text/")) 
    194199                        Console.WriteLine("Adding  (bin)  {0}", Path); 
    195200                    else 
  • trunk/SubversionSharp/test/src/Main.cs

    r60 r63  
    160160        } 
    161161         
    162         public SubCommandAttribute(string longName, string shortName
     162        public SubCommandAttribute(string longName, string desc
    163163        { 
    164             ShortName = shortName.ToLower()
     164            ShortName = string.Empty
    165165            LongName = longName.ToLower(); 
    166             Description = string.Empty
     166            Description = desc
    167167        } 
    168168 
  • trunk/SubversionSharp/test/src/SvnTest.prjx

    r56 r63  
    55    <File name="./Checkout.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> 
    66    <File name="./CmdBase.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> 
     7    <File name="./Add.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> 
     8    <File name="./Status.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> 
    79  </Contents> 
    810  <References>