Jason S
Jason S

Reputation: 189686

updating tags in svn

If I use svn copy to take a snapshot of a portion of a repository, how can I update that snapshot?

Use case:

myrepo/
  trunk/
    src/
      something.c
      something.h
  tags/
  branches/

mkdir branches/user1/trusted

svn add branches/user1/

svn copy trunk/src branches/user1/trusted

myrepo/
  trunk/
    src/
      something.c
      something.h
  tags/
  branches/
    user1/
      trusted/
        src/
          something.c
          something.h

--- commits and changes happen in trunk/src/something.* here ---

myrepo/
  trunk/
    src/
      neatstuff.c           // new file
      something.c           // modified
      big_ugly_include.h    // was something.h, it got renamed
  tags/
  branches/
    user1/
      trusted/
        src/
          something.c
          something.h

Now I want branches/user1/trusted/src to be the latest version of trunk/src. How can I do this?

Upvotes: 3

Views: 7346

Answers (2)

Dan Davies Brackett
Dan Davies Brackett

Reputation: 10071

this operation is called merge. The Subversion book covers it in detail.

edit with a bit more detail:

As Rob and sgreeve mention, deleting and recreating the branch is another option. I suggested merge because your example had you creating a branch - the purpose of which is concurrent modification. If your repository copies aren't to be modified after they're created, you're best off to create a tag rather than a branch.

Upvotes: 3

Rob
Rob

Reputation: 48369

As an alternative to merging, if you're simply after a straightforward tag update, you could delete the copy and re-create it.

Upvotes: 2

Related Questions