excluding unchanged binaries from checkin

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
kozchris
Posts: 8
Joined: Tue Sep 27, 2011 12:58 pm

excluding unchanged binaries from checkin

Post by kozchris » Tue Sep 27, 2011 9:24 pm

Hello,

I have an automated (final builder) process that does the following,

1) checks out all the files in a directory
2) copies the latest versions of those files overwriting the checked out versions
3) does a checkin of the files with the command:

Running Vault with command line : commit -user "admin" -password "******" -host "10.100.0.66" -repository "eCommerce" -unchanged undocheckout "$/xxx/SiteData/themes/yyyy/"

There are a bunch of unchanged images files (.gif, .jpg) and these keep getting checked in. What is the correct command to skip checking in unmodified image files?

Thanks,
Chris

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

Re: excluding unchanged binaries from checkin

Post by lbauer » Wed Sep 28, 2011 10:24 am

What version of Vault are you using?

Are the unchanged files being checked in and incremented a version each time?

Looks like you're using the correct option:

Code: Select all

-unchanged checkin|leavecheckedout|undocheckout

Action to perform on an unchanged, checked-out file during commit.
Check the file in unmodified, leave the file checked out, or
undo the checkout of the file. The default is "undocheckout".
So the question is -- does Vault think these files have changed? Is the timestamp different than it was before?
Linda Bauer
SourceGear
Technical Support Manager

kozchris
Posts: 8
Joined: Tue Sep 27, 2011 12:58 pm

Re: excluding unchanged binaries from checkin

Post by kozchris » Wed Sep 28, 2011 1:12 pm

vault client is 5.1.1 (19215)
vault server is 5.1.0.19172

I performed the process manually with one of the image files. In the vault client the file is listed with details: "size unchanged" but with a type of "modified". Doing a diff says the files are identical using raw comparison.

Yes, the files are getting checked in and incremented with a new version each time according to the vault history.

Thanks for responding

kozchris
Posts: 8
Joined: Tue Sep 27, 2011 12:58 pm

Re: excluding unchanged binaries from checkin

Post by kozchris » Fri Sep 30, 2011 7:52 am

Any other ideas? Is there away to tell vault to ignore a time difference if that is what it is seeing.

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

Re: excluding unchanged binaries from checkin

Post by lbauer » Fri Sep 30, 2011 9:20 am

Vault compares the time stamp of the local file to the time stamp of the baseline file in the client-side cache. If it's different, Vault considers the file to be modified.

If files aren't being modified, you could get them by their modification date, which should remain constant, or perhaps the last checkin time. Use the -setfiletime option in the Command Line Client:

Code: Select all

-setfiletime checkin|current|modification

Sets the time of the local file.

checkin - use the last checkin time
current - use the current system time
modification - use the file's last modified time.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply