Skip to content

Commit

Permalink
Ignore Files and Directories in Subversion (SVN)
Browse files Browse the repository at this point in the history
  • Loading branch information
markkolich committed Apr 8, 2010
1 parent 6571e6e commit 2b19db1
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
@@ -0,0 +1,28 @@
Subversion is ~~fun~~ lame. Especially when it tries to commit intermediate build files and other junk you want to keep out of your SVN repository. In my environment, Ant is configured to place intermediate build files into my build/ directory. The final product is then packaged up and placed into my `dist/` directory. So, I need SVN to ignore everything inside of my build/ directory since the contents of this folder are going to change on every build.

Meet `svn propedit svn:ignore`:

```
#/> svn propedit svn:ignore build
#/> svn -m "ignoring build" commit build
```

When you run `svn propedit`, your local text editor will open (usually `vi`) which will allow you to specify a series of file names to ignore under `build/`. If you want to ignore all files and folders, just enter a single * wildcard character, save, and commit:

```
*
```

Or, maybe you want to ignore just `.class` files:

```
*.class
```

Of course, if you want to use another editor like `emacs` to set your ignore properties, you can do so by exporting `SVN_EDITOR` before running `svn propedit`:

```
#/> export SVN_EDITOR=emacs
```

Cheers.
4 changes: 2 additions & 2 deletions content/entries/understanding-javas-countdownlatch.md
Expand Up @@ -7,7 +7,7 @@ Meet `CountDownLatch`.
As described in the Java 6 API docs, a `CountDownLatch` is "a synchronization aid that allows one or more threads to wait until a set of operations being performed in other threads completes." In other words, the developer says new `CountDownLatch(N)` which waits for `N` threads to finish before the latch is "released" allowing the calling thread to make forward progress. Couldn't be more perfect here. To make my life a little easier, I wrote a few wrapper classes that encapsulate a `CountDownLatch` which allow me to easily synchronize on a `List<BaseWorker>`, a list of worker threads:

* [ThreadRunner.java](static/entries/understanding-javas-countdownlatch/ThreadRunner.java) &mdash; A class that accepts a `List<BaseWorker>` (a List of `BaseWorker`'s), creates a `new CountDownLatch(list.size())`, starts each `BasedWorker` then allows the developer to `await()` on the runner for all `BaseWorker`'s to finish.
* [BaseWorker.java]((static/entries/understanding-javas-countdownlatch/BaseWorker.java) &mdash; An abstract class that represents each worker thread, and defines a set of methods each `BaseWorker` must implement to be used with a `ThreadRunner`.
* [BaseWorker.java](static/entries/understanding-javas-countdownlatch/BaseWorker.java) &mdash; An abstract class that represents each worker thread, and defines a set of methods each `BaseWorker` must implement to be used with a `ThreadRunner`.

So, using these wrappers, let's create a new worker:

Expand Down Expand Up @@ -71,7 +71,7 @@ If you're interested, you can [download my complete ThreadRunner demo/example](s

### CyclicBarrier

A `CyclicBarrier` is similar to that of a `CountDownLatch`, except that a `CyclicBarrier` is "a synchronization aid that allows a set of threads to all wait for each other to reach a common barrier point." Like a `CountDownLatch`, a `CyclicBarrier` can be used to synchronize a number of threads. But instead of exiting upon completion, theads using a `CyclicBarrier` `await()` for all other threads in the pool to finish. Here's a usage example of a `CyclicBarrier` built around my `BaseWorker` class:
A `CyclicBarrier` is similar to a `CountDownLatch`, except that a `CyclicBarrier` is "a synchronization aid that allows a set of threads to all wait for each other to reach a common barrier point." Like a `CountDownLatch`, a `CyclicBarrier` can be used to synchronize a number of threads. But instead of exiting upon completion, theads using a `CyclicBarrier` `await()` for all other threads in the pool to finish. Here's a usage example of a `CyclicBarrier` built around my `BaseWorker` class:

```java
public final class MyCyclicWorker extends BaseWorker {
Expand Down

0 comments on commit 2b19db1

Please sign in to comment.