A branching question....

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
IronSvelez
Posts: 5
Joined: Tue Nov 23, 2004 9:29 am

A branching question....

Post by IronSvelez » Wed Dec 01, 2004 10:30 am

While I am patiently waiting for answer to my merge question, let me pose another one.

In our organization, whenever a developer begins to make changes that will introduce a reasonable amount of instability for an indefinite preios of time, he branches the code.... that's what branching is for, right? So all is good.

Anyways, a full build takes a few hours, so we have a nightly build and a system for getting the binaries and the source used for this nightly build. This only runs on the main code stream.

In the past (VSS), whenever we wanted to "sync up" with the main code stream, we would get the nightly build.... and then get the latest versions of our files from the branch (dealing with conlficts/version problems manually). Vault improves on this by allowing us an easy way to merge the main code stream in to our branches.... but when we do a get latest on our branch (which now has the entire code-stream) then it gets the entire set of files in the branch. The code we get from the nightly build has the _sgvault folders included... so I was thinking that when we did something like this, we would just get the changed files updated. But now that we have done it, it seems that Vault (2.0.6) just sees that the disk file and the repo file are different, so it overrites. Is there a way to prevent this and just get the files that are different in the branch from those in the main code stream? Or is the best course of action to just save ourselves time by not getting the source from the build machine in this case and just doing a get latest on the branch.

Thanks a ton,
Steven

ericsink
Posts: 346
Joined: Mon Dec 15, 2003 1:52 pm
Location: SourceGear
Contact:

Post by ericsink » Wed Dec 01, 2004 11:00 am

Tricky question. We'll get back to you ASAP.
Eric Sink
Software Craftsman
SourceGear

IronSvelez
Posts: 5
Joined: Tue Nov 23, 2004 9:29 am

Post by IronSvelez » Mon Dec 06, 2004 9:19 am

Hi Guys...

Any progress on this one?

Thanks.

ericsink
Posts: 346
Joined: Mon Dec 15, 2003 1:52 pm
Location: SourceGear
Contact:

Post by ericsink » Mon Dec 06, 2004 10:01 am

Darn! We're "0 for 2" with you, aren't we? That sucks. I could offer some pretty decent excuses for my lameness, but I think I'll just admit I am embarrassed and answer your question. :-(

You've got a screwy case. The contents of _sgvault folders were not designed to be moved from machine to machine. I understand why you want to do this, because your build takes so long.

It may take a little fiddling to figure out how to make this work well. I am wondering if perhaps Vault 3.0 would work better for you WITHOUT trying to move the _sgvault folders around. Vault 3.0 can resolve files which are in an Unknown status. So, what *might* work better is:

1. Do the big build and zip it up, without the _sgvault folders.

2. Unzip it on the developer's desktop.

3. Let Vault resolve all the unknown files (might take a few seconds, perhaps even a minute or two if your tree is huge)
Eric Sink
Software Craftsman
SourceGear

IronSvelez
Posts: 5
Joined: Tue Nov 23, 2004 9:29 am

Post by IronSvelez » Mon Dec 06, 2004 12:11 pm

It's OK man... I'm part of a small development team too where developers share the responsibility of customer support.... sometimes we don't get back to people for weeks ;) (well, I hope not weeks).

Anyways, I saw that new feature in 3.0 an I was thinking it would help. Unfortunately, my boss wants to wait a few weeks on an upgrade untill any hidden bugs shake out.

So, to double check, the unkown resolution/CRC check thing should find an existing repo version based only on wether the contents of the file match, right? So if the file on disk came from one branch and I am working on another, all should be happy as long as contents sync-up.

Thanks,
Steven

ericsink
Posts: 346
Joined: Mon Dec 15, 2003 1:52 pm
Location: SourceGear
Contact:

Post by ericsink » Mon Dec 06, 2004 12:36 pm

IronSvelez wrote:So, to double check, the unkown resolution/CRC check thing should find an existing repo version based only on wether the contents of the file match, right? So if the file on disk came from one branch and I am working on another, all should be happy as long as contents sync-up.
Yes, I think that's right. The only quirk will be ensuring that Vault considers the file to be Unknown. I'm still pondering the details of this and maybe the best way is like this:

1. On the desktop machine, set the option to keep _sgvault folders inside the working folders.

2. On the build machine, get a copy of the source, but make sure the _sgvault folders are NOT inside the working folder. Do the build, zip it up.

3. On the desktop machine, blow away the working folder, or at least blow away the _sgvault subfolders. Unzip the file from the build machine, which contains all the repository files but no sgvault stuff.

4. Every file should now be in an Unknown state. Vault will resolve all the unknowns by comparing CRCs to the server. Yes, "all should be happy as long as contents sync-up" -- Vault is simply comparing file contents.

Sorry if I'm making this sound complicated. Like I said, this is a little bit of an oddball case for Vault. I'm pretty sure there is a combination of steps which will work for you without too much pain.
Eric Sink
Software Craftsman
SourceGear

Locked