Example #1
0
		public override void Unlock (IProgressMonitor monitor, bool breakLock, params FilePath[] paths)
		{
			nb = new notify_baton ();
			var localpool = TryStartOperation (monitor);
			try {
				IntPtr array = apr.array_make (localpool, 0, IntPtr.Size);
				foreach (string path in paths) {
					string npath = NormalizePath (path, localpool);
					IntPtr item = apr.array_push (array);
					Marshal.WriteIntPtr (item, apr.pstrdup (localpool, npath));
				}
				lockFileList = new ArrayList ();
				requiredLockState = LibSvnClient.NotifyLockState.Unlocked;
			
				CheckError (svn.client_unlock (array, breakLock, ctx, localpool));
				if (paths.Length != lockFileList.Count)
					throw new SubversionException ("Lock operation failed.");
			} finally {
				apr.pool_destroy (localpool);
				lockFileList = null;
				TryEndOperation ();
			}
		}
Example #2
0
		public override void Unlock (ProgressMonitor monitor, bool breakLock, params FilePath[] paths)
		{
			nb = new notify_baton ();
			IntPtr localpool = IntPtr.Zero;
			try {
				localpool = TryStartOperation (monitor);
				IntPtr array = NormalizePaths (localpool, paths);
				lockFileList = new ArrayList ();
				requiredLockState = LibSvnClient.NotifyLockState.Unlocked;
			
				CheckError (svn.client_unlock (array, breakLock, ctx, localpool));
				if (paths.Length != lockFileList.Count)
					throw new SubversionException ("Unlock operation failed.");
			} finally {
				lockFileList = null;
				TryEndOperation (localpool);
			}
		}
Example #3
0
		public override void Unlock (IProgressMonitor monitor, bool breakLock, params FilePath[] paths)
		{
			lock (sync) {
				if (inProgress)
					throw new SubversionException ("Another Subversion operation is already in progress.");
				inProgress = true;
			}
			
			IntPtr localpool = newpool (pool);
			IntPtr array = apr.array_make (localpool, 0, IntPtr.Size);
			updatemonitor = monitor;
			nb = new notify_baton ();
			
			try {
				foreach (string path in paths) {
					string npath = NormalizePath (path, localpool);
					IntPtr item = apr.array_push (array);
					Marshal.WriteIntPtr (item, apr.pstrdup (localpool, npath));
				}
				lockFileList = new ArrayList ();
				requiredLockState = LibSvnClient.NotifyLockState.Unlocked;
			
				CheckError (svn.client_unlock (array, breakLock ? 1 : 0, ctx, localpool));
				if (paths.Length != lockFileList.Count)
					throw new SubversionException ("Lock operation failed.");
			} finally {
				apr.pool_destroy (localpool);
				lockFileList = null;
				updatemonitor = null;
				inProgress = false;
			}
		}