Backup copies

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

Moderator: SourceGear

Locked
djMax
Posts: 32
Joined: Wed Dec 01, 2004 1:05 pm
Location: Boston, MA

Backup copies

Post by djMax » Fri Jun 17, 2005 8:24 am

My program uses the GetToNonWorkingFolder call to get a bunch of files from Vault. I set the "WorkingFolderOptions" to not make backups and not write data to the working folders. But somehow I still get _sgbak directories everywhere. Is this expected behavior? Can I turn it off somehow?

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Fri Jun 17, 2005 9:07 am

Are you using version 3.0.6 or later? There was a bug fixed in 3.0.6 that prevented unnecessary backups.

djMax
Posts: 32
Joined: Wed Dec 01, 2004 1:05 pm
Location: Boston, MA

Post by djMax » Fri Jun 17, 2005 11:42 am

I'm using 3.1 beta.

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Fri Jun 17, 2005 1:06 pm

I'll log a bug to look at this before we release 3.1 then.

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Mon Jun 20, 2005 9:31 am

What is the option set to in the Vault GUI client for the user who does the action? It's set in Tools->Options->Local Files->Cache/Backup Locations.

If you have unchecked "Save files in backup folder before overwriting", then everything will be fine, and no backup files will show up.

djMax
Posts: 32
Joined: Wed Dec 01, 2004 1:05 pm
Location: Boston, MA

Post by djMax » Mon Jun 27, 2005 9:39 am

That seems to help. The end goal of this whole thing is to make a web page that can initiate a get latest... So while I will have a "impersonated current user", I'm going to be in a service (IIS). Is this going to work?

On a separate note, when I use GetToNonWorkingFolders, I have a suspicion it gets all the files every time. I guess this isn't too surprising, but is there a way to avoid this?

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Mon Jun 27, 2005 10:17 am

The only way to avoid this is to do a get to a working folder. Nonworking folder doesn't note any information about what versions were fetched or look at the files that are already there. A working folder will only download the things that have changed since the last get.

I don't see anything that is inherently wrong with what you're doing, but be aware that you can always shell out to the command line client.

djMax
Posts: 32
Joined: Wed Dec 01, 2004 1:05 pm
Location: Boston, MA

Post by djMax » Mon Jun 27, 2005 2:36 pm

The reason I didn't do a get to a working folder was that I wasn't sure what would happen if multiple Windows users (same Vault user) had the same working folder set. Will this work ok?

This prop process is pretty slick, I love the way you guys built the GUI. So for us to propagate our latest to production servers we:

* Click a button in Visual Studio which triggers an add in that
- Associates a repository and folder with the production version of the site, and saves that association in the project file if it's not already there
- Sets up IIS with the app mapping if it's not there
- Does a build
- Logs into vault, checks out the "production tree", which is only the files needed to run the web app
- Calls VS "Copy Project" onto the production tree working folder
- Detects new files
- Checks them back in, prompting for a comment
- Labels the production tree with the name of the user and date and such

* Then we go to the production servers via a web page with Windows auth and impersonation that
- Logs into vault using credentials protected by a machine specific key
- Can show diffs between the current working folder in production and any arbitrary label
- Gets latest to the working folder
- Runs an XCopy deploy to the production servers.

Fun fun.

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Mon Jun 27, 2005 3:16 pm

They can probably all point to the same working folder, as long as they all have the same location for their client cache files. You can set this location in an argument to the ClientInstance.Init function.

Sounds like a pretty sweet setup. I'm jealous.

Locked