Changeset 33
- Timestamp:
- 06/29/04 23:15:36
- Files:
-
- trunk/SubversionSharp/dev/src/SubversionSharp.prjx (modified) (1 diff)
- trunk/SubversionSharp/dev/src/Svn.cs (modified) (3 diffs)
- trunk/SubversionSharp/dev/src/SvnClient.cs (modified) (5 diffs)
- trunk/SubversionSharp/dev/src/SvnDelegate.cs (modified) (1 diff)
- trunk/SubversionSharp/dev/src/SvnWcEntry.cs (added)
- trunk/SubversionSharp/dev/src/SvnWcStatus.cs (added)
- trunk/SubversionSharp/test/src/Main.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/SubversionSharp/dev/src/SubversionSharp.prjx
r31 r33 18 18 <File name="./SvnClientCommitInfo.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> 19 19 <File name="./SvnClientCommitItem.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> 20 <File name="./SvnWcStatus.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> 21 <File name="./SvnWcEntry.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> 20 22 </Contents> 21 23 <References> trunk/SubversionSharp/dev/src/Svn.cs
r31 r33 66 66 public static AprPool PoolCreate(AprPool pool, AprAllocator allocator) 67 67 { 68 return(AprPool.Create(pool, allocator)); 68 AprPool newpool = AprPool.Create(pool, allocator); 69 allocator.Owner = pool; 70 return(newpool); 69 71 } 70 72 #endregion … … 179 181 180 182 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 181 internal IntPtr svn_client_checkout(out int result_rev, string URL,183 internal IntPtr svn_client_checkout(out uint result_rev, string URL, 182 184 string path, IntPtr revision, int recurse, 183 185 IntPtr ctx, IntPtr pool); 184 186 185 187 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 186 internal IntPtr svn_client_update (out int result_rev, string path,188 internal IntPtr svn_client_update (out uint result_rev, string path, 187 189 IntPtr revision, int recurse, 188 190 IntPtr ctx, IntPtr pool); 189 191 190 192 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 191 internal IntPtr svn_client_switch(out int result_rev, string path, string url,193 internal IntPtr svn_client_switch(out uint result_rev, string path, string url, 192 194 IntPtr revision, int recurse, 193 195 IntPtr ctx, IntPtr pool); … … 196 198 internal IntPtr svn_client_add(string path, int recursive, 197 199 IntPtr ctx, IntPtr pool); 200 201 [DllImport("svn_client-1")] static extern 202 internal IntPtr svn_client_mkdir(out IntPtr commit_info, IntPtr paths, 203 IntPtr ctx, IntPtr pool); 204 205 [DllImport("svn_client-1")] static extern 206 internal IntPtr svn_client_delete(out IntPtr commit_info, IntPtr paths, int force, 207 IntPtr ctx, IntPtr pool); 208 209 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 210 internal IntPtr svn_client_import(out IntPtr commit_info, 211 string path, string url, int nonrecursive, 212 IntPtr ctx, IntPtr pool); 213 214 [DllImport("svn_client-1")] static extern 215 internal IntPtr svn_client_commit(out IntPtr commit_info, 216 IntPtr targets, int nonrecursive, 217 IntPtr ctx, IntPtr pool); 218 219 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 220 internal IntPtr svn_client_status(out uint result_rev, 221 string path, IntPtr revision, 222 IntPtr status_func, IntPtr status_baton, 223 int descend, int get_all, int update, int no_ignore, 224 IntPtr ctx, IntPtr pool); 225 226 [DllImport("svn_client-1")] static extern 227 internal IntPtr svn_client_log(IntPtr targets, IntPtr start, IntPtr end, 228 int discover_changed_paths, int strict_node_history, 229 IntPtr receiver, IntPtr receiver_baton, 230 IntPtr ctx, IntPtr pool); 231 232 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 233 internal IntPtr svn_client_blame(string path_or_url, IntPtr start, IntPtr end, 234 IntPtr receiver, IntPtr receiver_baton, 235 IntPtr ctx, IntPtr pool); 236 237 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 238 internal IntPtr svn_client_diff(IntPtr diff_options, 239 string path1, IntPtr revision1, 240 string path2, IntPtr revision2, 241 int recurse, int ignore_ancestry, int no_diff_deleted, 242 IntPtr outfile, IntPtr errfile, 243 IntPtr ctx, IntPtr pool); 244 245 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 246 internal IntPtr svn_client_merge(string source1, IntPtr revision1, 247 string source2, IntPtr revision2, 248 string target_wcpath, 249 int recurse, int ignore_ancestry, int force, int dry_run, 250 IntPtr ctx, IntPtr pool); 251 252 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 253 internal IntPtr svn_client_cleanup(string dir, IntPtr ctx, IntPtr pool); 254 255 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 256 internal IntPtr svn_client_relocate(string dir, 257 string from, string to, int recurse, 258 IntPtr ctx, IntPtr pool); 259 260 [DllImport("svn_client-1")] static extern 261 internal IntPtr svn_client_revert(IntPtr paths, int recursive, IntPtr ctx, IntPtr pool); 262 263 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 264 internal IntPtr svn_client_resolved(string path, int recursive, IntPtr ctx, IntPtr pool); 265 266 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 267 internal IntPtr svn_client_copy(out IntPtr commit_info, 268 string src_path, IntPtr src_revision, 269 string dst_path, 270 IntPtr ctx, IntPtr pool); 271 272 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 273 internal IntPtr svn_client_move(out IntPtr commit_info, 274 string src_path, IntPtr src_revision, 275 string dst_path, int force, 276 IntPtr ctx, IntPtr pool); 277 278 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 279 internal IntPtr svn_client_propset(string propname, IntPtr propval, string target, 280 int recurse, 281 IntPtr pool); 282 283 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 284 internal IntPtr svn_client_revprop_set(string propname, IntPtr propval, 285 string Url, IntPtr revision, 286 out uint set_rev, int force, 287 IntPtr ctx, IntPtr pool); 288 289 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 290 internal IntPtr svn_client_propget(out IntPtr props, string propname, string target, 291 IntPtr revision, int recurse, 292 IntPtr ctx, IntPtr pool); 293 294 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 295 internal IntPtr svn_client_revprop_get(string propname, out IntPtr propval, 296 string URL, IntPtr revision, out uint set_rev, 297 IntPtr ctx, IntPtr pool); 298 299 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 300 internal IntPtr svn_client_proplist(out IntPtr props, 301 string target, IntPtr revision, int recurse, 302 IntPtr ctx, IntPtr pool); 303 304 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 305 internal IntPtr svn_client_revprop_list(out IntPtr props, 306 string URL, IntPtr revision, out uint set_rev, 307 IntPtr ctx, IntPtr pool); 308 309 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 310 internal IntPtr svn_client_export(out uint result_rev, 311 string from, string to, IntPtr revision, int force, 312 IntPtr ctx, IntPtr pool); 313 314 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 315 internal IntPtr svn_client_ls(out IntPtr dirents, 316 string path_or_url, IntPtr revision, int recurse, 317 IntPtr ctx, IntPtr pool); 318 319 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 320 internal IntPtr svn_client_cat(IntPtr output, 321 string path_or_url, IntPtr revision, 322 IntPtr ctx, IntPtr pool); 323 324 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 325 internal IntPtr svn_client_url_from_path(string url, string path_or_url, IntPtr pool); 326 327 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 328 internal IntPtr svn_client_uuid_from_url(string uuid, string url, IntPtr ctx, IntPtr pool); 329 330 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 331 internal IntPtr svn_client_uuid_from_path (string uuid, string path, 332 IntPtr adm_access, 333 IntPtr ctx, IntPtr pool); 198 334 #endregion 199 335 } trunk/SubversionSharp/dev/src/SvnClient.cs
r31 r33 21 21 AprPool pool); 22 22 23 public static int SvnClientCheckout(string url, string path,24 25 23 public static int Checkout(string url, string path, 24 SvnOptRevision revision, 25 bool recurse, SvnClientContext ctx, AprPool pool) 26 26 { 27 int rev;27 uint rev; 28 28 Debug.Write(String.Format("svn_client_checkout({0},{1},{2},{3},{4},{5})...",url,path,revision,recurse,ctx,pool)); 29 29 SvnError err = Svn.svn_client_checkout(out rev, url, path, … … 33 33 throw new SvnException(err); 34 34 Debug.WriteLine(String.Format("Done({0})",rev)); 35 return( rev);35 return(unchecked((int)rev)); 36 36 } 37 37 38 38 39 public static int SvnClientUpdate(string path,40 41 39 public static int Update(string path, 40 SvnOptRevision revision, 41 bool recurse, SvnClientContext ctx, AprPool pool) 42 42 { 43 int rev;43 uint rev; 44 44 Debug.Write(String.Format("svn_client_update({0},{1},{2},{3},{4})...",path,revision,recurse,ctx,pool)); 45 45 SvnError err = Svn.svn_client_update(out rev, path, … … 49 49 throw new SvnException(err); 50 50 Debug.WriteLine(String.Format("Done({0})",rev)); 51 return( rev);51 return(unchecked((int)rev)); 52 52 } 53 53 54 public static int S vnClientSwitch(string path, string url,55 56 54 public static int Switch(string path, string url, 55 SvnOptRevision revision, 56 bool recurse, SvnClientContext ctx, AprPool pool) 57 57 { 58 int rev;58 uint rev; 59 59 Debug.Write(String.Format("svn_client_switch({0},{1},{2},{3},{4},{5})...",path,url,revision,recurse,ctx,pool)); 60 60 SvnError err = Svn.svn_client_switch(out rev, path, url, … … 64 64 throw new SvnException(err); 65 65 Debug.WriteLine(String.Format("Done({0})",rev)); 66 return( rev);66 return(unchecked((int)rev)); 67 67 } 68 68 69 public static void SvnClientAdd(string path,70 71 69 public static void Add(string path, 70 bool recurse, 71 SvnClientContext ctx, AprPool pool) 72 72 { 73 73 Debug.WriteLine(String.Format("svn_client_add({0},{1},{2},{3},{4})",path,recurse,ctx,pool)); … … 77 77 throw new SvnException(err); 78 78 } 79 80 public static SvnClientCommitInfo Mkdir(AprArray paths, 81 SvnClientContext ctx, AprPool pool) 82 { 83 SvnClientCommitInfo commitInfo; 84 Debug.Write(String.Format("svn_client_mkdir({0},{1},{2})...",paths,ctx,pool)); 85 SvnError err = Svn.svn_client_mkdir(out commitInfo, paths, ctx, pool); 86 if( !err.IsNoError ) 87 throw new SvnException(err); 88 Debug.WriteLine(String.Format("Done({0})",commitInfo)); 89 return(commitInfo); 90 } 91 92 public static SvnClientCommitInfo Delete(AprArray paths, bool force, 93 SvnClientContext ctx, AprPool pool) 94 { 95 SvnClientCommitInfo commitInfo; 96 Debug.Write(String.Format("svn_client_delete({0},{1},{2},{3})...",paths,force,ctx,pool)); 97 SvnError err = Svn.svn_client_delete(out commitInfo, paths, (force) ? 1 : 0, ctx, pool); 98 if( !err.IsNoError ) 99 throw new SvnException(err); 100 Debug.WriteLine(String.Format("Done({0})",commitInfo)); 101 return(commitInfo); 102 } 103 104 public static SvnClientCommitInfo Import(string path, string url, bool nonrecursive, 105 SvnClientContext ctx, AprPool pool) 106 { 107 SvnClientCommitInfo commitInfo; 108 Debug.Write(String.Format("svn_client_import({0},{1},{2},{3},{4})...",path,url,nonrecursive,ctx,pool)); 109 SvnError err = Svn.svn_client_import(out commitInfo, path, url, (nonrecursive) ? 1 : 0, 110 ctx, pool); 111 if( !err.IsNoError ) 112 throw new SvnException(err); 113 Debug.WriteLine(String.Format("Done({0})",commitInfo)); 114 return(commitInfo); 115 } 116 117 public static SvnClientCommitInfo Commit(AprArray targets, bool nonrecursive, 118 SvnClientContext ctx, AprPool pool) 119 { 120 SvnClientCommitInfo commitInfo; 121 Debug.Write(String.Format("svn_client_commit({0},{1},{2},{3})...",targets,nonrecursive,ctx,pool)); 122 SvnError err = Svn.svn_client_commit(out commitInfo, targets, (nonrecursive) ? 1 : 0, 123 ctx, pool); 124 if( !err.IsNoError ) 125 throw new SvnException(err); 126 Debug.WriteLine(String.Format("Done({0})",commitInfo)); 127 return(commitInfo); 128 } 79 129 } 80 130 } trunk/SubversionSharp/dev/src/SvnDelegate.cs
r31 r33 107 107 Debug.Write(String.Format("[Callback:{0}]SvnClientGetCommitLog({1},{2:X},{3})...",func.Method.Name,new AprArray(commit_items),baton,new AprPool(pool))); 108 108 err = func(out logMessage, out tmpFile, 109 new AprArray(commit_items ), baton,109 new AprArray(commit_items,typeof(SvnClientCommitItem)), baton, 110 110 new AprPool(pool)); 111 111 Debug.WriteLine(String.Format("Done({0},{1})",logMessage,tmpFile)); trunk/SubversionSharp/test/src/Main.cs
r31 r33 71 71 if (!commitItems.IsNull) 72 72 { 73 foreach (SvnClientCommitItem item in gclea.CommitItems) 74 { 75 Console.WriteLine("C{0}: {1} ({2}) r{3}", 76 ++mCommitCounter, 73 foreach (SvnClientCommitItem item in commitItems) 74 { 75 Console.WriteLine("C1: {1} ({2}) r{3}", 77 76 item.Path, item.Kind, item.Revision); 78 Console.WriteLine("C{0}: {1} -> {2}", 79 mCommitCounter, 80 item.URL, 77 Console.WriteLine("C2: {1} -> {2}", 78 item.Url, 81 79 item.CopyFromUrl); 82 80 }