Sled
Sled

Reputation: 18939

How to do a "hijack", like in ClearCase, in Subversion?

In ClearCase you you can "hijack" a file which means that the change management system will let you make changes to it, but it won't try to commit those changes or try to update that file when you pull the lastest changes. This is useful for configuration files or hacking classes that are only needed for production (like a slow filter that encrypts messages etc).

Is there anyway to do this in Subversion?

Upvotes: 3

Views: 769

Answers (2)

Sled
Sled

Reputation: 18939

This is a new answer to better summarise to what VonC helped lead me. The answer is to take the file and add it changelist called "ignore-on-commit"(see: Excluding Items from the Commit List). So the svn command itself would be svn changelist ignore-on-commit $target_file.

Upvotes: 2

VonC
VonC

Reputation: 1323943

There is no real equivalent in Subversion in that the files are directly writable in your working directory in Subversion.

You can ignore a file in subversion on commit (with TortoiseSVN), which allows you to ignore current modifications done locally while keeping the file under version control.
And that is fairly similar to "hijacked" files in ClearCase.


The OP ArtB asked about a command-line solution, and I suggested using changelist (as in svn changelist), which he summarized in his answer (upvoted)

You will see this approach taken in:

Upvotes: 2

Related Questions