Is Shadow a 2-way street?

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

Moderator: SourceGear

Locked
thomas62j5
Posts: 71
Joined: Tue Aug 17, 2004 7:59 pm
Location: West Coast, USA

Is Shadow a 2-way street?

Post by thomas62j5 » Wed Aug 25, 2004 6:12 pm

I have read what I can find about the shadow feature and searched the forums here, but I can't find an answer to this...

If I change a file in a folder being shadowed (i.e. in the actual folder, not a change to the folder in Vault), will Vault's shadow service overwrite that changed file with the version in Vault? Because I didn't see anything about this, but it sure looks like that is what is happening.

Is there a way to turn this behavior off?

Thanks,
Thomas

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

Post by ericsink » Wed Aug 25, 2004 6:43 pm

I'm pretty sure that this behavior is "by design". The Shadow folder is designed specifically for the purpose of keeping an accurate "shadow" of the contents of a repository folder.
Eric Sink
Software Craftsman
SourceGear

thomas62j5
Posts: 71
Joined: Tue Aug 17, 2004 7:59 pm
Location: West Coast, USA

Post by thomas62j5 » Wed Aug 25, 2004 6:58 pm

Where we use Vault is primarily for checking in changes to our webserver code, which is then shadowed to the webserver.

It might be nice to have some options in this regard, such as being able to disable this feature on a site-wide or folder-wide basis, or an option to allow changes made in the folder to be checked in to the tree?

Also, I think this behavior should be documented better since it does not work like VSS in this regard.

I also think a warning should be displayed when you are adding a shadow folder which lets you know that any files in that existing folder will be overwritten by the versions found in the vault.

thomas62j5
Posts: 71
Joined: Tue Aug 17, 2004 7:59 pm
Location: West Coast, USA

Post by thomas62j5 » Wed Aug 25, 2004 7:01 pm

Another nice option which I would probably prefer to use would be that if Vault detects changes to files in the shadow folder, it would not overwrite them automatically. Rather, it'd provide a notice through the GUI client, and allow you to compare the checked-in version to the new version it found on disk. Then you could either overwrite the file on disk with the latest version in vault, or check that file on disk into Vault.

I just am real leery of anything that overwrites stuff without warning...

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

Post by ericsink » Wed Aug 25, 2004 7:26 pm

Well, we should probably hear from somebody else at SourceGear. I jumped in to be responsive to this question, but it occurs to me that there are some things I don't know about the way our shadow folders feature works.

I don't think I'm wrong, but I might be. :-)
Eric Sink
Software Craftsman
SourceGear

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Wed Aug 25, 2004 9:19 pm

Eric is correct. Vault's Shadow Folders is designed is to create an [bexact view[/b] of the latest files within the repository.

If someone makes changes to a file within a folder under Shadow Folder's control, the Shadow Folder Server will overwrite that file on the next change set transaction, thus creating an exact copy of the repository' files.

I've logged a feature request, in your name, to give Shadow Folders tje ability to use a flag controlling how files of unknown, edited, or renegade status are handled within the Shadow Folder directories.
Jeff Clausius
SourceGear

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Thu Aug 26, 2004 7:14 am

Note that Shadow Folders are, by definition, a replica of the database, so I'm not understanding the need for them to work like working folders.

Can I ask what your process is, and see if there is a better way to accomplish it?

thomas62j5
Posts: 71
Joined: Tue Aug 17, 2004 7:59 pm
Location: West Coast, USA

Post by thomas62j5 » Thu Aug 26, 2004 9:25 am

dan wrote:Note that Shadow Folders are, by definition, a replica of the database, so I'm not understanding the need for them to work like working folders.

Can I ask what your process is, and see if there is a better way to accomplish it?
Like I said above, we are shadowing several folders to our website. However, there are times when we want to make a change to a script or other file in those directories, LIVE, without immediately checking them in. (Many of our live areas are only used by our staff, for example, so testing things directly on the server is not a problem.)

In our current configuration, I have vault on a test server and so am changing files directly repeatedly during tests, and then vault is overwriting them.

To me it would work much nicer if Vault detected changed files in its shadow folders, and merely offered me an easy way to view the diffs, overwrite them from the vault, or check the changed file into the vault.

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Thu Aug 26, 2004 9:57 am

Ok - as Jeff said, this has been entered as a request in our DB.

However, I would not recommend Shadow Folders be used as anything but a read only version of what is in the database.

Since this is a test server environment for you, you might consider just having the test server folder be a working folder, and doing Gets whenever you want to run tests and make changes, and then check them in from there. You would probably want to make sure they work the way you want from a test server before shadowing them on the live web server.

thomas62j5
Posts: 71
Joined: Tue Aug 17, 2004 7:59 pm
Location: West Coast, USA

Post by thomas62j5 » Thu Aug 26, 2004 10:19 am

dan wrote:Ok - as Jeff said, this has been entered as a request in our DB.

However, I would not recommend Shadow Folders be used as anything but a read only version of what is in the database.

Since this is a test server environment for you, you might consider just having the test server folder be a working folder, and doing Gets whenever you want to run tests and make changes, and then check them in from there. You would probably want to make sure they work the way you want from a test server before shadowing them on the live web server.
I think it is likely that I am not using Vault to the fullest. We've never done anything with VSS but check files in and out. We've never gotten into branching, sharing, etc., and that may be one reason we're running into this problem.

I still think my ideas would make good features. :-)

Especially the ones that alert people that what they are doing is going to cause things to be overwritten, that part is definitely not clear in the docs or the UI. :-)

Thanks,
Thomas

Locked