コード例 #1
0
        public static int Status(SvnPath path,
                                 SvnOptRevision revision,
                                 SvnWcStatus.Func statusFunc, IntPtr statusBaton,
                                 bool descend, bool getAll, bool update, bool noIgnore,
                                 SvnClientContext ctx, AprPool pool)
        {
            int         rev;
            SvnDelegate statusDelegate = new SvnDelegate(statusFunc);

            Debug.Write(String.Format("svn_client_status({0},{1},{2},{3},{4:X},{5},{6},{7},{8},{9})...", path, revision, statusFunc.Method.Name, statusBaton.ToInt32(), descend, getAll, update, noIgnore, ctx, pool));
            SvnError err = Svn.svn_client_status(out rev, path, revision,
                                                 (Svn.svn_wc_status_func_t)statusDelegate.Wrapper,
                                                 statusBaton,
                                                 (descend ? 1 : 0), (getAll ? 1 : 0),
                                                 (update ? 1 : 0), (noIgnore ? 1 : 0),
                                                 ctx, pool);

            if (!err.IsNoError)
            {
                throw new SvnException(err);
            }
            Debug.WriteLine(String.Format("Done({0})", rev));
            if (update)
            {
                return(rev);
            }
            else
            {
                return(-1);
            }
        }
コード例 #2
0
 public int Status(SvnPath path, SvnRevision revision,
                   SvnWcStatus.Func statusFunc, IntPtr statusBaton,
                   bool descend, bool getAll, bool update, bool noIgnore)
 {
     return(Status(path, revision.ToSvnOpt(mPool), statusFunc, statusBaton,
                   descend, getAll, update, noIgnore, mContext, mPool));
 }
コード例 #3
0
 public static void Blame(SvnPath pathOrUrl,
                          SvnOptRevision start, SvnOptRevision end,
                          BlameReceiver receiver, IntPtr baton,
                          SvnClientContext ctx, AprPool pool)
 {
     InternalBlame(pathOrUrl, start, end, receiver, baton, ctx, pool);
 }
コード例 #4
0
        public static void Blame(SvnPath pathOrUrl,
								 SvnOptRevision start, SvnOptRevision end, 
								 BlameReceiver receiver, IntPtr baton,
							     SvnClientContext ctx, AprPool pool)
        {
            InternalBlame(pathOrUrl, start, end, receiver, baton, ctx, pool);
        }
コード例 #5
0
 public void Blame(SvnPath pathOrUrl,
                   SvnRevision start, SvnRevision end,
                   BlameReceiver receiver, IntPtr baton)
 {
     Blame(pathOrUrl,
           start.ToSvnOpt(mPool), end.ToSvnOpt(mPool),
           receiver, baton, mContext, mPool);
 }
コード例 #6
0
 public static void Merge(SvnUrl source1, SvnOptRevision revision1,
                          SvnUrl source2, SvnOptRevision revision2,
                          SvnPath targetWCPath, bool recurse,
                          bool ignoreAncestry, bool force, bool dryRun,
                          SvnClientContext ctx, AprPool pool)
 {
     InternalMerge(source1, revision1, source2, revision2, targetWCPath, recurse,
                   ignoreAncestry, force, dryRun, ctx, pool);
 }
コード例 #7
0
 public void Merge(SvnUrl source1, SvnRevision revision1,
                   SvnUrl source2, SvnRevision revision2,
                   SvnPath targetWCPath, bool recurse,
                   bool ignoreAncestry, bool force, bool dryRun)
 {
     Merge(source1, revision1.ToSvnOpt(mPool),
           source2, revision2.ToSvnOpt(mPool),
           targetWCPath, recurse, ignoreAncestry, force, dryRun, mContext, mPool);
 }
コード例 #8
0
        public static void Ensure(SvnPath configDir, AprPool pool)
        {
            Debug.WriteLine(String.Format("svn_config_ensure({0},{1})", configDir, pool));
            SvnError err = Svn.svn_config_ensure(configDir, pool);

            if (!err.IsNoError)
            {
                throw new SvnException(err);
            }
        }
コード例 #9
0
 public static void Diff(AprArray diffOptions,
                         SvnPath path1, SvnOptRevision revision1,
                         SvnUrl path2, SvnOptRevision revision2,
                         bool recurse, bool ignoreAncestry, bool noDiffDeleted,
                         AprFile outFile, AprFile errFile,
                         SvnClientContext ctx, AprPool pool)
 {
     InternalDiff(diffOptions, path1, revision1, path2, revision2,
                  recurse, ignoreAncestry, noDiffDeleted, outFile, errFile, ctx, pool);
 }
コード例 #10
0
        public static void Add(SvnPath path,
							   bool recurse, 
							   SvnClientContext ctx, AprPool pool)
        {
            Debug.WriteLine(String.Format("svn_client_add({0},{1},{2},{3})",path,recurse,ctx,pool));
            SvnError err = Svn.svn_client_add(path,
                                              (recurse ? 1 :0), ctx, pool);
            if( !err.IsNoError )
                throw new SvnException(err);
        }
コード例 #11
0
        public static void CleanUp(SvnPath dir,
                                   SvnClientContext ctx, AprPool pool)
        {
            Debug.WriteLine(String.Format("svn_client_cleanup({0},{1},{2})", dir, ctx, pool));
            SvnError err = Svn.svn_client_cleanup(dir, ctx, pool);

            if (!err.IsNoError)
            {
                throw new SvnException(err);
            }
        }
コード例 #12
0
        public static void Resolved(SvnPath path, bool recurse,
                                    SvnClientContext ctx, AprPool pool)
        {
            Debug.WriteLine(String.Format("svn_client_resolved({0},{1},{2},{3})", path, recurse, ctx, pool));
            SvnError err = Svn.svn_client_resolved(path, (recurse ? 1 : 0), ctx, pool);

            if (!err.IsNoError)
            {
                throw new SvnException(err);
            }
        }
コード例 #13
0
        public static void Relocate(SvnPath dir, SvnUrl from, SvnUrl to,
                                    bool recurse,
                                    SvnClientContext ctx, AprPool pool)
        {
            Debug.WriteLine(String.Format("svn_client_relocate({0},{1},{2},{3},{4},{5})", dir, from, to, recurse, ctx, pool));
            SvnError err = Svn.svn_client_relocate(dir, from, to, (recurse ? 1 : 0), ctx, pool);

            if (!err.IsNoError)
            {
                throw new SvnException(err);
            }
        }
コード例 #14
0
 public void Diff(ICollection diffOptions,
                  SvnUrl path1, SvnRevision revision1,
                  SvnPath path2, SvnRevision revision2,
                  bool recurse, bool ignoreAncestry, bool noDiffDeleted,
                  AprFile outFile, AprFile errFile)
 {
     Diff(AprArray.LazyMake(mPool, diffOptions, typeof(AprString)),
          path1, revision1.ToSvnOpt(mPool),
          path2, revision2.ToSvnOpt(mPool),
          recurse, ignoreAncestry, noDiffDeleted,
          outFile, errFile, mContext, mPool);
 }
コード例 #15
0
        public static AprHash GetConfig(SvnPath configDir, AprPool pool)
        {
            IntPtr h;

            Debug.WriteLine(String.Format("svn_config_get_config({0},{1})", configDir, pool));
            SvnError err = Svn.svn_config_get_config(out h, configDir, pool);

            if (!err.IsNoError)
            {
                throw new SvnException(err);
            }
            return(h);
        }
コード例 #16
0
ファイル: SvnCleanTree.cs プロジェクト: vardars/ci-factory
        public void Clean(IntPtr baton, SvnPath path, SvnWcStatus2 status)
        {
            if (status == null) throw new ArgumentNullException("status");

            if (status.TextStatus == SvnWcStatus.Kind.Unversioned || status.TextStatus == SvnWcStatus.Kind.Ignored)
            {
                string FullPath = Path.Combine(this.Directory, path.Value);
                if (File.Exists(FullPath))
                    File.Delete(FullPath);
                else if (System.IO.Directory.Exists(FullPath))
                    That.Computer.FileSystem.DeleteDirectory(FullPath, Microsoft.VisualBasic.FileIO.DeleteDirectoryOption.DeleteAllContents);
                else
                    throw new BuildException(string.Format("Something fishy, {0}, does not seem to exist yet an svn status syas it does.", FullPath), this.Location);
            }
        }
コード例 #17
0
        public static SvnClientCommitInfo Import(SvnPath path, SvnUrl url, bool nonrecursive,
                                                 SvnClientContext ctx, AprPool pool)
        {
            IntPtr commitInfo;

            Debug.Write(String.Format("svn_client_import({0},{1},{2},{3},{4})...", path, url, nonrecursive, ctx, pool));
            SvnError err = Svn.svn_client_import(out commitInfo, path, url, (nonrecursive ? 1 : 0),
                                                 ctx, pool);

            if (!err.IsNoError)
            {
                throw new SvnException(err);
            }
            Debug.WriteLine(String.Format("Done({0})", commitInfo));
            return(commitInfo);
        }
コード例 #18
0
        protected static int InternalExport(IAprUnmanaged from, SvnPath to,
                                            SvnOptRevision revision,
                                            bool force, SvnClientContext ctx, AprPool pool)
        {
            int rev;

            Debug.Write(String.Format("svn_client_export({0},{1},{2},{3},{4},{5})...", from, to, revision, force, ctx, pool));
            SvnError err = Svn.svn_client_export(out rev, from.ToIntPtr(), to,
                                                 revision,
                                                 (force ? 1 :0), ctx, pool);

            if (!err.IsNoError)
            {
                throw new SvnException(err);
            }
            Debug.WriteLine(String.Format("Done({0})", rev));
            return(rev);
        }
コード例 #19
0
        public static int Switch(SvnPath path, SvnUrl url,
                                 SvnOptRevision revision,
                                 bool recurse, SvnClientContext ctx, AprPool pool)
        {
            int rev;

            Debug.Write(String.Format("svn_client_switch({0},{1},{2},{3},{4},{5})...", path, url, revision, recurse, ctx, pool));
            SvnError err = Svn.svn_client_switch(out rev, path, url,
                                                 revision,
                                                 (recurse ? 1 :0), ctx, pool);

            if (!err.IsNoError)
            {
                throw new SvnException(err);
            }
            Debug.WriteLine(String.Format("Done({0})", rev));
            return(rev);
        }
コード例 #20
0
        protected static void InternalMerge(IAprUnmanaged source1, SvnOptRevision revision1,
                                            IAprUnmanaged source2, SvnOptRevision revision2,
                                            SvnPath targetWCPath, bool recurse,
                                            bool ignoreAncestry, bool force, bool dryRun,
                                            SvnClientContext ctx, AprPool pool)
        {
            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));
            SvnError err = Svn.svn_client_merge(source1.ToIntPtr(), revision1,
                                                source2.ToIntPtr(), revision2,
                                                targetWCPath, (recurse ? 1 : 0),
                                                (ignoreAncestry ? 1 : 0), (force ? 1 : 0),
                                                (dryRun ? 1 : 0),
                                                ctx, pool);

            if (!err.IsNoError)
            {
                throw new SvnException(err);
            }
        }
コード例 #21
0
ファイル: CmdBase.cs プロジェクト: softec/SubversionSharp
        public SvnError GetCommitLogCallback(out AprString logMessage, out SvnPath tmpFile,
							 		   	  	 AprArray commitItems, IntPtr baton,
									      	 AprPool pool)
        {
            if (!commitItems.IsNull)
            {
                foreach (SvnClientCommitItem item in commitItems)
                {
                    Console.WriteLine("C1: {1} ({2}) r{3}",
                        item.Path, item.Kind, item.Revision);
                    Console.WriteLine("C2: {1} -> {2}",
                        item.Url,
                        item.CopyFromUrl);
                }
                Console.WriteLine();
            }

            Console.Write("Enter log message: ");
            logMessage = new AprString(Console.ReadLine(), pool);
            tmpFile = new SvnPath(pool);

            return(SvnError.NoError);
        }
コード例 #22
0
 public static void Copy(SvnPath srcPath, SvnOptRevision srcRevision,
                         SvnPath dstPath,
                         SvnClientContext ctx, AprPool pool)
 {
     InternalCopy(srcPath, srcRevision, dstPath, ctx, pool);
 }
コード例 #23
0
 public void Cat(SvnStream stream, SvnPath pathOrUrl, SvnRevision revision)
 {
     Cat(stream, pathOrUrl, revision.ToSvnOpt(mPool), mContext, mPool);
 }
コード例 #24
0
        public static int Checkout(SvnUrl url, SvnPath path, 
								   SvnOptRevision revision, 
								   bool recurse, SvnClientContext ctx, AprPool pool)
        {
            int rev;
            Debug.Write(String.Format("svn_client_checkout({0},{1},{2},{3},{4},{5})...",url,path,revision,recurse,ctx,pool));
            SvnError err = Svn.svn_client_checkout(out rev, url, path,
                                                   revision,
                                                   (recurse ? 1 :0), ctx, pool);
            if( !err.IsNoError )
                throw new SvnException(err);
            Debug.WriteLine(String.Format("Done({0})",rev));
            return(rev);
        }
コード例 #25
0
ファイル: SvnConfig.cs プロジェクト: softec/SubversionSharp
 public static void Ensure(SvnPath configDir, AprPool pool)
 {
     Debug.WriteLine(String.Format("svn_config_ensure({0},{1})",configDir,pool));
     SvnError err = Svn.svn_config_ensure(configDir, pool);
     if(!err.IsNoError)
         throw new SvnException(err);
 }
コード例 #26
0
        public static void Move(SvnPath srcPath, SvnOptRevision srcRevision,
								SvnPath dstPath, bool force,
								SvnClientContext ctx, AprPool pool)
        {
            InternalMove(srcPath, srcRevision, dstPath, force, ctx, pool);
        }
コード例 #27
0
 public static int Export(SvnUrl from, SvnPath to,
                          SvnOptRevision revision,
                          bool force, SvnClientContext ctx, AprPool pool)
 {
     return(InternalExport(from, to, revision, force, ctx, pool));
 }
コード例 #28
0
        public static AprHash List(SvnPath pathOrUrl,
								   SvnOptRevision revision, bool recurse, 
								   SvnClientContext ctx, AprPool pool)
        {
            return InternalList(pathOrUrl, revision, recurse, ctx, pool);
        }
コード例 #29
0
        public static void Merge(SvnUrl source1, SvnOptRevision revision1,
								 SvnUrl source2, SvnOptRevision revision2,
								 SvnPath targetWCPath, bool recurse,
								 bool ignoreAncestry, bool force, bool dryRun,
							     SvnClientContext ctx, AprPool pool)
        {
            InternalMerge(source1, revision1, source2, revision2, targetWCPath, recurse,
                          ignoreAncestry, force, dryRun, ctx, pool);
        }
コード例 #30
0
        public static SvnClientCommitInfo Import(SvnPath path, SvnUrl url, bool nonrecursive,  
							   					 SvnClientContext ctx, AprPool pool)
        {
            IntPtr commitInfo;
            Debug.Write(String.Format("svn_client_import({0},{1},{2},{3},{4})...",path,url,nonrecursive,ctx,pool));
            SvnError err = Svn.svn_client_import(out commitInfo, path, url, (nonrecursive ? 1 : 0),
                                                 ctx, pool);
            if( !err.IsNoError )
                throw new SvnException(err);
            Debug.WriteLine(String.Format("Done({0})",commitInfo));
            return(commitInfo);
        }
コード例 #31
0
        public static int Export(SvnUrl from, SvnPath to, 
								 SvnOptRevision revision, 
								 bool force, SvnClientContext ctx, AprPool pool)
        {
            return InternalExport(from, to, revision, force, ctx, pool);
        }
コード例 #32
0
        public static void Export(SvnPath from, SvnPath to, 
								  SvnOptRevision revision, 
								  bool force, SvnClientContext ctx, AprPool pool)
        {
            InternalExport(from, to, revision, force, ctx, pool);
        }
コード例 #33
0
 public static void PropSet(string propName, SvnString propVal, SvnPath target,
                            bool recurse, AprPool pool)
 {
     InternalPropSet(propName, propVal, target, recurse, pool);
 }
コード例 #34
0
        public static AprHash PropGet(string propName, SvnPath target,
									  SvnOptRevision revision, bool recurse, 
								  	  SvnClientContext ctx, AprPool pool)
        {
            return InternalPropGet(propName, target, revision, recurse, ctx, pool);
        }
コード例 #35
0
 public static AprHash PropList(SvnPath target,
                                SvnOptRevision revision, bool recurse,
                                SvnClientContext ctx, AprPool pool)
 {
     return(InternalPropList(target, revision, recurse, ctx, pool));
 }
コード例 #36
0
 public static AprHash List(SvnPath pathOrUrl,
                            SvnOptRevision revision, bool recurse,
                            SvnClientContext ctx, AprPool pool)
 {
     return(InternalList(pathOrUrl, revision, recurse, ctx, pool));
 }
コード例 #37
0
        public static void Diff(AprArray diffOptions,
								SvnPath path1, SvnOptRevision revision1,
								SvnUrl path2, SvnOptRevision revision2,
								bool recurse, bool ignoreAncestry, bool noDiffDeleted,
								AprFile outFile, AprFile errFile,  
							    SvnClientContext ctx, AprPool pool)
        {
            InternalDiff(diffOptions, path1, revision1, path2, revision2,
                         recurse, ignoreAncestry, noDiffDeleted, outFile, errFile, ctx, pool);
        }
コード例 #38
0
 public static SvnUrl UrlFromPath(SvnPath pathOrUrl, AprPool pool)
 {
     return(InternalUrlFromPath(pathOrUrl, pool));
 }
コード例 #39
0
ファイル: SvnFunctions.cs プロジェクト: vardars/ci-factory
 public void Record(IntPtr baton, SvnPath path, SvnWcStatus2 status)
 {
     if (path.Value.ToLower() == this.QueryPath.ToLower())
     {
         this.IsVersionedReturnValue = true;
         if (status.TextStatus == SvnWcStatus.Kind.Unversioned || status.TextStatus == SvnWcStatus.Kind.Ignored)
         {
             this.IsVersionedReturnValue = false;
         }
     }
 }
コード例 #40
0
ファイル: SvnClient.cs プロジェクト: softec/SubversionSharp
 public SvnUrl UrlFromPath(SvnPath pathOrUrl)
 {
     return UrlFromPath(pathOrUrl, mPool);
 }
コード例 #41
0
ファイル: SvnConfig.cs プロジェクト: softec/SubversionSharp
 public static AprHash GetConfig(SvnPath configDir, AprPool pool)
 {
     IntPtr h;
     Debug.WriteLine(String.Format("svn_config_get_config({0},{1})",configDir,pool));
     SvnError err = Svn.svn_config_get_config(out h, configDir, pool);
     if(!err.IsNoError)
         throw new SvnException(err);
     return h;
 }
コード例 #42
0
        public static int Status(SvnPath path,
								 SvnOptRevision revision,
								 SvnWcStatus.Func statusFunc, IntPtr statusBaton,
								 bool descend, bool getAll, bool update, bool noIgnore,
			   					 SvnClientContext ctx, AprPool pool)
        {
            int rev;
            SvnDelegate statusDelegate = new SvnDelegate(statusFunc);
            Debug.Write(String.Format("svn_client_status({0},{1},{2},{3},{4:X},{5},{6},{7},{8},{9})...",path,revision,statusFunc.Method.Name,statusBaton.ToInt32(),descend,getAll,update,noIgnore,ctx,pool));
            SvnError err = Svn.svn_client_status(out rev, path, revision,
                                                 (Svn.svn_wc_status_func_t) statusDelegate.Wrapper,
                                                 statusBaton,
                                                 (descend ? 1 : 0), (getAll ? 1 : 0),
                                                 (update ? 1 : 0), (noIgnore ? 1 : 0),
                                                 ctx, pool);
            if( !err.IsNoError )
                throw new SvnException(err);
            Debug.WriteLine(String.Format("Done({0})",rev));
            if( update )
                return(rev);
            else
                return(-1);
        }
コード例 #43
0
ファイル: CmdBase.cs プロジェクト: softec/SubversionSharp
        public void NotifyCallback(IntPtr baton, SvnPath Path,  
	        	 	 	           SvnWcNotify.Action action, Svn.NodeKind kind,
	        			 		   AprString mimeType, SvnWcNotify.State contentState,
	        			 		   SvnWcNotify.State propState, int revNum)
        {
            switch(action)
            {
                case SvnWcNotify.Action.Add:
                    if (!mimeType.IsNull && !mimeType.ToString().StartsWith("text/"))
                        Console.WriteLine("A  (bin)  {0}", Path);
                    else
                        Console.WriteLine("A         {0}", Path);
                    mChanged = true;
                    break;

                case SvnWcNotify.Action.BlameRevision:
                    break;

                case SvnWcNotify.Action.CommitAdded:
                    if (!mimeType.IsNull && !mimeType.ToString().StartsWith("text/"))
                        Console.WriteLine("Adding  (bin)  {0}", Path);
                    else
                        Console.WriteLine("Adding         {0}", Path);
                    break;

                case SvnWcNotify.Action.CommitDeleted:
                        Console.WriteLine("Deleting       {0}", Path);
                    break;

                case SvnWcNotify.Action.CommitModified:
                    Console.WriteLine("Sending        {0}", Path);
                    break;

                case SvnWcNotify.Action.CommitReplaced:
                        Console.WriteLine("Replacing      {0}", Path);
                    break;

                case SvnWcNotify.Action.Copy:
                    break;

                case SvnWcNotify.Action.Delete:
                    Console.WriteLine("D         {0}", Path);
                    mChanged = true;
                    break;

                case SvnWcNotify.Action.FailedRevert:
                    Console.WriteLine("Failed to revert '{0}' -- try updating instead.", Path);
                    break;

                case SvnWcNotify.Action.PostfixTxdelta:
                    if( !mTxDelta )
                    {
                        Console.Write("Transmitting file data ");
                        mTxDelta = true;
                    }
                    Console.Write(".");
                    break;

                case SvnWcNotify.Action.Resolved:
                    Console.WriteLine("Resolved conflicted state of '{0}'", Path);
                    break;

                case SvnWcNotify.Action.Restore:
                    Console.WriteLine("Restored '{0}'", Path);
                    break;

                case SvnWcNotify.Action.Revert:
                    Console.WriteLine("Reverted '{0}'", Path);
                    break;

                case SvnWcNotify.Action.Skip:
                    if (contentState == SvnWcNotify.State.Missing)
                        Console.WriteLine("Skipped missing target: '{0}'", Path);
              				else
                        Console.WriteLine("Skipped '{0}'", Path);
                    break;

                case SvnWcNotify.Action.StatusCompleted:
                    if( revNum >= 0 )
                        Console.WriteLine("Status against revision: {0}", revNum);
                    break;

                case SvnWcNotify.Action.StatusExternal:
                    Console.WriteLine("\nPerforming status on external item at '{0}'", Path);
                    break;

                case SvnWcNotify.Action.UpdateAdd:
                    Console.WriteLine("A {0}", Path);
                    mChanged = true;
                    break;

                case SvnWcNotify.Action.UpdateCompleted:
                    if( revNum >= 0 )
              		{
                        if( mSubCmd.LongName == "export" )
                            Console.WriteLine("Exported {0}revision {1}.",
                                                (mInExternal) ? "external at " : "",
                                                revNum);
                        else if( mSubCmd.LongName == "checkout" )
                            Console.WriteLine("Checked out {0}revision {1}.",
                                                (mInExternal) ? "external at " : "",
                                                revNum);
                        else
                        {
                            if( mChanged )
                      			Console.WriteLine("Updated {0}to revision {1}.",
                                                    (mInExternal) ? "external at " : "",
                                                    revNum);
                            else
                      			Console.WriteLine("{0}t revision {1}.",
                                                    (mInExternal) ? "External a" : "A",
                                                    revNum);
                        }
                    }
                    else  /* no revision */
                    {
                        if( mSubCmd.LongName == "export" )
                  			Console.WriteLine("{0}xport complete.",
                                                (mInExternal) ? "External e" : "E");
                        else if( mSubCmd.LongName == "checkout" )
                  			Console.WriteLine("{0}heckout complete.\n",
                                                (mInExternal) ? "External c" : "C");
                        else
                  			Console.WriteLine("{0}pdate complete.\n",
                                                (mInExternal) ? "External u" : "U");
                    }
                    if( mInExternal )
                        Console.WriteLine();
                    mInExternal = false;
                    mChanged = false;
                    break;

                case SvnWcNotify.Action.UpdateDelete:
                    Console.WriteLine("D {0}", Path);
                    mChanged = true;
                    break;

                case SvnWcNotify.Action.UpdateExternal:
                    Console.WriteLine("\nFetching external item into '{0}'", Path);
                    mInExternal = true;
                    break;

                case SvnWcNotify.Action.UpdateUpdate:
                    string s1 = " ";
                    string s2 = " ";
                    if (! ((kind == Svn.NodeKind.Dir)
               				&& ((propState == SvnWcNotify.State.Inapplicable)
                   			 || (propState == SvnWcNotify.State.Unknown)
                             || (propState == SvnWcNotify.State.Unchanged))))
                    {
                        mChanged = true;
                        if (kind == Svn.NodeKind.File)
                        {
                            if (contentState == SvnWcNotify.State.Conflicted)
                                s1 = "C";
                            else if (contentState == SvnWcNotify.State.Merged)
                                s1 = "G";
                            else if (contentState == SvnWcNotify.State.Changed)
                                s1 = "U";
              			}

                        if (propState == SvnWcNotify.State.Conflicted)
                            s2 = "C";
                        else if (propState == SvnWcNotify.State.Merged)
                            s2 = "G";
                        else if (propState == SvnWcNotify.State.Changed)
                            s2 = "U";

                        if (! ((contentState == SvnWcNotify.State.Unchanged
                                || contentState == SvnWcNotify.State.Unknown)
                            && (propState == SvnWcNotify.State.Unchanged
                                || propState == SvnWcNotify.State.Unknown)))
                            Console.WriteLine("{0}{1} {2}", s1, s2, Path);
                    }
              			break;
            }
        }
コード例 #44
0
 public static SvnUrl UrlFromPath(SvnPath pathOrUrl, AprPool pool)
 {
     return InternalUrlFromPath(pathOrUrl, pool);
 }
コード例 #45
0
 public SvnUrl UrlFromPath(SvnPath pathOrUrl)
 {
     return(UrlFromPath(pathOrUrl, mPool));
 }
コード例 #46
0
        protected static int InternalExport(IAprUnmanaged from, SvnPath to, 
										  SvnOptRevision revision, 
										  bool force, SvnClientContext ctx, AprPool pool)
        {
            int rev;
            Debug.Write(String.Format("svn_client_export({0},{1},{2},{3},{4},{5})...",from,to,revision,force,ctx,pool));
            SvnError err = Svn.svn_client_export(out rev, from.ToIntPtr(), to,
                                                 revision,
                                                 (force ? 1 :0), ctx, pool);
            if( !err.IsNoError )
                throw new SvnException(err);
            Debug.WriteLine(String.Format("Done({0})",rev));
            return(rev);
        }
コード例 #47
0
 public AprHash List(SvnPath pathOrUrl, SvnRevision revision, bool recurse)
 {
     return(List(pathOrUrl, revision.ToSvnOpt(mPool), recurse, mContext, mPool));
 }
コード例 #48
0
        public static void CleanUp(SvnPath dir,
							       SvnClientContext ctx, AprPool pool)
        {
            Debug.WriteLine(String.Format("svn_client_cleanup({0},{1},{2})",dir,ctx,pool));
            SvnError err = Svn.svn_client_cleanup(dir, ctx, pool);
            if( !err.IsNoError )
                throw new SvnException(err);
        }
コード例 #49
0
 public static void Move(SvnPath srcPath, SvnOptRevision srcRevision,
                         SvnPath dstPath, bool force,
                         SvnClientContext ctx, AprPool pool)
 {
     InternalMove(srcPath, srcRevision, dstPath, force, ctx, pool);
 }
コード例 #50
0
        protected static void InternalMerge(IAprUnmanaged source1, SvnOptRevision revision1,
										  IAprUnmanaged source2, SvnOptRevision revision2,
										  SvnPath targetWCPath, bool recurse,
										  bool ignoreAncestry, bool force, bool dryRun,
										  SvnClientContext ctx, AprPool pool)
        {
            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));
            SvnError err = Svn.svn_client_merge(source1.ToIntPtr(), revision1,
                                                source2.ToIntPtr(), revision2,
                                                targetWCPath, (recurse ? 1 : 0),
                                                (ignoreAncestry ? 1 : 0), (force ? 1 : 0),
                                                (dryRun ? 1 : 0),
                                                ctx, pool);
            if( !err.IsNoError )
                throw new SvnException(err);
        }
コード例 #51
0
 public static AprHash PropGet(string propName, SvnPath target,
                               SvnOptRevision revision, bool recurse,
                               SvnClientContext ctx, AprPool pool)
 {
     return(InternalPropGet(propName, target, revision, recurse, ctx, pool));
 }
コード例 #52
0
ファイル: Status.cs プロジェクト: softec/SubversionSharp
        private void StatusCallback(IntPtr baton, SvnPath path, SvnWcStatus status)
        {
            if (status.IsNull
                || (oQuiet && status.Entry.IsNull)
              			|| ((status.TextStatus == SvnWcStatus.Kind.None)
              		    && (status.ReposTextStatus == SvnWcStatus.Kind.None)))
              	{
                return;
            }

            string wrkRevNum = "";
            string ciRevNum = "";
            string ciAuthor = "";
            char oodStatus = '@';

            if (oShowUpdates || oVerbose)
            {
                if( status.Entry.IsNull )
                    wrkRevNum = "";
                else if( status.Entry.Revision < 0 )
                    wrkRevNum = " ? ";
                else if( status.Copied )
                    wrkRevNum = "-";
                else
                    wrkRevNum = status.Entry.Revision.ToString();

                if( status.ReposTextStatus != SvnWcStatus.Kind.None
                    || status.ReposPropStatus != SvnWcStatus.Kind.None )
                    oodStatus = '*';
                else
                    oodStatus = ' ';

                if( oVerbose )
                {
                    if( status.Entry.IsNull )
                        ciRevNum = "";
                    else if( status.Entry.CommitRev < 0 )
                        ciRevNum = " ? ";
                    else
                        ciRevNum = status.Entry.CommitRev.ToString();

                    if( status.Entry.IsNull )
                        ciAuthor = "";
                    else if( status.Entry.CommitAuthor.IsNull )
                        ciAuthor = " ? ";
                    else
                        ciAuthor = status.Entry.CommitAuthor.ToString();
                }
            }

            if(oVerbose)
            {
                Console.WriteLine("{0}{1}{2}{3}{4}  {5}   {6,6}   {7,6:X} {8,-12} {9}",
                                  WcStatusChar(status.TextStatus),
                                  WcStatusChar(status.PropStatus),
                                  status.Locked ? 'L' : ' ',
                                  status.Copied ? '+' : ' ',
                                  status.Switched ? 'S' : ' ',
                                  oodStatus,
                                  wrkRevNum,
                                  ciRevNum,
                                  ciAuthor,
                                  path);
            }
            else if (oShowUpdates)
            {
                Console.WriteLine("{0}{1}{2}{3}{4}  {5}   {6,6}   {7}",
                                  WcStatusChar(status.TextStatus),
                                  WcStatusChar(status.PropStatus),
                                  status.Locked ? 'L' : ' ',
                                  status.Copied ? '+' : ' ',
                                  status.Switched ? 'S' : ' ',
                                  oodStatus,
                                  wrkRevNum,
                                  path);
            }
            else
            {
                Console.WriteLine("{0}{1}{2}{3}{4}  {5}",
                                  WcStatusChar(status.TextStatus),
                                  WcStatusChar(status.PropStatus),
                                  status.Locked ? 'L' : ' ',
                                  status.Copied ? '+' : ' ',
                                  status.Switched ? 'S' : ' ',
                                  path);
            }
        }
コード例 #53
0
 public static void Export(SvnPath from, SvnPath to,
                           SvnOptRevision revision,
                           bool force, SvnClientContext ctx, AprPool pool)
 {
     InternalExport(from, to, revision, force, ctx, pool);
 }
コード例 #54
0
        public static void Cat(SvnStream stream, SvnPath pathOrUrl,
							   SvnOptRevision revision, 
							   SvnClientContext ctx, AprPool pool)
        {
            InternalCat(stream, pathOrUrl, revision, ctx, pool);
        }
コード例 #55
0
        public static AprHash PropList(SvnPath target,
									   SvnOptRevision revision, bool recurse, 
								  	   SvnClientContext ctx, AprPool pool)
        {
            return InternalPropList(target, revision, recurse, ctx, pool);
        }
コード例 #56
0
        public static void Copy(SvnPath srcPath, SvnOptRevision srcRevision,
								SvnPath dstPath,
								SvnClientContext ctx, AprPool pool)
        {
            InternalCopy(srcPath, srcRevision, dstPath, ctx, pool);
        }
コード例 #57
0
 public static void Cat(SvnStream stream, SvnPath pathOrUrl,
                        SvnOptRevision revision,
                        SvnClientContext ctx, AprPool pool)
 {
     InternalCat(stream, pathOrUrl, revision, ctx, pool);
 }
コード例 #58
0
        public static void PropSet(string propName, SvnString propVal, SvnPath target, 
								   bool recurse, AprPool pool)
        {
            InternalPropSet(propName, propVal, target, recurse, pool);
        }
コード例 #59
0
        public static void Relocate(SvnPath dir, SvnUrl from, SvnUrl to,
									bool recurse,
							        SvnClientContext ctx, AprPool pool)
        {
            Debug.WriteLine(String.Format("svn_client_relocate({0},{1},{2},{3},{4},{5})",dir,from,to,recurse,ctx,pool));
            SvnError err = Svn.svn_client_relocate(dir, from, to, (recurse ? 1 : 0), ctx, pool);
            if( !err.IsNoError )
                throw new SvnException(err);
        }
コード例 #60
0
ファイル: SvnClient.cs プロジェクト: softec/SubversionSharp
 public int Update(SvnPath path, SvnRevision revision, bool recurse)
 {
     return Update(path, revision.ToSvnOpt(mPool), recurse,
                   mContext, mPool);
 }