Esempio n. 1
0
		public override IEnumerable<VersionInfo> Status (Repository repo, FilePath path, SvnRevision rev, bool descendDirs, bool changedItemsOnly, bool remoteStatus)
		{
			if (path == FilePath.Null)
				throw new ArgumentNullException ();
		
			LibSvnClient.Rev revision = (LibSvnClient.Rev) rev;
			ArrayList ret = new ArrayList ();
			
			StatusCollector collector = new StatusCollector (ret);
			IntPtr localpool = IntPtr.Zero;
			try {
				localpool = TryStartOperation (null);
				string pathorurl = NormalizePath (path, localpool);
				CheckError (svn.client_status (IntPtr.Zero, pathorurl, ref revision,
				                               collector.Func,
				                               IntPtr.Zero, descendDirs, 
				                               !changedItemsOnly, 
				                               remoteStatus,
				                               false,
				                               false,
				                               ctx, localpool));
			} catch (SubversionException e) {
				// SVN_ERR_WC_NOT_WORKING_COPY and SVN_ERR_WC_NOT_FILE.
				if (e.ErrorCode != 155007 && e.ErrorCode != 155008)
					throw;
			} finally {
				TryEndOperation (localpool);
			}

			List<VersionInfo> nodes = new List<VersionInfo>();
			foreach (LibSvnClient.StatusEnt ent in ret)
				nodes.Add (CreateNode (ent, repo));
			return nodes;
		}
Esempio n. 2
0
		public override IEnumerable<VersionInfo> Status (Repository repo, FilePath path, SvnRevision rev, bool descendDirs, bool changedItemsOnly, bool remoteStatus)
		{
			if (path == FilePath.Null)
				throw new ArgumentNullException ();
		
			LibSvnClient.Rev revision = (LibSvnClient.Rev) rev;
			ArrayList ret = new ArrayList ();
			
			StatusCollector collector = new StatusCollector (ret);
			
			IntPtr localpool = newpool (pool);
			try {
				string pathorurl = NormalizePath (path, localpool);
				
				CheckError (svn.client_status (IntPtr.Zero, pathorurl, ref revision,
				                               new LibSvnClient.svn_wc_status_func_t (collector.Func),
				                               IntPtr.Zero, descendDirs ? 1 : 0, 
				                               changedItemsOnly ? 0 : 1, 
				                               remoteStatus ? 1 : 0, 1,
				                               ctx, localpool));
			} finally {
				apr.pool_destroy (localpool);
			}
			
			foreach (LibSvnClient.StatusEnt ent in ret)
				yield return CreateNode (ent, repo);
		}
Esempio n. 3
0
		public override IEnumerable<VersionInfo> Status (Repository repo, FilePath path, SvnRevision rev, bool descendDirs, bool changedItemsOnly, bool remoteStatus)
		{
			if (path == FilePath.Null)
				throw new ArgumentNullException ();
		
			LibSvnClient.Rev revision = (LibSvnClient.Rev) rev;
			ArrayList ret = new ArrayList ();
			
			StatusCollector collector = new StatusCollector (ret);
			var localpool = TryStartOperation (null);
			try {
				string pathorurl = NormalizePath (path, localpool);
				CheckError (svn.client_status (IntPtr.Zero, pathorurl, ref revision,
				                               collector.Func,
				                               IntPtr.Zero, descendDirs, 
				                               !changedItemsOnly, 
				                               remoteStatus,
				                               false,
				                               false,
				                               ctx, localpool));
			} finally {
				apr.pool_destroy (localpool);
				TryEndOperation ();
			}

			List<VersionInfo> nodes = new List<VersionInfo>();
			foreach (LibSvnClient.StatusEnt ent in ret)
				nodes.Add (CreateNode (ent, repo));
			return nodes;
		}
        public IList Status(string path, Rev revision, bool descendDirs, bool changedItemsOnly, bool remoteStatus)
        {
            if (path == null) throw new ArgumentException();

            ArrayList ret = new ArrayList();
            int result_rev = 0;

            StatusCollector collector = new StatusCollector(ret);
            CheckError(svn_client_status (ref result_rev, path, ref revision,
                new svn_wc_status_func_t(collector.Func),
                IntPtr.Zero,
                descendDirs ? 1 : 0, changedItemsOnly ? 0 : 1, remoteStatus ? 1 : 0, 1,
                ctx, pool));

            return ret;
        }