Help with branching after changes

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
LaughingJohn
Posts: 4
Joined: Thu Mar 31, 2011 3:04 am

Help with branching after changes

Post by LaughingJohn » Thu Mar 31, 2011 3:19 am

Hi,

I was wondering if someone out there could help me with a little issue I have. Firstly, I'm using Vault 4.1.4 in the Edit/Merge/Commit style. I have the client software and VS plugin.

I began changing some source to a particular solution initially thinking it was a minor change and I would just commit the changes to the same branch (1.1).

However over time I realised I was making some fairly drastic change to the project including deleting/adding/renaming lots of source files.

So I decided to create a new branch (1.2) and apply my changes to that. What I've done so far is:
  • - Create a new Branch
    - Rename by working directory to that of the new branch (i.e .1.1 to 1.2).
The problem is Vault still thinks I have made changes in the old branch. How can I get it to recognise that my deletes/adds/renames now need to apply to 1.2 not 1.1???? I don't want the new branch to contain files I don't use.

The only thing I can think of is to start from scratch with a new 1.2 folder (i.e. don't branch and add all the files manually), but then I lose all my old history.

Can anyone tell me if there is a better way of doing this?

Thanks,
LJ

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Help with branching after changes

Post by lbauer » Thu Mar 31, 2011 6:39 am

Are you using the Enhanced or Classic Client integration?

If you are using the Enhanced Client you should be able to do a GET of the branch, open it in Visual Studio and VS shouldn't be confused.

However if you are using Classic client integration, you probably should unbind and rebind the branched project to establish the correct association between the working folder and the repository folder.
Linda Bauer
SourceGear
Technical Support Manager

LaughingJohn
Posts: 4
Joined: Thu Mar 31, 2011 3:04 am

Re: Help with branching after changes

Post by LaughingJohn » Fri Apr 01, 2011 4:20 am

Hi,

Thanks for responding. I'm using Enhanced client integration. Visual studio isn't confused but unfortunately Vault is.

I need Vault to recognise all of the renames/adds/deletes I've made and I can't figure out a way of making that happen.

If I open the Vault Client, Vault still thinks I have made changes to the 1.1 branch, even after I do this:
1. Branch 1.1 to 1.2.
2. Rename my working folder from 1.1 to 1.2
3 Do a get latest on 1.1 (I though this might make Vault forget any changes to 1.1).

LJ.

P.S Just to clarify I got into this situation by:

1. Doing a get latest on the 1.1 branch.
2. Making lots of changes including renaming/adding/deleting files.
3. Deciding that there are so many changes I should have actually branched to 1.2 before starting. Which is the situation I'm trying to get to.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Help with branching after changes

Post by lbauer » Fri Apr 01, 2011 6:32 am

So you made changes to 1.1, then branched it. But you want a copy of the 1.1 folder before you made changes, right?

You can probably do this by branching or doing a GET from the earlier version of 1.1. In the Vault GUI Client select the 1.1 folder, right click on the folder and select Show History. In the History Query dialog, select View folder history by version. This will give you a list of versions with their dates. Select the version that corresponds to the date you want, and click on Branch or GET from the buttons on the right.
Linda Bauer
SourceGear
Technical Support Manager

LaughingJohn
Posts: 4
Joined: Thu Mar 31, 2011 3:04 am

Re: Help with branching after changes

Post by LaughingJohn » Tue Apr 05, 2011 8:06 am

Thanks your time Linda.

Sorry for the late reply! What I did was:

1. Get the 1.1. Branch to my working directory.
2. Make loads of changes - BUT only in the working directory.

So 1.1 branch in vault is fine and unchanged. However the Vault VS Add-in has kept track of all my renames/deletes (which it thinks are in the 1.1 branch).

What I want to do is:

1. In Vault, create a new branch 1.2 from the 1.1 branch. No problem here.
2 BUT now I want to check my changes into 1.2 instead of where I got them from (1.1).

Unfortunately Vault still thinks all my renames and deletes are against 1.1, whereas I want them to apply to the newly created 1.2 branch.

Hopefully that's finally making some sense !

LaughingJohn
Posts: 4
Joined: Thu Mar 31, 2011 3:04 am

Re: Help with branching after changes

Post by LaughingJohn » Tue Apr 05, 2011 11:21 am

I have got around it by spending about an hour doing it all manually.

Although I am still curious to know if there's an easier way you can suggest?

Thanks

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Help with branching after changes

Post by lbauer » Tue Apr 05, 2011 2:02 pm

I don't think there's a much easier way to do it.

Something that could work is to check in all your changes, making the latest version 1.2. Then you can Show History on the parent folder, and select Show Folder History by Version and select the version prior to the checkin. Belect the version and branch that, for your 1.1 version.

Your best bet is to branch before you do any significant development. You can always merge changes back into the trunk if you decide you really don't need that branch after all.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply