Condividi tramite


What is a VSS Shadow Folder?

I played racquetball yesterday against a Web developer
who sometimes works as a vendor at Microsoft (a V-Dash in Microspeak). After he
beat me soundly in three straight games, he asked me what a "programmer/writer"
does on a daily basis. He had seen my job title in my Outlook personnel
properties. I explained that a programmer/writer writes
documentation. Specifically, I write the documentation for Visual
SourceSafe and source control integration features in Visual Studio .NET. 
I took a deep breath and prepared myself for the normal barrage of
questions. Alas, my racquetball partner asked some questions that I can
answer.  In fact, I have answered many of his
questions in this weblog. He asked questions like,

Q: How can I move a database from one computer to another?
A: Literally
drag and drop the entire database directory.

Q: How can I work on my laptop and synchronize with the VSS database when I
go back online.
A: In VS.NET, checkout the project and then click File|Source
Control|Change Source Control, select your solution and click Disconnect.
Go offline. Upon reconnecting, repeat steps above, click Connect in the Change
Source Control dialog box, and then check in your project.

And then he said something funny (at least I think it's funny:).  When
discussing how to take his projects offline he mentioned that somebody
on his team had suggested Shadow Folders.  Whoa!

Stop right there.

Q: What is a Shadow Folder?
A: A Shadow folder is a read-only copy of the
tip version* of all files in a given VSS project folder. It is regularly
updated, or at least it should be.

Q: When should I use Shadow Folders?
A: I use shadow folders to give
non-team members a glimpse into the latest state of my source files and
projects.  Shadow folders are great for managers and the members of related
teams because they aren't tempted to checkout (and screw up) your source
files.

Q: Is there anything I can do to make Shadow Folders more usable?
A: Yes!
When naming your VSS project folders and when creating any file
that might be added to the VSS database, create filenames that contain no
whitespaces. I use underscores instead (eg, My_Project_1.csproj in
$/Projects_2/SourceFiles). Doing so allows me to embed live UNC links to the
shadow copies of my source controlled files in emails and other documents
(eg, //mycomputer/Projects_2/SourceFiles/My_Project_1.csproj).

Q: How can I setup Shadow Folders for my database?
A: You can do so on a
project by project basis using VSS Administrator. Click Tools|Options, select
the Shadow Folders tab, click the Browse button and select a desired VSS project
folder. Then, click the 2nd Browse button and specify the path on physical disk
where you'd like to save the shadow copies of the files in this VSS project
folder. To shadow the entire database, select $/.

__________________
*The "Tip Version" is the version of a file in a VSS
database that sits atop its version stack. It is the most recently created
version. The Tip Version is not necessarily the Latest Database Version
however. If you pin a file at a particular version (say v5 of 10 vers), that
version (v5) becomes the Latest Database Version.

++++++++++++++++
Este mensaje se proporciona "como
está" sin garantías de ninguna clase, y no otorga ningún
derecho.

Comments

  • Anonymous
    September 18, 2003
    The comment has been removed
  • Anonymous
    September 18, 2003
    Short Answer: No. Long Answer: Raymond Chen (http://blogs.gotdotnet.com/raymondc/) is an exceptional cat. The potential Raymond Chens of Visual Studio .NET have either:a) moved on to other teams (Shane, Bill, Jonathan, Natalie [okay, I'm starting to tear up]... VS.NET has been a victim of its own success) or b) do not maintain blogs. I've been on the VS.NET team for four years and, even though I write about source control, I have been closely attached to the core IDE. For example, I wrote the project documentation for VS2002. The VSCore team, as we call it, has two other up and coming bloggers: Chris Flaat (http://blogs.gotdotnet.com/cflaat/) and Josh Ledgard(http://blogs.gotdotnet.com/jledgard/). I encourage you to check out their blogs and push their buttons for topics. If you tune into our blogs occasionally, you just might discover a link to the Raymond Chen of VS.NET... whoever that might prove to be.In the meantime, if there's something in particular about the history and development of the Visual Studio .NET integrated development environment that you'd like to know, post your suggestions here. I'll do my best to solicit or throw together a well-researched response.
  • Anonymous
    September 19, 2003
    Shadow folders, interresting feature, I've used it alot some time ago.,. Today I tested it and it didn't work.. Do you really need to check files in via vss explorer?, it didn't work when checking in files via vs.net..Or maybe there is an issue with making an shadow folder of an share of the folder the project is in?
  • Anonymous
    September 19, 2003
    For some really, really odd reason, I've never used shadow folders to shadow my VS.NET development projects. Embarrassing. Must do. Today. Is anyone out there using shadow folders in this capacity successfully?
  • Anonymous
    September 19, 2003
    Okay, I just set up a shadow folder for the database where I store my C# and VB projects. I then checked out a few files, added some dummy source files, made some changes to existing files and checked in my changes. I also added an entirely new solution to my database. I then successfully synchronized my shadow folder with my database by performing a Diff of $/ and the root of my shadow directory (C:/sources_shadow) and and selecting the Reconcile All option in the Project Differences dialog. The last step "Got" the VSS project folder for my new Solution to the shadow folder. I'm not saying there isn't a problem, but this seems to be working well for me. Additionally, I have heard no complaints about this feature from VS.NET customers directly or in the newsgroups or listservs. Perhaps you can expand on what you mean by "maybe there is an wissue with making an shadow folder of a share of the folder the project is in?"Now, I just need to lay my hands on or write an automatic shadowing script using VSS' OLE automation to ensure that all new created projects are instantly added to the shadow folder. Surely somebody has one laying around...Asbjorn, If you're expecting new projects to be added automatically, it isn't going to happen. Files changes are updated in the shadow folders but new, renamed, or deleted projects are not. I just re-read the Visual SourceSafe documentation for shadow folders which, with one minor exception (no how to update shadow folders topic:(, is really quite excellent and descriptive. The leaves never stop falling.
  • Anonymous
    September 19, 2003
    The comment has been removed
  • Anonymous
    September 26, 2003
    Is it true that V- guys are often smarter than MS perm employees?
  • Anonymous
    February 18, 2004
    OK the example above works to gen the shadow for a small project. For a large project > 5000 files and 20 subprojects that also contain subprojects it is a SLOW & PAINFUL process. For hicups and accidently deleted shadow files we need a way to regenerate the shadow batch mode without human intervention.
    I would think there would be an admin to gen/regen the shadow. This is what i need. Any ideas?
    Thanks,
    George
  • Anonymous
    March 22, 2004
    I see that projects must be manually shadowed, and that new project will not be automatically added to the shadow; but new files within the project will be automatically added to the shadow, correct?
  • Anonymous
    May 14, 2004
    Hi,

    My boss wants to take a shadown directory and have those files reflected for download on an intranet page. The way you describe shadow though sounds like the files cannot be touched.

    Is there anyway to have a link on an intranet page that points to a VSS version of a file for download? They wouldn't necessarily have to pull the file from VSS - it could be duped in a local file directory on the server. But we would want it to update each time the VSS copy updates.

    Maybe this is pie in the sky dreaming...

    Tom
  • Anonymous
    May 18, 2006
    .NET 2.0 automatically compiles itself when needed. can't i set my shadow folder to be my web site. that way my dev web server always contains the latest code and I don't have to checkout all the files there whenever I want to refresh the development web site. Would that work?
  • Anonymous
    July 11, 2006
    The comment has been removed
  • Anonymous
    August 13, 2006
    Same problem here we copied a databse from one dev server that was getting ready to die to a new one and shadow folders stopped working, but only from vs.net 2005 integrated environment.  Still works from vss2005 client.

    Does the local vsscc file need to be rebuilt?
  • Anonymous
    January 21, 2009
    PingBack from http://www.keyongtech.com/2410599-newbie-using-vss-protected-files