0

We intend to maintain our SVN database as a single trunk, with no branches on a day-to-day basis.

We will, however, tag stable 'releases' from time to time. These tags are really intended to be tags, meaning no one checks anything in to tags.

Now, when there is a bug, a user checks out a given "Golden" tag (a working database) makes edits to their files and these changes need to go back into trunk.

I have tried in vain to figure out a way to do this.

svn switch won't work since it updates the local working copy (which I do not want). svn merge isn't working either since it appears to check in changes to the tag before merging them to the trunk, as well I'd need to have 2 versions checked out: trunk and tag.

The only way I see this working is to actually have 2 checked out databases and physically copy over files from tag to trunk. This is clumsy, error-prone and cumbersome.

Technically I do not need a merge at all. In fact, I would prefer to check-in my modified files directly rather than merge, since the file-owners are individuals, not a group (in other words, I know what I am doing: For me compile can break with a merge - not C or software code!). What I need is an easy way to switch my SVN url from tag to trunk non-destructively - i.e - without updates to any file.

Failing that, I would prefer a way to check in a file from a tag-checked-out-database directly into trunk.

Any ideas anyone?

MicRavi
  • 1
  • 2
  • 1
    Can you explain more why switch doesn't work for your needs? This sort of use-case is the exact reason why your uncommitted edits get merged into your working copy when you switch. – Ben Sep 07 '13 at 01:40
  • And can you explain why you don't want to use branches, because with branches, everything is easy: create a branch from tag, make your changes, test, commit them, then merge the changes from the branch to the (checked out) trunk. – mliebelt Sep 07 '13 at 09:32

1 Answers1

0

Please, with all due respect: I understand what SVN does with merges and I do not want to handle that. We've tried merge but it hasn't worked out (has worked, but not worked out) for us. As I mentioned, we're not dealing with standard software code, which is part of the problem. In any case, I will hazard a guess that switching tag to trunk without an automatic update is not a feature afforded by SVN (which was my original question)

In any case, I figured out how to make the switch for individual files. That part works now as I intend it to, so I can check out a tag, and check specific files in to trunk successfully.

% cd $tag

% svn switch $repo/trunk/filepath/file ./filepath/file

MicRavi
  • 1
  • 2
  • I'm glad you've found a solution. I don't know why your source code is so special, but if I was in your situation I would checkout the tag, _manually_ copy over the files I want from the tag to a _pristine version_ of trunk, make any other necessary changes, then commit the changes in trunk - noting where I got this version of the files from in the commit message. – Sameer Singh Sep 10 '13 at 06:51
  • Thanks, Samir, but as I mentioned previously, >> ...hav[ing] 2 checked out databases and physically copy over files from tag to trunk. This is clumsy, error-prone and cumbersome. – MicRavi Sep 10 '13 at 20:24
  • You don't need two checkouts. Since you seem to imply that you know the files you want to get from the tag, you could simply check those out directly instead of checking out the entire tag. – Sameer Singh Sep 11 '13 at 06:19
  • Ah, I see. Thanks I will investigate that. – MicRavi Sep 11 '13 at 20:19