Check in UNchanged file
Moderator: SourceGear
Check in UNchanged file
Scenario:
- The working folder has 50 files checked out.
- Only 2 files are new since the last check in
- I use Vault Cmd line client to check in (+keep files check out) all the 50 files
Question: How does Vault Cmd Line client handle the 48 UNchanged files?
- Would their version# incremented (I wish not)?
- Are they really checked in (and consume any database space)?
I have tested with GUI Vault Client 3.05. It seems that Vault does nothing when checking in an unchanged file (no version increment, no new entry in file history). Can I assume that there is zero DB space consumption and Vault Cmd client also exposes the same behaviour?
Thanks in advance.
- The working folder has 50 files checked out.
- Only 2 files are new since the last check in
- I use Vault Cmd line client to check in (+keep files check out) all the 50 files
Question: How does Vault Cmd Line client handle the 48 UNchanged files?
- Would their version# incremented (I wish not)?
- Are they really checked in (and consume any database space)?
I have tested with GUI Vault Client 3.05. It seems that Vault does nothing when checking in an unchanged file (no version increment, no new entry in file history). Can I assume that there is zero DB space consumption and Vault Cmd client also exposes the same behaviour?
Thanks in advance.
The default of the Command Line Client (CLC) is to undo the checkout. If you want different behavior, use the -unchanged <OPTION>.
See for more information related to the unchanged options.
See
Code: Select all
Vault.exe HELP commit
Jeff Clausius
SourceGear
SourceGear
Does undocheckout set the file to "check in" status?
I would like CLC to do nothing and leave the file ALWAYS checked out on an unchanged file. So that the next time I run the command, the file could be checked in if it is changed.
Should I use the options:
Vault.exe -keepcheckedout -unchanged leavecheckedout
I would like CLC to do nothing and leave the file ALWAYS checked out on an unchanged file. So that the next time I run the command, the file could be checked in if it is changed.
Should I use the options:
Vault.exe -keepcheckedout -unchanged leavecheckedout
No. The -keepcheckedout option applies to modified files.
In the case of 50 files checked out, of which 3 are modified...
VAULT COMMIT -UNCHANGED leavecheckedout
will leave 47 files in the change set after the command has completed.
If you ran
VAULT COMMIT -UNCHANGED leavecheckedout -keepcheckedout
there would be 50 files in the change set. Although the three files had their changes committed, the lock was not removed.
In the case of 50 files checked out, of which 3 are modified...
VAULT COMMIT -UNCHANGED leavecheckedout
will leave 47 files in the change set after the command has completed.
If you ran
VAULT COMMIT -UNCHANGED leavecheckedout -keepcheckedout
there would be 50 files in the change set. Although the three files had their changes committed, the lock was not removed.
Jeff Clausius
SourceGear
SourceGear
Which lock were you referring to? And what is a change set? A collection of checked-out files?jclausius wrote: If you ran
VAULT COMMIT -UNCHANGED leavecheckedout -keepcheckedout
there would be 50 files in the change set. Although the three files had their changes committed, the lock was not removed.
I would like these 50 files to be ALWAYS checked out. The files which are changed and checked in by CLC could very well be changed again tomorrow.
In short, I would like to run CLC every midnight on the working folder. New or changed files must be checked in. Requirements are:
- unchanged files: nothing happen, they must remain checked out (so that CLC would be able to check them in possibly next time)
- change files: check in, but leave the files checked out. Same purpose, they could be changed again tomorrow and will be checked in again.
- new files (working folder may have new files created): add files to Vault project and these file should also remains checked out.
- deleted files (exist in Vault project but not in working folder): do nothing.
Should I run CLC several times or can I do all of this in one single execution?
A Lock is a checkout lock ( exclusive or normal ) placed on a file. It is an indication that a file will soon be changing.Tri wrote:Which lock were you referring to? And what is a change set? A collection of checked-out files?
A Change set is a group of related file/folder changes committed in a Vault transaction. If you using Vault in Checkout/Modify/Commit mode, a change set may include files which are locked ( checked out ).
A Pending Change set is a group of file/folder changes which you have not yet committed to the repository.
Then -keepcheckedout -unchanged leavecheckedout should do what you want.Tri wrote:I would like these 50 files to be ALWAYS checked out. The files which are changed and checked in by CLC could very well be changed again tomorrow.
You are going to have to do some type of change detection to catch the added or deleted files. Once you detect these changes, you would useTri wrote:In short, I would like to run CLC every midnight on the working folder. New or changed files must be checked in. Requirements are:
- unchanged files: nothing happen, they must remain checked out (so that CLC would be able to check them in possibly next time)
- change files: check in, but leave the files checked out. Same purpose, they could be changed again tomorrow and will be checked in again.
- new files (working folder may have new files created): add files to Vault project and these file should also remains checked out.
- deleted files (exist in Vault project but not in working folder): do nothing.
Should I run CLC several times or can I do all of this in one single execution?
Code: Select all
vault ADD repository_path local_path
Code: Select all
vault DELETE repository_path
Once you have determined the actions the ADD/DELETE will place the items into the Pending change set. You would then call
Code: Select all
vault COMMIT
HTH
Jeff Clausius
SourceGear
SourceGear