Changeset 50
- Timestamp:
- 07/06/04 02:59:14
- Files:
-
- trunk/SubversionSharp/dev/src/SubversionSharp.prjx (modified) (1 diff)
- trunk/SubversionSharp/dev/src/Svn.cs (modified) (11 diffs)
- trunk/SubversionSharp/dev/src/SvnAuthCred.cs (modified) (1 diff)
- trunk/SubversionSharp/dev/src/SvnClient.cs (modified) (11 diffs)
- trunk/SubversionSharp/dev/src/SvnClientBase.cs (modified) (25 diffs)
- trunk/SubversionSharp/dev/src/SvnClientCommitItem.cs (modified) (1 diff)
- trunk/SubversionSharp/dev/src/SvnConfig.cs (modified) (2 diffs)
- trunk/SubversionSharp/dev/src/SvnDelegate.cs (modified) (3 diffs)
- trunk/SubversionSharp/dev/src/SvnPath.cs (added)
- trunk/SubversionSharp/dev/src/SvnUrl.cs (added)
- trunk/SubversionSharp/dev/src/SvnWcEntry.cs (modified) (2 diffs)
- trunk/SubversionSharp/dev/src/SvnWcNotify.cs (modified) (1 diff)
- trunk/SubversionSharp/dev/src/SvnWcStatus.cs (modified) (1 diff)
- trunk/SubversionSharp/test/src/Main.cs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/SubversionSharp/dev/src/SubversionSharp.prjx
r42 r50 26 26 <File name="./SvnClientBase.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> 27 27 <File name="./SvnClient.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> 28 <File name="./SvnPath.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> 29 <File name="./SvnUrl.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> 28 30 </Contents> 29 31 <References> 30 32 <Reference type="Project" refto="AprSharp" localcopy="True" /> 33 <Reference type="Gac" refto="System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" localcopy="True" /> 31 34 </References> 32 35 <DeploymentInformation target="" script="" strategy="File" /> trunk/SubversionSharp/dev/src/Svn.cs
r44 r50 90 90 #endregion 91 91 92 #region SvnPath 93 [DllImport("svn_client-1")] static extern 94 internal IntPtr svn_utf_stringbuf_to_utf8(out IntPtr dest, IntPtr src, IntPtr pool); 95 96 [DllImport("svn_client-1")] static extern 97 internal IntPtr svn_utf_string_to_utf8(out IntPtr dest, IntPtr src, IntPtr pool); 98 99 [DllImport("svn_client-1")] static extern 100 internal IntPtr svn_utf_cstring_to_utf8(out IntPtr dest, IntPtr src, IntPtr pool); 101 #endregion 102 103 #region SvnUrl 104 [DllImport("svn_client-1")] static extern 105 internal IntPtr svn_path_uri_encode(IntPtr path, IntPtr pool); 106 107 [DllImport("svn_client-1")] static extern 108 internal IntPtr svn_path_uri_decode(IntPtr path, IntPtr pool); 109 #endregion 110 92 111 #region SvnString 93 [DllImport("svn_client-1" )] static extern112 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 94 113 internal IntPtr svn_string_create(IntPtr cstring, IntPtr pool); 95 114 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern … … 172 191 [DllImport("svn_client-1")] static extern 173 192 internal IntPtr svn_config_ensure(IntPtr config_dir, IntPtr pool); 174 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern175 internal IntPtr svn_config_ensure(string config_dir, IntPtr pool);176 193 177 194 [DllImport("svn_client-1")] static extern 178 195 internal IntPtr svn_config_get_config(out IntPtr cfg_hash, IntPtr config_dir, IntPtr pool); 179 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern180 internal IntPtr svn_config_get_config(out IntPtr cfg_hash, string config_dir, IntPtr pool);181 196 #endregion 182 197 … … 272 287 273 288 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 274 internal IntPtr svn_client_checkout(out int result_rev, stringURL,275 stringpath, IntPtr revision, int recurse,289 internal IntPtr svn_client_checkout(out int result_rev, IntPtr URL, 290 IntPtr path, IntPtr revision, int recurse, 276 291 IntPtr ctx, IntPtr pool); 277 292 278 293 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 279 internal IntPtr svn_client_update (out int result_rev, stringpath,294 internal IntPtr svn_client_update (out int result_rev, IntPtr path, 280 295 IntPtr revision, int recurse, 281 296 IntPtr ctx, IntPtr pool); 282 297 283 298 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 284 internal IntPtr svn_client_switch(out int result_rev, string path, stringurl,299 internal IntPtr svn_client_switch(out int result_rev, IntPtr path, IntPtr url, 285 300 IntPtr revision, int recurse, 286 301 IntPtr ctx, IntPtr pool); 287 302 288 303 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 289 internal IntPtr svn_client_add( stringpath, int recursive,304 internal IntPtr svn_client_add(IntPtr path, int recursive, 290 305 IntPtr ctx, IntPtr pool); 291 306 … … 300 315 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 301 316 internal IntPtr svn_client_import(out IntPtr commit_info, 302 string path, stringurl, int nonrecursive,317 IntPtr path, IntPtr url, int nonrecursive, 303 318 IntPtr ctx, IntPtr pool); 304 319 … … 310 325 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 311 326 internal IntPtr svn_client_status(out int result_rev, 312 stringpath, IntPtr revision,327 IntPtr path, IntPtr revision, 313 328 svn_wc_status_func_t status_func, IntPtr status_baton, 314 329 int descend, int get_all, int update, int no_ignore, … … 322 337 323 338 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 324 internal IntPtr svn_client_blame( stringpath_or_url, IntPtr start, IntPtr end,339 internal IntPtr svn_client_blame(IntPtr path_or_url, IntPtr start, IntPtr end, 325 340 svn_client_blame_receiver_t receiver, IntPtr receiver_baton, 326 341 IntPtr ctx, IntPtr pool); … … 328 343 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 329 344 internal IntPtr svn_client_diff(IntPtr diff_options, 330 stringpath1, IntPtr revision1,331 stringpath2, IntPtr revision2,345 IntPtr path1, IntPtr revision1, 346 IntPtr path2, IntPtr revision2, 332 347 int recurse, int ignore_ancestry, int no_diff_deleted, 333 348 IntPtr outfile, IntPtr errfile, … … 335 350 336 351 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 337 internal IntPtr svn_client_merge( stringsource1, IntPtr revision1,338 stringsource2, IntPtr revision2,339 stringtarget_wcpath,352 internal IntPtr svn_client_merge(IntPtr source1, IntPtr revision1, 353 IntPtr source2, IntPtr revision2, 354 IntPtr target_wcpath, 340 355 int recurse, int ignore_ancestry, int force, int dry_run, 341 356 IntPtr ctx, IntPtr pool); 342 357 343 358 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 344 internal IntPtr svn_client_cleanup( stringdir, IntPtr ctx, IntPtr pool);345 346 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 347 internal IntPtr svn_client_relocate( stringdir,348 string from, stringto, int recurse,359 internal IntPtr svn_client_cleanup(IntPtr dir, IntPtr ctx, IntPtr pool); 360 361 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 362 internal IntPtr svn_client_relocate(IntPtr dir, 363 IntPtr from, IntPtr to, int recurse, 349 364 IntPtr ctx, IntPtr pool); 350 365 … … 353 368 354 369 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 355 internal IntPtr svn_client_resolved( stringpath, int recursive, IntPtr ctx, IntPtr pool);370 internal IntPtr svn_client_resolved(IntPtr path, int recursive, IntPtr ctx, IntPtr pool); 356 371 357 372 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 358 373 internal IntPtr svn_client_copy(out IntPtr commit_info, 359 stringsrc_path, IntPtr src_revision,360 stringdst_path,374 IntPtr src_path, IntPtr src_revision, 375 IntPtr dst_path, 361 376 IntPtr ctx, IntPtr pool); 362 377 363 378 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 364 379 internal IntPtr svn_client_move(out IntPtr commit_info, 365 stringsrc_path, IntPtr src_revision,366 stringdst_path, int force,380 IntPtr src_path, IntPtr src_revision, 381 IntPtr dst_path, int force, 367 382 IntPtr ctx, IntPtr pool); 368 383 369 384 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 370 internal IntPtr svn_client_propset(string propname, IntPtr propval, stringtarget,385 internal IntPtr svn_client_propset(string propname, IntPtr propval, IntPtr target, 371 386 int recurse, 372 387 IntPtr pool); … … 374 389 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 375 390 internal IntPtr svn_client_revprop_set(string propname, IntPtr propval, 376 stringUrl, IntPtr revision,391 IntPtr Url, IntPtr revision, 377 392 out int set_rev, int force, 378 393 IntPtr ctx, IntPtr pool); 379 394 380 395 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 381 internal IntPtr svn_client_propget(out IntPtr props, string propname, stringtarget,396 internal IntPtr svn_client_propget(out IntPtr props, string propname, IntPtr target, 382 397 IntPtr revision, int recurse, 383 398 IntPtr ctx, IntPtr pool); … … 385 400 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 386 401 internal IntPtr svn_client_revprop_get(string propname, out IntPtr propval, 387 stringURL, IntPtr revision, out int set_rev,402 IntPtr URL, IntPtr revision, out int set_rev, 388 403 IntPtr ctx, IntPtr pool); 389 404 390 405 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 391 406 internal IntPtr svn_client_proplist(out IntPtr props, 392 stringtarget, IntPtr revision, int recurse,407 IntPtr target, IntPtr revision, int recurse, 393 408 IntPtr ctx, IntPtr pool); 394 409 395 410 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 396 411 internal IntPtr svn_client_revprop_list(out IntPtr props, 397 stringURL, IntPtr revision, out int set_rev,412 IntPtr URL, IntPtr revision, out int set_rev, 398 413 IntPtr ctx, IntPtr pool); 399 414 400 415 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 401 416 internal IntPtr svn_client_export(out int result_rev, 402 string from, stringto, IntPtr revision, int force,417 IntPtr from, IntPtr to, IntPtr revision, int force, 403 418 IntPtr ctx, IntPtr pool); 404 419 405 420 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 406 421 internal IntPtr svn_client_ls(out IntPtr dirents, 407 stringpath_or_url, IntPtr revision, int recurse,422 IntPtr path_or_url, IntPtr revision, int recurse, 408 423 IntPtr ctx, IntPtr pool); 409 424 410 425 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 411 426 internal IntPtr svn_client_cat(IntPtr output, 412 stringpath_or_url, IntPtr revision,427 IntPtr path_or_url, IntPtr revision, 413 428 IntPtr ctx, IntPtr pool); 414 429 415 430 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 416 internal IntPtr svn_client_url_from_path(out IntPtr url, stringpath_or_url, IntPtr pool);417 418 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 419 internal IntPtr svn_client_uuid_from_url(out IntPtr uuid, stringurl, IntPtr ctx, IntPtr pool);431 internal IntPtr svn_client_url_from_path(out IntPtr url, IntPtr path_or_url, IntPtr pool); 432 433 [DllImport("svn_client-1", CharSet=CharSet.Ansi)] static extern 434 internal IntPtr svn_client_uuid_from_url(out IntPtr uuid, IntPtr url, IntPtr ctx, IntPtr pool); 420 435 #endregion 421 436 } trunk/SubversionSharp/dev/src/SvnAuthCred.cs
r46 r50 491 491 492 492 #region Wrapper Properties 493 public AprStringCertFile493 public SvnPath CertFile 494 494 { 495 495 get trunk/SubversionSharp/dev/src/SvnClient.cs
r46 r50 67 67 mPool = Svn.PoolCreate(mGlobalPool); 68 68 } 69 70 public IAprUnmanaged PathOrUrl(string str) 71 { 72 try { 73 return(new SvnUrl(str, mPool)); 74 } 75 catch (SvnException e) {} 76 return(new SvnPath(str, mPool)); 77 } 78 79 private Type PathOrUrlArrayType(ICollection coll) 80 { 81 IEnumerator it = coll.GetEnumerator(); 82 it.MoveNext(); 83 Type t = it.Current.GetType(); 84 85 if(t == typeof(SvnUrl) || t == typeof(SvnPath)) 86 return t; 87 88 if(t == typeof(Uri)) 89 return typeof(SvnUrl); 90 91 try { 92 new Uri(it.Current.ToString()); 93 return(typeof(SvnUrl)); 94 } 95 catch (SvnException e) {} 96 97 return typeof(SvnPath); 98 } 69 99 #endregion 70 100 71 101 #region Client methods 72 public int Checkout( string url, stringpath, SvnRevision revision, bool recurse)102 public int Checkout(SvnUrl url, SvnPath path, SvnRevision revision, bool recurse) 73 103 { 74 104 return Checkout(url, path, revision.ToSvnOpt(mPool), recurse, … … 76 106 } 77 107 78 public int Update(string path, SvnRevision revision, bool recurse) 108 public int Checkout(string url, string path, SvnRevision revision, bool recurse) 109 { 110 return Checkout(new SvnUrl(url, mPool), new SvnPath(path, mPool), 111 revision.ToSvnOpt(mPool), recurse, mContext, mPool); 112 } 113 114 public int Update(SvnPath path, SvnRevision revision, bool recurse) 79 115 { 80 116 return Update(path, revision.ToSvnOpt(mPool), recurse, … … 82 118 } 83 119 84 public int Switch(string path, string url, SvnRevision revision, bool recurse) 120 public int Update(string path, SvnRevision revision, bool recurse) 121 { 122 return Update(new SvnPath(path, mPool), revision.ToSvnOpt(mPool), recurse, 123 mContext, mPool); 124 } 125 126 public int Switch(SvnPath path, SvnUrl url, SvnRevision revision, bool recurse) 85 127 { 86 128 return Switch(path, url, revision.ToSvnOpt(mPool), recurse, … … 88 130 } 89 131 132 public int Switch(string path, SvnUrl url, SvnRevision revision, bool recurse) 133 { 134 return Switch(new SvnPath(path,mPool), url, revision.ToSvnOpt(mPool), recurse, 135 mContext, mPool); 136 } 137 138 public void Add(SvnPath path, bool recurse) 139 { 140 Add(path, recurse, mContext, mPool); 141 } 142 90 143 public void Add(string path, bool recurse) 91 144 { 92 Add( path, recurse, mContext, mPool);93 } 94 145 Add(new SvnPath(path, mPool), recurse, mContext, mPool); 146 } 147 95 148 public SvnClientCommitInfo Mkdir(ICollection paths) 96 149 { 97 return Mkdir(AprArray. CastMake(mPool,paths), mContext, mPool);150 return Mkdir(AprArray.LazyMake(mPool,paths,PathOrUrlArrayType(paths)), mContext, mPool); 98 151 } 99 152 100 153 public SvnClientCommitInfo Delete(ICollection paths, bool force) 101 154 { 102 return Delete(AprArray. CastMake(mPool,paths), force, mContext, mPool);103 } 104 105 public SvnClientCommitInfo Import( string path, stringurl, bool nonrecursive)155 return Delete(AprArray.LazyMake(mPool,paths,PathOrUrlArrayType(paths)), force, mContext, mPool); 156 } 157 158 public SvnClientCommitInfo Import(SvnPath path, SvnUrl url, bool nonrecursive) 106 159 { 107 160 return Import(path, url, nonrecursive, mContext, mPool); 108 161 } 109 162 163 public SvnClientCommitInfo Import(string path, SvnUrl url, bool nonrecursive) 164 { 165 return Import(new SvnPath(path,mPool), url, nonrecursive, mContext, mPool); 166 } 167 110 168 public SvnClientCommitInfo Commit(ICollection targets, bool nonrecursive) 111 169 { 112 return Commit(AprArray.CastMake(mPool,targets), nonrecursive, mContext, mPool); 113 } 114 170 return Commit(AprArray.LazyMake(mPool,targets,typeof(SvnPath)), nonrecursive, 171 mContext, mPool); 172 } 173 174 public int Status(SvnPath path, SvnRevision revision, 175 SvnWcStatus.Func statusFunc, IntPtr statusBaton, 176 bool descend, bool getAll, bool update, bool noIgnore) 177 { 178 return Status(path, revision.ToSvnOpt(mPool), statusFunc, statusBaton, 179 descend, getAll, update, noIgnore, mContext, mPool); 180 } 181 115 182 public int Status(string path, SvnRevision revision, 116 183 SvnWcStatus.Func statusFunc, IntPtr statusBaton, 117 184 bool descend, bool getAll, bool update, bool noIgnore) 118 185 { 119 return Status( path, revision.ToSvnOpt(mPool), statusFunc, statusBaton,186 return Status(new SvnPath(path,mPool), revision.ToSvnOpt(mPool), statusFunc, statusBaton, 120 187 descend, getAll, update, noIgnore, mContext, mPool); 121 188 } … … 126 193 LogMessageReceiver receiver, IntPtr baton) 127 194 { 128 Log(AprArray. CastMake(mPool,targets),195 Log(AprArray.LazyMake(mPool,targets,typeof(SvnPath)), 129 196 start.ToSvnOpt(mPool), end.ToSvnOpt(mPool), 130 197 discoverChangedPaths, strictNodeHistory, receiver, baton, … … 132 199 } 133 200 201 public void Blame(SvnPath pathOrUrl, 202 SvnRevision start, SvnRevision end, 203 BlameReceiver receiver, IntPtr baton) 204 { 205 Blame(pathOrUrl, 206 start.ToSvnOpt(mPool), end.ToSvnOpt(mPool), 207 receiver, baton, mContext, mPool); 208 } 209 210 public void Blame(SvnUrl pathOrUrl, 211 SvnRevision start, SvnRevision end, 212 BlameReceiver receiver, IntPtr baton) 213 { 214 Blame(pathOrUrl, 215 start.ToSvnOpt(mPool), end.ToSvnOpt(mPool), 216 receiver, baton, mContext, mPool); 217 } 218 134 219 public void Blame(string pathOrUrl, 135 220 SvnRevision start, SvnRevision end, 136 221 BlameReceiver receiver, IntPtr baton) 137 222 { 138 Blame(pathOrUrl,139 start.ToSvnOpt(mPool), end.ToSvnOpt(mPool),140 receiver, baton, mContext, mPool);223 InternalBlame(PathOrUrl(pathOrUrl), 224 start.ToSvnOpt(mPool), end.ToSvnOpt(mPool), 225 receiver, baton, mContext, mPool); 141 226 } 142 227 143 228 public void Diff(ICollection diffOptions, 144 stringpath1, SvnRevision revision1,145 stringpath2, SvnRevision revision2,229 SvnPath path1, SvnRevision revision1, 230 SvnPath path2, SvnRevision revision2, 146 231 bool recurse, bool ignoreAncestry, bool noDiffDeleted, 147 232 AprFile outFile, AprFile errFile) 148 233 { 149 Diff(AprArray. CastMake(mPool,diffOptions),234 Diff(AprArray.LazyMake(mPool,diffOptions,typeof(AprString)), 150 235 path1, revision1.ToSvnOpt(mPool), 151 236 path2, revision2.ToSvnOpt(mPool), … … 154 239 } 155 240 241 public void Diff(ICollection diffOptions, 242 SvnPath path1, SvnRevision revision1, 243 SvnUrl path2, SvnRevision revision2, 244 bool recurse, bool ignoreAncestry, bool noDiffDeleted, 245 AprFile outFile, AprFile errFile) 246 { 247 Diff(AprArray.LazyMake(mPool,diffOptions,typeof(AprString)), 248 path1, revision1.ToSvnOpt(mPool), 249 path2, revision2.ToSvnOpt(mPool), 250 recurse, ignoreAncestry, noDiffDeleted, 251 outFile, errFile, mContext, mPool); 252 } 253 254 public void Diff(ICollection diffOptions, 255 SvnUrl path1, SvnRevision revision1, 256 SvnPath path2, SvnRevision revision2, 257 bool recurse, bool ignoreAncestry, bool noDiffDeleted, 258 AprFile outFile, AprFile errFile) 259 { 260 Diff(AprArray.LazyMake(mPool,diffOptions,typeof(AprString)), 261 path1, revision1.ToSvnOpt(mPool), 262 path2, revision2.ToSvnOpt(mPool), 263 recurse, ignoreAncestry, noDiffDeleted, 264 outFile, errFile, mContext, mPool); 265 } 266 267 public void Diff(ICollection diffOptions, 268 SvnUrl path1, SvnRevision revision1, 269 SvnUrl path2, SvnRevision revision2, 270 bool recurse, bool ignoreAncestry, bool noDiffDeleted, 271 AprFile outFile, AprFile errFile) 272 { 273 Diff(AprArray.LazyMake(mPool,diffOptions,typeof(AprString)), 274 path1, revision1.ToSvnOpt(mPool), 275 path2, revision2.ToSvnOpt(mPool), 276 recurse, ignoreAncestry, noDiffDeleted, 277 outFile, errFile, mContext, mPool); 278 } 279 280 public void Merge(SvnPath source1, SvnRevision revision1, 281 SvnPath source2, SvnRevision revision2, 282 SvnPath targetWCPath, bool recurse, 283 bool ignoreAncestry, bool force, bool dryRun) 284 { 285 Merge(source1, revision1.ToSvnOpt(mPool), 286 source2, revision2.ToSvnOpt(mPool), 287 targetWCPath, recurse, ignoreAncestry, force, dryRun, mContext, mPool); 288 } 289 290 public void Merge(SvnUrl source1, SvnRevision revision1, 291 SvnUrl source2, SvnRevision revision2, 292 SvnPath targetWCPath, bool recurse, 293 bool ignoreAncestry, bool force, bool dryRun) 294 { 295 Merge(source1, revision1.ToSvnOpt(mPool), 296 source2, revision2.ToSvnOpt(mPool), 297 targetWCPath, recurse, ignoreAncestry, force, dryRun, mContext, mPool); 298 } 299 156 300 public void Merge(string source1, SvnRevision revision1, 157 301 string source2, SvnRevision revision2, … … 159 303 bool ignoreAncestry, bool force, bool dryRun) 160 304 { 161 Merge(source1, revision1.ToSvnOpt(mPool), 162 source2, revision2.ToSvnOpt(mPool), 163 targetWCPath, recurse, ignoreAncestry, force, dryRun, mContext, mPool); 305 InternalMerge(PathOrUrl(source1), revision1.ToSvnOpt(mPool), 306 PathOrUrl(source2), revision2.ToSvnOpt(mPool), 307 new SvnPath(targetWCPath,mPool), 308 recurse, ignoreAncestry, force, dryRun, mContext, mPool); 309 } 310 311 public void CleanUp(SvnPath dir) 312 { 313 CleanUp(dir, mContext, mPool); 164 314 } 165 315 166 316 public void CleanUp(string dir) 167 317 { 168 CleanUp(dir, mContext, mPool); 318 CleanUp(new SvnPath(dir, mPool), mContext, mPool); 319 } 320 321 public void Relocate(SvnPath dir, SvnUrl from, SvnUrl to, bool recurse) 322 { 323 Relocate(dir, from, to, recurse, mContext, mPool); 169 324 } 170 325 171 326 public void Relocate(string dir, string from, string to, bool recurse) 172 327 { 173 Relocate(dir, from, to, recurse, mContext, mPool); 328 Relocate(new SvnPath(dir, mPool), new SvnUrl(from, mPool), new SvnUrl(to, mPool), 329 recurse, mContext, mPool); 174 330 } 175 331 176 332 public void Revert(ICollection paths, bool recurse) 177 333 { 178 Revert(AprArray.CastMake(mPool,paths), recurse, mContext, mPool); 334 Revert(AprArray.LazyMake(mPool,paths,typeof(SvnPath)), recurse, mContext, mPool); 335 } 336 337 public void Resolved(SvnPath path, bool recurse) 338 { 339 Resolved(path, recurse, mContext, mPool); 179 340 } 180 341 181 342 public void Resolved(string path, bool recurse) 182 343 { 183 Resolved(path, recurse, mContext, mPool); 184 } 185 344 Resolved(new SvnPath(path, mPool), recurse, mContext, mPool); 345 } 346 347 public void Copy(SvnPath srcPath, SvnRevision srcRevision, SvnPath dstPath) 348 { 349 Copy(srcPath, srcRevision.ToSvnOpt(mPool), dstPath, mContext, mPool); 350 } 351 352 public SvnClientCommitInfo Copy(SvnUrl srcPath, SvnRevision srcRevision, SvnUrl dstPath) 353 { 354 return Copy(srcPath, srcRevision.ToSvnOpt(mPool), dstPath, mContext, mPool); 355 } 356 186 357 public SvnClientCommitInfo Copy(string srcPath, SvnRevision srcRevision, string dstPath) 187 358 { 188 return Copy(srcPath, srcRevision.ToSvnOpt(mPool), dstPath, mContext, mPool); 189 } 190 359 return InternalCopy(PathOrUrl(srcPath), srcRevision.ToSvnOpt(mPool), 360 PathOrUrl(dstPath), mContext, mPool); 361 } 362 363 public void Move(SvnPath srcPath, SvnRevision srcRevision, 364 SvnPath dstPath, bool force) 365 { 366 Move(srcPath, srcRevision.ToSvnOpt(mPool), dstPath, force, mContext, mPool); 367 } 368 369 public SvnClientCommitInfo Move(SvnUrl srcPath, SvnRevision srcRevision, 370 SvnUrl dstPath, bool force) 371 { 372 return Move(srcPath, srcRevision.ToSvnOpt(mPool), dstPath, force, mContext, mPool); 373 } 374 191 375 public SvnClientCommitInfo Move(string srcPath, SvnRevision srcRevision, 192 376 string dstPath, bool force) 193 377 { 194 return Move(srcPath, srcRevision.ToSvnOpt(mPool), dstPath, force, 195 mContext, mPool); 378 return InternalMove(PathOrUrl(srcPath), srcRevision.ToSvnOpt(mPool), 379 PathOrUrl(dstPath), force, mContext, mPool); 380 } 381 382 public void PropSet(string propName, SvnString propVal, SvnPath target, bool recurse) 383 { 384 PropSet(propName, propVal, target, recurse, mPool); 385 } 386 387 public void PropSet(string propName, string propVal, SvnPath target, bool recurse) 388 { 389 PropSet(propName, new SvnString(propVal, mPool), target, recurse, mPool); 390 } 391 392 public void PropSet(string propName, SvnString propVal, SvnUrl target, bool recurse) 393 { 394 PropSet(propName, propVal, target, recurse, mPool); 395 } 396 397 public void PropSet(string propName, string propVal, SvnUrl target, bool recurse) 398 { 399 PropSet(propName, new SvnString(propVal, mPool), target, recurse, mPool); 196 400 } 197 401 198 402 public void PropSet(string propName, SvnString propVal, string target, bool recurse) 199 403 { 200 PropSet(propName, propVal, target, recurse, mPool); 404 InternalPropSet(propName, propVal, PathOrUrl(target), recurse, mPool); 405 } 406 407 public void PropSet(string propName, string propVal, string target, bool recurse) 408 { 409 InternalPropSet(propName, new SvnString(propVal, mPool), PathOrUrl(target), recurse, 410 mPool); 411 } 412 413 public int RevPropSet(string propName, SvnString propVal, 414 SvnUrl url, SvnRevision revision, bool force) 415 { 416 return RevPropSet(propName, propVal, url, revision.ToSvnOpt(mPool), force, 417 mContext, mPool); 418 } 419 420 public int RevPropSet(string propName, string propVal, 421 SvnUrl url, SvnRevision revision, bool force) 422 { 423 return RevPropSet(propName, new SvnString(propVal, mPool), url, 424 revision.ToSvnOpt(mPool), force, mContext, mPool); 201 425 } 202 426 … … 204 428 string url, SvnRevision revision, bool force) 205 429 { 206 return RevPropSet(propName, propVal, url, revision.ToSvnOpt(mPool), force, 207 mContext, mPool); 430 return RevPropSet(propName, propVal, new SvnUrl(url, mPool), 431 revision.ToSvnOpt(mPool), force, mContext, mPool); 432 } 433 434 public int RevPropSet(string propName, string propVal, 435 string url, SvnRevision revision, bool force) 436 { 437 return RevPropSet(propName, new SvnString(propVal,mPool), new SvnUrl(url, mPool), 438 revision.ToSvnOpt(mPool), force, mContext, mPool); 439 } 440 441 public AprHash PropGet(string propName, SvnPath target, 442 SvnRevision revision, bool recurse) 443 { 444 return PropGet(propName, target, revision.ToSvnOpt(mPool), recurse, 445 mContext, mPool); 446 } 447 448 public AprHash PropGet(string propName, SvnUrl target, 449 SvnRevision revision, bool recurse) 450 { 451 return PropGet(propName, target, revision.ToSvnOpt(mPool), recurse, 452 mContext, mPool); 208 453 } 209 454 … … 211 456 SvnRevision revision, bool recurse) 212 457 { 213 return PropGet(propName, target, revision.ToSvnOpt(mPool), recurse, 214 mContext, mPool); 458 return InternalPropGet(propName, PathOrUrl(target), revision.ToSvnOpt(mPool), recurse, 459 mContext, mPool); 460 } 461 462 public SvnString RevPropGet(string propName, SvnUrl url, 463 SvnRevision revision, out int setRev) 464 { 465 return RevPropGet(propName, url, revision.ToSvnOpt(mPool), out setRev, 466 mContext, mPool); 215 467 } 216 468 … … 218 470 SvnRevision revision, out int setRev) 219 471 { 220 return RevPropGet(propName, url, revision.ToSvnOpt(mPool), out setRev, 221 mContext, mPool); 472 return RevPropGet(propName, new SvnUrl(url, mPool), revision.ToSvnOpt(mPool), 473 out setRev, mContext, mPool); 474 } 475 476 public AprHash PropList(SvnPath target, SvnRevision revision, bool recurse) 477 { 478 return PropList(target, revision.ToSvnOpt(mPool), recurse, mContext, mPool); 479 } 480 481 public AprHash PropList(SvnUrl target, SvnRevision revision, bool recurse) 482 { 483 return PropList(target, revision.ToSvnOpt(mPool), recurse, mContext, mPool); 222 484 } 223 485 224 486 public AprHash PropList(string target, SvnRevision revision, bool recurse) 225 487 { 226 return PropList(target, revision.ToSvnOpt(mPool), recurse, mContext, mPool); 227 } 228 488 return InternalPropList(PathOrUrl(target), revision.ToSvnOpt(mPool), recurse, 489 mContext, mPool); 490 } 491 492 public AprHash RevPropList(SvnUrl url, SvnRevision revision, out int setRev) 493 { 494 return RevPropList(url, revision.ToSvnOpt(mPool), out setRev, mContext, mPool); 495 } 496 229 497 public AprHash RevPropList(string url, SvnRevision revision, out int setRev) 230 498 { 231 return RevPropList(url, revision.ToSvnOpt(mPool), out setRev, mContext, mPool); 232 } 233 499 return RevPropList(new SvnUrl(url, mPool), revision.ToSvnOpt(mPool), out setRev, 500 mContext, mPool); 501 } 502 503 public void Export(SvnPath from, SvnPath to, SvnRevision revision, bool force) 504 { 505 Export(from, to, revision.ToSvnOpt(mPool), force, mContext, mPool); 506 } 507 508 public int Export(SvnUrl from, SvnPath to, SvnRevision revision, bool force) 509 { 510 return Export(from, to, revision.ToSvnOpt(mPool), force, mContext, mPool); 511 } 512 234 513 public int Export(string from, string to, SvnRevision revision, bool force) 235 514 { 236 return Export(from, to, revision.ToSvnOpt(mPool), force, mContext, mPool); 515 return InternalExport(PathOrUrl(from), new SvnPath(to,mPool), revision.ToSvnOpt(mPool), 516 force, mContext, mPool); 517 } 518 519 public AprHash List(SvnPath pathOrUrl, SvnRevision revision, bool recurse) 520 { 521 return List(pathOrUrl, revision.ToSvnOpt(mPool), recurse, mContext, mPool); 522 } 523 524 public AprHash List(SvnUrl pathOrUrl, SvnRevision revision, bool recurse) 525 { 526 return List(pathOrUrl, revision.ToSvnOpt(mPool), recurse, mContext, mPool); 237 527 } 238 528 239 529 public AprHash List(string pathOrUrl, SvnRevision revision, bool recurse) 240 530 { 241 return List(pathOrUrl, revision.ToSvnOpt(mPool), recurse, mContext, mPool); 531 return InternalList(PathOrUrl(pathOrUrl), revision.ToSvnOpt(mPool), recurse, 532 mContext, mPool); 533 } 534 535 public void Cat(SvnStream stream, SvnPath pathOrUrl, SvnRevision revision) 536 { 537 Cat(stream, pathOrUrl, revision.ToSvnOpt(mPool), mContext, mPool); 538 } 539 540 public void Cat(SvnStream stream, SvnUrl pathOrUrl, SvnRevision revision) 541 { 542 Cat(stream, pathOrUrl, revision.ToSvnOpt(mPool), mContext, mPool); 242 543 } 243 544 244 545 public void Cat(SvnStream stream, string pathOrUrl, SvnRevision revision) 245 546 { 246 Cat(stream, pathOrUrl, revision.ToSvnOpt(mPool), mContext, mPool);247 } 248 249 public AprString UrlFromPath(stringpathOrUrl)547 InternalCat(stream, PathOrUrl(pathOrUrl), revision.ToSvnOpt(mPool), mContext, mPool); 548 } 549 550 public SvnUrl UrlFromPath(SvnPath pathOrUrl) 250 551 { 251 552 return UrlFromPath(pathOrUrl, mPool); 252 553 } 253 554 555 public SvnUrl UrlFromPath(SvnUrl pathOrUrl) 556 { 557 return UrlFromPath(pathOrUrl, mPool); 558 } 559 560 public SvnUrl UrlFromPath(string pathOrUrl) 561 { 562 return InternalUrlFromPath(PathOrUrl(pathOrUrl), mPool); 563 } 564 565 public AprString UuidFromUrl(SvnUrl url) 566 { 567 return UuidFromUrl(url, mContext, mPool); 568 } 569 254 570 public AprString UuidFromUrl(string url) 255 571 { 256 return UuidFromUrl( url, mContext, mPool);572 return UuidFromUrl(new SvnUrl(url, mPool), mContext, mPool); 257 573 } 258 574 trunk/SubversionSharp/dev/src/SvnClientBase.cs
r44 r50 17 17 public class SvnClientBase 18 18 { 19 public delegate SvnError GetCommitLog(out AprString logMessage, out AprStringtmpFile,19 public delegate SvnError GetCommitLog(out AprString logMessage, out SvnPath tmpFile, 20 20 AprArray commitItems, IntPtr baton, 21 21 AprPool pool); … … 30 30 AprPool pool); 31 31 32 public static int Checkout( string url, stringpath,32 public static int Checkout(SvnUrl url, SvnPath path, 33 33 SvnOptRevision revision, 34 34 bool recurse, SvnClientContext ctx, AprPool pool) … … 46 46 47 47 48 public static int Update( stringpath,48 public static int Update(SvnPath path, 49 49 SvnOptRevision revision, 50 50 bool recurse, SvnClientContext ctx, AprPool pool) … … 61 61 } 62 62 63 public static int Switch( string path, stringurl,63 public static int Switch(SvnPath path, SvnUrl url, 64 64 SvnOptRevision revision, 65 65 bool recurse, SvnClientContext ctx, AprPool pool) … … 76 76 } 77 77 78 public static void Add( stringpath,78 public static void Add(SvnPath path, 79 79 bool recurse, 80 80 SvnClientContext ctx, AprPool pool) … … 111 111 } 112 112 113 public static SvnClientCommitInfo Import( string path, stringurl, bool nonrecursive,113 public static SvnClientCommitInfo Import(SvnPath path, SvnUrl url, bool nonrecursive, 114 114 SvnClientContext ctx, AprPool pool) 115 115 { … … 137 137 } 138 138 139 public static int Status( stringpath,139 public static int Status(SvnPath path, 140 140 SvnOptRevision revision, 141 141 SvnWcStatus.Func statusFunc, IntPtr statusBaton, … … 179 179 } 180 180 181 public static void Blame( stringpathOrUrl,181 public static void Blame(SvnPath pathOrUrl, 182 182 SvnOptRevision start, SvnOptRevision end, 183 183 BlameReceiver receiver, IntPtr baton, 184 184 SvnClientContext ctx, AprPool pool) 185 185 { 186 InternalBlame(pathOrUrl, start, end, receiver, baton, ctx, pool); 187 } 188 189 public static void Blame(SvnUrl pathOrUrl, 190 SvnOptRevision start, SvnOptRevision end, 191 BlameReceiver receiver, IntPtr baton, 192 SvnClientContext ctx, AprPool pool) 193 { 194 InternalBlame(pathOrUrl, start, end, receiver, baton, ctx, pool); 195 } 196 197 protected static void InternalBlame(IAprUnmanaged pathOrUrl, 198 SvnOptRevision start, SvnOptRevision end, 199 BlameReceiver receiver, IntPtr baton, 200 SvnClientContext ctx, AprPool pool) 201 { 186 202 SvnDelegate receiverDelegate = new SvnDelegate(receiver); 187 203 Debug.WriteLine(String.Format("svn_client_blame({0},{1},{2},{3},{4:X},{5},{6})",pathOrUrl,start,end,receiver.Method.Name,baton.ToInt32(),ctx,pool)); 188 SvnError err = Svn.svn_client_blame(pathOrUrl , start, end,204 SvnError err = Svn.svn_client_blame(pathOrUrl.ToIntPtr(), start, end, 189 205 (Svn.svn_client_blame_receiver_t)receiverDelegate.Wrapper, 190 206 baton, … … 195 211 196 212 public static void Diff(AprArray diffOptions, 197 string path1, SvnOptRevision revision1, 198 string path2, SvnOptRevision revision2, 213 SvnPath path1, SvnOptRevision revision1, 214 SvnPath path2, SvnOptRevision revision2, 215 bool recurse, bool ignoreAncestry, bool noDiffDeleted, 216 AprFile outFile, AprFile errFile, 217 SvnClientContext ctx, AprPool pool) 218 { 219 InternalDiff(diffOptions, path1, revision1, path2, revision2, 220 recurse, ignoreAncestry, noDiffDeleted, outFile, errFile, ctx, pool); 221 } 222 223 public static void Diff(AprArray diffOptions, 224 SvnUrl path1, SvnOptRevision revision1, 225 SvnPath path2, SvnOptRevision revision2, 226 bool recurse, bool ignoreAncestry, bool noDiffDeleted, 227 AprFile outFile, AprFile errFile, 228 SvnClientContext ctx, AprPool pool) 229 { 230 InternalDiff(diffOptions, path1, revision1, path2, revision2, 231 recurse, ignoreAncestry, noDiffDeleted, outFile, errFile, ctx, pool); 232 } 233 234 public static void Diff(AprArray diffOptions, 235 SvnPath path1, SvnOptRevision revision1, 236 SvnUrl path2, SvnOptRevision revision2, 237 bool recurse, bool ignoreAncestry, bool noDiffDeleted, 238 AprFile outFile, AprFile errFile, 239 SvnClientContext ctx, AprPool pool) 240 { 241 InternalDiff(diffOptions, path1, revision1, path2, revision2, 242 recurse, ignoreAncestry, noDiffDeleted, outFile, errFile, ctx, pool); 243 } 244 245 public static void Diff(AprArray diffOptions, 246 SvnUrl path1, SvnOptRevision revision1, 247 SvnUrl path2, SvnOptRevision revision2, 199 248 bool recurse, bool ignoreAncestry, bool noDiffDeleted, 200 249 AprFile outFile, AprFile errFile, … … 210 259 } 211 260 212 public static void Merge(string source1, SvnOptRevision revision1, 213 string source2, SvnOptRevision revision2, 214 string targetWCPath, bool recurse, 261 protected static void InternalDiff(AprArray diffOptions, 262 IAprUnmanaged path1, SvnOptRevision revision1, 263 IAprUnmanaged path2, SvnOptRevision revision2, 264 bool recurse, bool ignoreAncestry, bool noDiffDeleted, 265 AprFile outFile, AprFile errFile, 266 SvnClientContext ctx, AprPool pool) 267 { 268 Debug.WriteLine(String.Format("svn_client_diff({0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11})",diffOptions,path1,revision1,path2,revision2,recurse,ignoreAncestry,noDiffDeleted,outFile,errFile,ctx,pool)); 269 SvnError err = Svn.svn_client_diff(diffOptions, path1.ToIntPtr(), revision1, 270 path2.ToIntPtr(), revision2, 271 (recurse ? 1 : 0), (ignoreAncestry ? 1 : 0), 272 (noDiffDeleted ? 1 : 0), outFile, errFile, 273 ctx, pool); 274 if( !err.IsNoError ) 275 throw new SvnException(err); 276 } 277 278 public static void Merge(SvnPath source1, SvnOptRevision revision1, 279 SvnPath source2, SvnOptRevision revision2, 280 SvnPath targetWCPath, bool recurse, 215 281 bool ignoreAncestry, bool force, bool dryRun, 216 282 SvnClientContext ctx, AprPool pool) 217 283 { 284 InternalMerge(source1, revision1, source2, revision2, targetWCPath, recurse, 285 ignoreAncestry, force, dryRun, ctx, pool); 286 } 287 288 public static void Merge(SvnUrl source1, SvnOptRevision revision1, 289 SvnUrl source2, SvnOptRevision revision2, 290 SvnPath targetWCPath, bool recurse, 291 bool ignoreAncestry, bool force, bool dryRun, 292 SvnClientContext ctx, AprPool pool) 293 { 294 InternalMerge(source1, revision1, source2, revision2, targetWCPath, recurse, 295 ignoreAncestry, force, dryRun, ctx, pool); 296 } 297 298 protected static void InternalMerge(IAprUnmanaged source1, SvnOptRevision revision1, 299 IAprUnmanaged source2, SvnOptRevision revision2, 300 SvnPath targetWCPath, bool recurse, 301 bool ignoreAncestry, bool force, bool dryRun, 302 SvnClientContext ctx, AprPool pool) 303 { 218 304 Debug.WriteLine(String.Format("svn_client_merge({0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10})",source1,revision1,source2,revision2,targetWCPath,recurse,ignoreAncestry,force,dryRun,ctx,pool)); 219 SvnError err = Svn.svn_client_merge(source1, revision1, source2, revision2, 305 SvnError err = Svn.svn_client_merge(source1.ToIntPtr(), revision1, 306 source2.ToIntPtr(), revision2, 220 307 targetWCPath, (recurse ? 1 : 0), 221 308 (ignoreAncestry ? 1 : 0), (force ? 1 : 0), … … 226 313 } 227 314 228 public static void CleanUp( stringdir,315 public static void CleanUp(SvnPath dir, 229 316 SvnClientContext ctx, AprPool pool) 230 317 { … … 235 322 } 236 323 237 public static void Relocate( string dir, string from, stringto,324 public static void Relocate(SvnPath dir, SvnUrl from, SvnUrl to, 238 325 bool recurse, 239 326 SvnClientContext ctx, AprPool pool) … … 254 341 } 255 342 256 public static void Resolved( stringpath, bool recurse,343 public static void Resolved(SvnPath path, bool recurse, 257 344 SvnClientContext ctx, AprPool pool) 258 345 { … … 263 350 } 264 351 265 public static SvnClientCommitInfo Copy(string srcPath, SvnOptRevision srcRevision, 266 string dstPath, 352 public static void Copy(SvnPath srcPath, SvnOptRevision srcRevision, 353 SvnPath dstPath, 354 SvnClientContext ctx, AprPool pool) 355 { 356 InternalCopy(srcPath, srcRevision, dstPath, ctx, pool); 357 } 358 359 public static SvnClientCommitInfo Copy(SvnUrl srcPath, SvnOptRevision srcRevision, 360 SvnUrl dstPath, 267 361 SvnClientContext ctx, AprPool pool) 362 { 363 return InternalCopy(srcPath, srcRevision, dstPath, ctx, pool); 364 } 365 366 protected static SvnClientCommitInfo InternalCopy(IAprUnmanaged srcPath, SvnOptRevision srcRevision, 367 IAprUnmanaged dstPath, 368 SvnClientContext ctx, AprPool pool) 268 369 { 269 370 IntPtr commitInfo; 270 371 Debug.Write(String.Format("svn_client_copy({0},{1},{2},{3},{4})...",srcPath,srcRevision,dstPath,ctx,pool)); 271 SvnError err = Svn.svn_client_copy(out commitInfo, srcPath , srcRevision,272 dstPath ,372 SvnError err = Svn.svn_client_copy(out commitInfo, srcPath.ToIntPtr(), srcRevision, 373 dstPath.ToIntPtr(), 273 374 ctx, pool); 274 375 if( !err.IsNoError ) … … 278 379 } 279 380 280 public static SvnClientCommitInfo Move(string srcPath, SvnOptRevision srcRevision, 281 string dstPath, bool force, 381 public static void Move(SvnPath srcPath, SvnOptRevision srcRevision, 382 SvnPath dstPath, bool force, 383 SvnClientContext ctx, AprPool pool) 384 { 385 InternalMove(srcPath, srcRevision, dstPath, force, ctx, pool); 386 } 387 388 public static SvnClientCommitInfo Move(SvnUrl srcPath, SvnOptRevision srcRevision, 389 SvnUrl dstPath, bool force, 282 390 SvnClientContext ctx, AprPool pool) 391 { 392 return InternalMove(srcPath, srcRevision, dstPath, force, ctx, pool); 393 } 394 395 public static SvnClientCommitInfo InternalMove(IAprUnmanaged srcPath, 396 SvnOptRevision srcRevision, 397 IAprUnmanaged dstPath, bool force, 398 SvnClientContext ctx, AprPool pool) 283 399 { 284 400 IntPtr commitInfo; 285 401 Debug.Write(String.Format("svn_client_move({0},{1},{2},{3},{4},{5})...",srcPath,srcRevision,dstPath,force,ctx,pool)); 286 SvnError err = Svn.svn_client_move(out commitInfo, srcPath , srcRevision,287 dstPath , (force ? 1 : 0),402 SvnError err = Svn.svn_client_move(out commitInfo, srcPath.ToIntPtr(), srcRevision, 403 dstPath.ToIntPtr(), (force ? 1 : 0), 288 404 ctx, pool); 289 405 if( !err.IsNoError ) … … 293 409 } 294 410 295 public static void PropSet(string propName, SvnString propVal, stringtarget,411 public static void PropSet(string propName, SvnString propVal, SvnPath target, 296 412 bool recurse, AprPool pool) 297 413 { 414 InternalPropSet(propName, propVal, target, recurse, pool); 415 } 416 417 public static void PropSet(string propName, SvnString propVal, SvnUrl target, 418 bool recurse, AprPool pool) 419 { 420 InternalPropSet(propName, propVal, target, recurse, pool); 421 } 422 423 protected static void InternalPropSet(string propName, SvnString propVal, IAprUnmanaged target, 424 bool recurse, AprPool pool) 425 { 298 426 Debug.WriteLine(String.Format("svn_client_propset({0},{1},{2},{3},{4})",propName,propVal,target,recurse,pool)); 299 SvnError err = Svn.svn_client_propset(propName, propVal, target ,427 SvnError err = Svn.svn_client_propset(propName, propVal, target.ToIntPtr(), 300 428 (recurse ? 1 : 0), pool); 301 429 if( !err.IsNoError ) … … 304 432 305 433 public static int RevPropSet(string propName, SvnString propVal, 306 stringurl, SvnOptRevision revision, bool force,434 SvnUrl url, SvnOptRevision revision, bool force, 307 435 SvnClientContext ctx, AprPool pool) 308 436 { … … 318 446 } 319 447 320 public static AprHash PropGet(string propName, stringtarget,448 public static AprHash PropGet(string propName, SvnPath target, 321 449 SvnOptRevision revision, bool recurse, 322 450 SvnClientContext ctx, AprPool pool) 323 451 { 452 return InternalPropGet(propName, target, revision, recurse, ctx, pool); 453 } 454 455 public static AprHash PropGet(string propName, SvnUrl target, 456 SvnOptRevision revision, bool recurse, 457 SvnClientContext ctx, AprPool pool) 458 { 459 return InternalPropGet(propName, target, revision, recurse, ctx, pool); 460 } 461 462 protected static AprHash InternalPropGet(string propName, IAprUnmanaged target, 463 SvnOptRevision revision, bool recurse, 464 SvnClientContext ctx, AprPool pool) 465 { 324 466 IntPtr h; 325 467 Debug.Write(String.Format("svn_client_propget({0},{1},{2},{3},{4},{5})...",propName,target,revision,recurse,ctx,pool)); 326 SvnError err = Svn.svn_client_propget(out h, propName, target , revision,468 SvnError err = Svn.svn_client_propget(out h, propName, target.ToIntPtr(), revision, 327 469 (recurse ? 1 : 0), 328 470 ctx, pool); … … 333 475 } 334 476 335 public static SvnString RevPropGet(string propName, stringurl,477 public static SvnString RevPropGet(string propName, SvnUrl url, 336 478 SvnOptRevision revision, out int setRev, 337 479 SvnClientContext ctx, AprPool pool) … … 347 489 } 348 490 349 public static AprHash PropList( stringtarget,491 public static AprHash PropList(SvnPath target, 350 492 SvnOptRevision revision, bool recurse, 351 493 SvnClientContext ctx, AprPool pool) 352 494 { 495 return InternalPropList(target, revision, recurse, ctx, pool); 496 } 497 498 public static AprHash PropList(SvnUrl target, 499 SvnOptRevision revision, bool recurse, 500 SvnClientContext ctx, AprPool pool) 501 { 502 return InternalPropList(target, revision, recurse, ctx, pool); 503 } 504 505 protected static AprHash InternalPropList(IAprUnmanaged target, 506 SvnOptRevision revision, bool recurse, 507 SvnClientContext ctx, AprPool pool) 508 { 353 509 IntPtr h; 354 510 Debug.Write(String.Format("svn_client_proplist({0},{1},{2},{3},{4})...",target,revision,recurse,ctx,pool)); 355 SvnError err = Svn.svn_client_proplist(out h, target , revision,511 SvnError err = Svn.svn_client_proplist(out h, target.ToIntPtr(), revision, 356 512 (recurse ? 1 : 0), 357 513 ctx, pool); … … 362 518 } 363 519 364 public static AprHash RevPropList( stringurl,520 public static AprHash RevPropList(SvnUrl url, 365 521 SvnOptRevision revision, out int setRev, 366 522 SvnClientContext ctx, AprPool pool) … … 376 532 } 377 533 378 public static int Export(string from, string to, 379 SvnOptRevision revision, 380 bool force, SvnClientContext ctx, AprPool pool) 534 public static void Export(SvnPath from, SvnPath to, 535 SvnOptRevision revision, 536 bool force, SvnClientContext ctx, AprPool pool) 537 { 538 InternalExport(from, to, revision, force, ctx, pool); 539 } 540 541 public static int Export(SvnUrl from, SvnPath to, 542 SvnOptRevision revision, 543 bool force, SvnClientContext ctx, AprPool pool) 544 { 545 return InternalExport(from, to, revision, force, ctx, pool); 546 } 547 548 protected static int InternalExport(IAprUnmanaged from, SvnPath to, 549 SvnOptRevision revision, 550 bool force, SvnClientContext ctx, AprPool pool) 381 551 { 382 552 int rev; 383 553 Debug.Write(String.Format("svn_client_export({0},{1},{2},{3},{4},{5})...",from,to,revision,force,ctx,pool)); 384 SvnError err = Svn.svn_client_export(out rev, from , to,554 SvnError err = Svn.svn_client_export(out rev, from.ToIntPtr(), to, 385 555 revision, 386 556 (force ? 1 :0), ctx, pool); … … 391 561 } 392 562 393 public static AprHash List( stringpathOrUrl,563 public static AprHash List(SvnPath pathOrUrl, 394 564 SvnOptRevision revision, bool recurse, 395 565 SvnClientContext ctx, AprPool pool) 396 566 { 567 return InternalList(pathOrUrl, revision, recurse, ctx, pool); 568 } 569 570 public static AprHash List(SvnUrl pathOrUrl, 571 SvnOptRevision revision, bool recurse, 572 SvnClientContext ctx, AprPool pool) 573 { 574 return InternalList(pathOrUrl, revision, recurse, ctx, pool); 575 } 576 577 protected static AprHash InternalList(IAprUnmanaged pathOrUrl, 578 SvnOptRevision revision, bool recurse, 579 SvnClientContext ctx, AprPool pool) 580 { 397 581 IntPtr h; 398 582 Debug.Write(String.Format("svn_client_list({0},{1},{2},{3},{4})...",pathOrUrl,revision,recurse,ctx,pool)); 399 SvnError err = Svn.svn_client_ls(out h, pathOrUrl , revision, (recurse ? 1 : 0),583 SvnError err = Svn.svn_client_ls(out h, pathOrUrl.ToIntPtr(), revision, (recurse ? 1 : 0), 400 584 ctx, pool); 401 585 if( !err.IsNoError ) … … 405 589 } 406 590 407 public static void Cat(SvnStream stream, stringpathOrUrl,591 public static void Cat(SvnStream stream, SvnPath pathOrUrl, 408 592 SvnOptRevision revision, 409 593 SvnClientContext ctx, AprPool pool) 410 594 { 595 InternalCat(stream, pathOrUrl, revision, ctx, pool); 596 } 597 598 public static void Cat(SvnStream stream, SvnUrl pathOrUrl, 599 SvnOptRevision revision, 600 SvnClientContext ctx, AprPool pool) 601 { 602 InternalCat(stream, pathOrUrl, revision, ctx, pool); 603 } 604 605 protected static void InternalCat(SvnStream stream, IAprUnmanaged pathOrUrl, 606 SvnOptRevision revision, 607 SvnClientContext ctx, AprPool pool) 608 { 411 609 Debug.WriteLine(String.Format("svn_client_cat({0},{1},{2},{3},{4})",stream,pathOrUrl,revision,ctx,pool)); 412 SvnError err = Svn.svn_client_cat(stream, pathOrUrl, revision, ctx, pool); 413 if( !err.IsNoError ) 414 throw new SvnException(err); 415 } 416 417 public static AprString UrlFromPath(string pathOrUrl, AprPool pool) 610 SvnError err = Svn.svn_client_cat(stream, pathOrUrl.ToIntPtr(), revision, ctx, pool); 611 if( !err.IsNoError ) 612 throw new SvnException(err); 613 } 614 615 public static SvnUrl UrlFromPath(SvnPath pathOrUrl, AprPool pool) 616 { 617 return InternalUrlFromPath(pathOrUrl, pool); 618 } 619 620 public static SvnUrl UrlFromPath(SvnUrl pathOrUrl, AprPool pool) 621 { 622 return InternalUrlFromPath(pathOrUrl, pool); 623 } 624 625 protected static SvnUrl InternalUrlFromPath(IAprUnmanaged pathOrUrl, AprPool pool) 418 626 { 419 627 IntPtr s; 420 628 Debug.Write(String.Format("svn_client_url_from_path({0},{1})...",pathOrUrl,pool)); 421 SvnError err = Svn.svn_client_url_from_path(out s, pathOrUrl , pool);629 SvnError err = Svn.svn_client_url_from_path(out s, pathOrUrl.ToIntPtr(), pool); 422 630 if( !err.IsNoError ) 423 631 throw new SvnException(err); … … 426 634 } 427 635 428 public static AprString UuidFromUrl( stringurl, SvnClientContext ctx, AprPool pool)636 public static AprString UuidFromUrl(SvnUrl url, SvnClientContext ctx, AprPool pool) 429 637 { 430 638 IntPtr s; trunk/SubversionSharp/dev/src/SvnClientCommitItem.cs
r46 r50 89 89 90 90 #region Properties wrappers 91 public AprStringPath91 public SvnPath Path 92 92 { 93 93 get 94 94 { 95 95 CheckPtr(); 96 return(new AprString(mCommitItem->path));96 return(new SvnPath(mCommitItem->path)); 97 97 } 98 98 } trunk/SubversionSharp/dev/src/SvnConfig.cs
r46 r50 93 93 } 94 94 95 public static void Ensure(string configDir, AprPool pool) 96 { 97 Debug.WriteLine(String.Format("svn_config_ensure({0},{1})",configDir,pool)); 98 SvnError err = Svn.svn_config_ensure(configDir, pool); 99 if(!err.IsNoError) 100 throw new SvnException(err); 101 } 102 103 public static void Ensure(AprString configDir, AprPool pool) 95 public static void Ensure(SvnPath configDir, AprPool pool) 104 96 { 105 97 Debug.WriteLine(String.Format("svn_config_ensure({0},{1})",configDir,pool)); … … 119 111 } 120 112 121 public static AprHash GetConfig(string configDir, AprPool pool) 122 { 123 IntPtr h; 124 Debug.WriteLine(String.Format("svn_config_get_config({0},{1})",configDir,pool)); 125 SvnError err = Svn.svn_config_get_config(out h, configDir, pool); 126 if(!err.IsNoError) 127 throw new SvnException(err); 128 return h; 129 } 130 131 public static AprHash GetConfig(AprString configDir, AprPool pool) 113 public static AprHash GetConfig(SvnPath configDir, AprPool pool) 132 114 { 133 115 IntPtr h; trunk/SubversionSharp/dev/src/SvnDelegate.cs
r40 r50 75 75 SvnWcNotify.Func func = mFunc as SvnWcNotify.Func; 76 76 try { 77 Debug.WriteLine(String.Format("[Callback:{0}]SvnWcNotifyFunc({1:X},{2},{3},{4},{5},{6},{7},{8})",func.Method.Name,baton.ToInt32(),new AprString(path),(SvnWcNotify.Action) action,(Svn.NodeKind) kind,new AprString(mime_type),(SvnWcNotify.State) content_state,(SvnWcNotify.State) prop_state,revision));78 func(baton, new AprString(path),77 Debug.WriteLine(String.Format("[Callback:{0}]SvnWcNotifyFunc({1:X},{2},{3},{4},{5},{6},{7},{8})",func.Method.Name,baton.ToInt32(),new SvnPath(path),(SvnWcNotify.Action) action,(Svn.NodeKind) kind,new AprString(mime_type),(SvnWcNotify.State) content_state,(SvnWcNotify.State) prop_state,revision)); 78 func(baton, new SvnPath(path), 79 79 (SvnWcNotify.Action) action, (Svn.NodeKind) kind, 80 80 new AprString(mime_type), (SvnWcNotify.State) content_state, … … 104 104 try { 105 105 AprString logMessage; 106 AprStringtmpFile;106 SvnPath tmpFile; 107 107 Debug.Write(String.Format("[Callback:{0}]SvnClientGetCommitLog({1},{2:X},{3})...",func.Method.Name,new AprArray(commit_items),baton.ToInt32(),new AprPool(pool))); 108 108 err = func(out logMessage, out tmpFile, … … 160 160 SvnWcStatus.Func func = mFunc as SvnWcStatus.Func; 161 161 try { 162 Debug.WriteLine(String.Format("[Callback:{0}]SvnWcStatusFunc({1:X},{2},{3})",func.Method.Name,baton.ToInt32(),new AprString(path),new SvnWcStatus(status)));163 func(baton, new AprString(path), (SvnWcStatus) status);162 Debug.WriteLine(String.Format("[Callback:{0}]SvnWcStatusFunc({1:X},{2},{3})",func.Method.Name,baton.ToInt32(),new SvnPath(path),new SvnWcStatus(status))); 163 func(baton, new SvnPath(path), (SvnWcStatus) status); 164 164 } 165 165 catch( Exception ) { trunk/SubversionSharp/dev/src/SvnWcEntry.cs
r46 r50 112 112 113 113 #region Properties wrappers 114 public AprStringName115 { 116 get 117 { 118 CheckPtr(); 119 return(new AprString(mEntry->name));114 public SvnPath Name 115 { 116 get 117 { 118 CheckPtr(); 119 return(new SvnPath(mEntry->name)); 120 120 } 121 121 } … … 229 229 } 230 230 231 public AprStringConflictOld232 { 233 get 234 { 235 CheckPtr(); 236 return(new AprString(mEntry->conflict_old));237 } 238 } 239 240 public AprStringConflictNew241 { 242 get 243 { 244 CheckPtr(); 245 return(new AprString(mEntry->conflict_new));246 } 247 } 248 249 public AprStringConflictWork250 { 251 get 252 { 253 CheckPtr(); 254 return(new AprString(mEntry->conflict_wrk));255 } 256 } 257 258 public AprStringRejectFile259 { 260 get 261 { 262 CheckPtr(); 263 return(new AprString(mEntry->prejfile));231 public SvnPath ConflictOld 232 { 233 get 234 { 235 CheckPtr(); 236 return(new SvnPath(mEntry->conflict_old)); 237 } 238 } 239 240 public SvnPath ConflictNew 241 { 242 get 243 { 244 CheckPtr(); 245 return(new SvnPath(mEntry->conflict_new)); 246 } 247 } 248 249 public SvnPath ConflictWork 250 { 251 get 252 { 253 CheckPtr(); 254 return(new SvnPath(mEntry->conflict_wrk)); 255 } 256 } 257 258 public SvnPath RejectFile 259 { 260 get 261 { 262 CheckPtr(); 263 return(new SvnPath(mEntry->prejfile)); 264 264 } 265 265 } trunk/SubversionSharp/dev/src/SvnWcNotify.cs
r31 r50 54 54 } 55 55 56 public delegate void Func(IntPtr baton, AprStringPath,56 public delegate void Func(IntPtr baton, SvnPath Path, 57 57 Action action, Svn.NodeKind kind, 58 58 AprString mimeType, State contentState, trunk/SubversionSharp/dev/src/SvnWcStatus.cs
r46 r50 18 18 public unsafe class SvnWcStatus : IAprUnmanaged 19 19 { 20 public delegate void Func(IntPtr baton, AprStringpath, SvnWcStatus status);20 public delegate void Func(IntPtr baton, SvnPath path, SvnWcStatus status); 21 21 22 22 public enum Kind { trunk/SubversionSharp/test/src/Main.cs
r44 r50 44 44 } 45 45 46 public static void NotifyCallback(IntPtr baton, AprStringPath,46 public static void NotifyCallback(IntPtr baton, SvnPath Path, 47 47 SvnWcNotify.Action action, Svn.NodeKind kind, 48 48 AprString mimeType, SvnWcNotify.State contentState, … … 51 51 } 52 52 53 public static SvnError GetCommitLogCallback(out AprString logMessage, out AprStringtmpFile,53 public static SvnError GetCommitLogCallback(out AprString logMessage, out SvnPath tmpFile, 54 54 AprArray commitItems, IntPtr baton, 55 55 AprPool pool)