Command line issue

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

Moderator: SourceGear

Locked
christian
Posts: 202
Joined: Tue Sep 14, 2004 1:02 pm
Location: UK

Command line issue

Post by christian » Fri Apr 01, 2005 7:46 am

Hi,
I posted sometime ago asking what to do about files that have been deleted in the repository and the reply from the sourcegear team was that this was handled by vault so long as the option to perform repository deletions locally have been switched on - great news.

I've now relied on this vault behaviour to keep the working directory clean in numerous automated situations. I've just discovered that this behaviour isn't happening from the command line. Take for example the following command:

vault GETWILDCARD -user "some_user" -password "******" -host "xxx" -repository "VaultTest" -setfiletime "modification" -verbose -makereadonly -makewritable -merge overwrite "$/" "*.*"

I expected this to perform deletes locally as that's what I've set as the vault options for "some_user". However, this is not what is happening. What's the score here as I've extensively relied on deletes being performed locally?

Thanks
Christian

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Fri Apr 01, 2005 9:07 am

The Vault client GUI client properly deletes the files from the working directory, but when I ran your command from the CLC, it didn't remove the deleted files. The CLC isn't honoring that setting in the GUI client -- it may not have been part of the spec. I'll log this to our bug database.
Linda Bauer
SourceGear
Technical Support Manager

christian
Posts: 202
Joined: Tue Sep 14, 2004 1:02 pm
Location: UK

Post by christian » Fri Apr 01, 2005 9:16 am

Thanks.

This is critical behaviour for us as we're using Vault to check in our database ddl scripts (one for each db object). We have an automated routine that uses the CLC to get the latest scripts and then upgrade production, QA, developer databases, etc. Renames and deletes are not being picked up and are beginning to leave our databases in an inconsistent state, which is rather scary.

Christian

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Fri Apr 01, 2005 10:51 am

You might consider getting to a clean directory using -destpath or running the CLC in a batch file that clears the working directory prior to a "get latest".
Linda Bauer
SourceGear
Technical Support Manager

GregM
Posts: 485
Joined: Sat Mar 13, 2004 9:00 am

Post by GregM » Fri Apr 01, 2005 11:49 am

Could this be because the command used is GETWILDCARD instead of just a plain GET?

christian
Posts: 202
Joined: Tue Sep 14, 2004 1:02 pm
Location: UK

Post by christian » Fri Apr 01, 2005 11:56 am

I've tried both commands and I get the same results.

christian
Posts: 202
Joined: Tue Sep 14, 2004 1:02 pm
Location: UK

Post by christian » Mon Apr 04, 2005 7:13 am

lbauer wrote:You might consider getting to a clean directory using -destpath or running the CLC in a batch file that clears the working directory prior to a "get latest".
Can't do this I'm afraid as we use the Get with a -verbose switch to determine if the working directory has changed. This allows us to skip a lengthy script that only runs if the content of the working directory has changed.

We can probably live with the situation for about 2 weeks by making sure each administrator and developer emails all the other team members when database objects are renamed or deleted so that they can delete the old files from the development, QA and Production working directories but this really is not workable for more than a short period of time, as the intention of the scripts is to avoid manual steps.

Thanks
Christian

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

Post by jeremy_sg » Mon Apr 04, 2005 7:43 am

3.0.6 will have a command line flag for checkout, get, and getwildcard. The help for the new flag is below:
-performdeletions [donotremoveworkingcopy|removeworkingcopy|removeworkingcopyifunmodified]
When getting a folder, this option controls whether files deleted in the
repository are deleted in the working folder. The default is
donotremoveworkingcopy. This option only applies to GET, GETWILDCARD
and CHECKOUT commands

christian
Posts: 202
Joined: Tue Sep 14, 2004 1:02 pm
Location: UK

Post by christian » Mon Apr 04, 2005 7:49 am

That's brilliant news.

Thanks guys (and gals)
Christian

Locked