SourceSafe Shadow Folders, Maintaining Synchronicity


A SourceSafe shadow folder is a UNC share* in
which VSS maintains a current copy of the latest database version of every
file in a SourceSafe project and all of its subprojects. When you or a
teammate check in changes to a source-controlled file whose project has a shadow
folder, its shadow copy is–or should be–overwritten on disk.


A shadow folder can get out of sync with the SourceSafe database for a number
of reasons. The most common are:



  1. style="MARGIN: 0in 0in 0pt; tab-stops: list .5in; mso-list: l1 level1 lfo1; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"
    >A
    new project is added to a shadowed project (RESULT: new subproject is not
    shadowed on disk)
  2. style="MARGIN: 0in 0in 0pt; tab-stops: list .5in; mso-list: l1 level1 lfo1; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"
    >An
    existing subproject is renamed, shared, moved, or deleted (RESULT: changes are
    not reflected on disk)

style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Verdana">To confirm that a
SourceSafe shadow folder is up to date


style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">1. style="FONT-SIZE: 7pt">      style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">In VSS Explorer, select the
shadowed project.


style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">2. style="FONT-SIZE: 7pt">      style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Click Tools and
then click Show Differences.


style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">3. style="FONT-SIZE: 7pt">      style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">In the Show Differences
dialog box, enter the UNC path of the project’s shadow folder in the
To: box (usually, this involves overwriting the path to your
working folder), and then click OK.


style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">If there are any differences
between your database version and its shadow copy, they are
highlighted. 


style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">You can restore synchronicity
between the database version of a project and its shadow copy using any of the
following techniques:



  1. style="MARGIN: 0in 0in 3pt; tab-stops: list .5in; mso-list: l0 level1 lfo2; mso-margin-top-alt: auto"
    > style="mso-bidi-font-weight: normal"> style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Quickest Update
    Method

    In the Project Difference viewer, click the Reconcile
    All
    button, which sits a couple of buttons left of the handy dandy
    ‘?’.
    Disclaimer — in some situations, like the one outlined in href="http://support.microsoft.com/default.aspx?scid=kb;en-us;162113">http://support.microsoft.com/default.aspx?scid=kb;en-us;162113,
    this may not work.

  2. style="MARGIN: 0in 0in 3pt; tab-stops: list .5in; mso-list: l0 level1 lfo2; mso-margin-top-alt: auto"
    > style="mso-bidi-font-weight: normal"> style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Easy, Trusted Update
    Method

    Reestablish the shadow folder path
    in VSS Administrator in the Options dialog box (Tools|Options|Shadow
    Folders).

  3. style="MARGIN: 0in 0in 3pt; tab-stops: list .5in; mso-list: l0 level1 lfo2; mso-margin-top-alt: auto"
    > style="mso-bidi-font-weight: normal"> style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Complex, Trusted Update
    Method

    (I’m flying by the seat of my pants here so feel free to correct any
    errors…) Add a new user to the database called Admin_Shadow. Login
    to VSS Explorer as the Admin_Shadow user, select the SourceSafe project whose
    shadow folder you wish to synchronize with its latest database version,
    click SourceSafe and then click Get Latest
    Version
    . When prompted to set a working folder, click
    OK.
    In the Set Working Folder dialog box,
    enter the UNC path to the project’s working folder in the
    Name box, and then click OK. The latest
    database version of the project, its subprojects, and files therein are then
    automatically gotten to Admin_Shadow’s working folder, which is also your
    shadow folder.

style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Some software development teams
use a (read/write) Shadow Folder to share their latest bits with each other,
usually for local builds.  For the very reason that many types of everyday
changes can break the synchronicity between Shadow Folders and SourceSafe
projects, I do not recommend this method.  However, the SourceSafe help
says, “To make sure that every user has the most recent version of files,
it may be desirable for all users to compile source code out of a centralized
folder, instead of in personal working folders. In this case, shadow folders are
frequently used in conjunction with the Remove local copy after Add or Check
In
option on the Local Files tab in the Options dialog box on
the Tools menu.” style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Microsoft documentation is almost
always right ;-).  As an alternative to this iffy method, you might
consider writing a script that routinely (or OnBlank event) gets the latest
version of a project/subproject to the working folder of an administrative user
(you can even call it Admin_Shadow) and then removes the read-only
protection for all contained files, if necessary for build
purposes.



style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">What are your experiences with
Shadow Folders? Have you encountered synchronization issues? If so, how did
you work around them? Have you resorted to something like the ‘Complex, Trusted
Update Method’ mentioned above?  If so, how did it work for you? 
Inquiring minds want to know.



style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Related Post: href="http://blogs.gotdotnet.com/korbyp/commentview.aspx/f65c0513-f128-4d04-8858-28765a7b714a">http://blogs.gotdotnet.com/korbyp/commentview.aspx/f65c0513-f128-4d04-8858-28765a7b714a.


style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"> 


style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">*typically and preferably,
although you can specify any physical path. Don’t use mapped drives
though.


++++++++++++++++++++


style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Il class=stilemessaggiodipostaelettronica18> style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-AU">
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; mso-ansi-language: EN-AU">presente
posting viene fornito “così come é”, senza garanzie, e non conferisce alcun
diritto.


 

Comments (14)

  1. AsbjornM says:

    As I earlier said, I had no luck with Shadow folders in my setting, but then my setting might be slightly off 🙂
    So, instead I created a dandy lite scriptfile, called getall.cmd, containg these lines:
    set SSUSER=BuildUser
    set SSDIR=\vssserver1ourprojectvss
    ss Get $/Releases/Current -W -R -I- -GL\buildserver1share$ourproject

    This script connects to the vss in vssdir, get all files from $/releases/current, and places them on \buildserver1share$ourproject, no questions asked.
    (and added an readonly user called BuildUser, with no password)
    This is much more simpler, and much more controllable than the shadow folders.. Took a while to get it working since the doc’s on VSS is, wel, not quite good. (to docs on msdn is good, but I used the docs installed with vss, wich is very incomplete?)

  2. Malik says:

    Hi,

    We have one problem since many days, Our VB didn’t able to integrate with VSS automatically, we need to re-install the whole VSS. Is there any shortcut to do it and why it’s removing the VSS from the Add-In Manager of VB6.