Fetching to an existing source tree
To reduce fetch times we're now saving a copy of the last fetched source tree for our builds and then using that to seed the next build's source tree before doing the fetch for it. I have a few questions about this approach (note: we are using the ant toolkit for all our rtc interactions and are running rtc v2 at this time):
1. Is there a way to see the list of files that end up being fetched?
2. What happens when a file rename or file delete was delivered? Does the fetch know to remove the old file?
3. Regarding question 2, if the old file remains, is there a way to determine that it should be removed so our build script can take care of that after the fetch finishes?
4. What criteria does the fetch use to decide if a file should be downloaded or not? Does it compare file size, date or checksum? Is that customizable?
Thanks for any clarification you give me on this.
1. Is there a way to see the list of files that end up being fetched?
2. What happens when a file rename or file delete was delivered? Does the fetch know to remove the old file?
3. Regarding question 2, if the old file remains, is there a way to determine that it should be removed so our build script can take care of that after the fetch finishes?
4. What criteria does the fetch use to decide if a file should be downloaded or not? Does it compare file size, date or checksum? Is that customizable?
Thanks for any clarification you give me on this.
13 answers
I'm not familiar with the ANT toolkit tasks, but hopefully someone else
on the forum that is can give you some help with this.
Cheers,
Geoff
On 6/20/2011 11:38 AM, chtbuild wrote:
on the forum that is can give you some help with this.
Cheers,
Geoff
On 6/20/2011 11:38 AM, chtbuild wrote:
Geoff, thanks for the reply.
When you say "lays down the previous build's source
tree", I assume it
is doing so by restoring some copy you made and stored
somewhere.
Correct.
By "accept and fetch", are you using the RTC scm
"load" operation, or
the "accept" operation, or some combination of the
two?
I am using the ANT toolkit teamAccept and teamFetch tasks. I only
mention the accept so you can understand the context. I assume the
accept only updates the workspace with newly delivered items. The
fetch then downloads the workspace content and that is the operation
in question. Perhaps the command line "load" action
behaves differently than the ANT teamFetch with regards to the use of
the metadata? If that is the case, I could try replacing my teamFetch
with the load command but I'd like to know if that is the solution
before I start rewriting things.
Thanks again for your help.
Repeating last entry hoping someone will have mercy on me and help...
> File renames and deletes will be properly handled since the metadata
> of the sandbox keeps track of the state of the items that were previously
> loaded.
This doesn't seem to be working for me. The customer delivered some file deletes and, from the GUI Show->Repository Files I confirmed that they are no longer there. When the build runs, it lays down the previous build's source tree, which includes those deleted files since they existed at the time of the last build. Then an accept and a fetch is run and, when the fetch is done, I see those files are still there. You said that they would be deleted assuming the build is fetching into a sandbox that has the metadata from the previous fetch. I'm still a little fuzzy on what that means. When I seed the new build tree by laying down the last build's saved source tree, it includes the .jazz5 tree and everything in the tree as it was just after the last build's fetch. Is the .jazz5 tree the "metadata of the sandbox"? Or is there something else that needs to be saved so that the fetch knows to remove deleted files when it's fetching into a tree that's already full of source code from a previous fetch? I'd appreciate any help you can give me to understand what I'm doing wrong and how to get this working.
I've been trying some file deletes with 3.0.1 and have had them successfully be deleted on disk when using the teamFetch Ant task. I'm not sure if my scenario is similar enough to yours though. I copied a directory tree from a previous build (including the .jazz5) directory and then changed the teamFetch destination attribute to the new directory. Prior to running a build, I deleted a file, check in the change set, and delivered.
My build xml has these two tasks below.
<teamAccept repositoryAddress="${repositoryAddress}"
userId="${userId}"
password="${password}"
workspaceName="build"
buildResultUUID="${buildResultUUID}"
snapshotName="test"
changeSetFile="${changeSetFile}"
verbose="true" />
<teamFetch repositoryAddress="${repositoryAddress}"
userId="${userId}"
password="${password}"
workspaceName="build"
buildResultUUID="${buildResultUUID}"
destination="C:/temp/test"
verbose="true" />
Brent Ulbricht
RTC Build Lead
page 2of 1 pagesof 2 pages