Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
iwcp -copy files from STAGING
cliffhanger
Hi,
I am trying to use "iwcp" to copy files from STAGING to WORKAREA. This gives me "Permission Denied" error. But this executes fine when I execute it to copy a file from WORKAREA to WORKAREA.
"iwcp" documentation only talks about a source path and a destination path, does not mention anywhere that the source path cannot be STAGING.
Anyone knows of a workaround(Other than using regular "cp" and then setting the metadata with iwexattr)??
Thanks!
-cliff
Find more posts tagged with
Comments
Adam Stoller
Perhaps you want to use iwupdate?
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
cliffhanger
iwupdate works as long as the STAGING and the WORKAREA are in the same branch, but I am trying to copy from branch A'a STAGING to branch B,C...N's workarea.
any idea?
-cliff
Adam Stoller
You should probably be able to use iwcp -- the trick may be in figuring out the correct arguments to give it (two vpaths, two relative-paths, etc.) - however, I seem to recall that iwcp is a bit tempermental about its arguments and/or whether a file already exists with the same name in the target directory.
Alternatively you could try using OpenDeploy 6.0.2 with EA transfer built-in or write your own code to copy the file and then transfer the EAs.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
jbonifaci
Cliff, you can use iwupdate to copy files from the staging area of one branch to a workarea in a different branch.
~Jeff
cliffhanger
Did you use iwupdate in such condition? The reason I am asking because I tried doing that on TS6.1, UNIX environment and it gave me error. But it works fine as long as the STAGING and the WA are in the same branch.
-cliff
cliffhanger
You should probably be able to use iwcp -- the trick may be in figuring out the correct arguments to give it (two vpaths, two relative-paths, etc.)
hmmm can you elaborate a little bit more on two vpaths, two relative paths?
The file existing in the directory is not an issue in this case, because we attempt to copy only if the same DCR does not exist in the target area.
-cliff
jbonifaci
cliff, you need to specify the full path to everything when doing it cross branch. This example uses -f:
<iw-home>/bin/iwupdate -w -f <tempFile> <iw-mount>/<targetBranch>/WORKAREA/<targetWorkarea>
the temp file has the full path of each file you want to update/copy, i.e. <iw-mount>/<sourceBranch>/STAGING/<filePath>
I am currently doing this in 6.1, but it's windows not solaris. I would think it would still work though.
~Jeff
cliffhanger
Hmm...you're right, functionality should be platform independent, but doesn't seem to be the case here(??).
Here's the command i am running:
iwupdate /opt/iw-home/bin/iwupdate /iwmnt/default/main/ProductCatalog/STAGING/templatedata/Items/productDetail/data/masterProduct1.dcr
/iwmnt/default/main/Mktg_US/WORKAREA/ContentWorkArea/templatedata/Content/productDetail/data
This gives me the following error:
ERROR:02102: dst_vpath /iwmnt/default/main/Mktg_US/WORKAREA/ContentWorkArea/templatedata/Content/productDetail/data does not match src_vpath /iwmnt/default/main/ProductCatalog/STAGING/templatedata/Items/productDetail/data/masterProduct1.dcr
Now you might say, add the data/DCRNAME to the destination path; I did that, and in that case it gives me error saying the target file does not exist. This error does make sense though, iwupdate is probably expecting the file in the dest area since all its looking at is, updating the file...
So the answer seems to me, "iwupdate" is not a solution to my problem...let me know if you have any other thought Jeff...
Thanks!
-cliff
jbonifaci
The target must be an areavpath. So try the same command, but end the target with ../WORKAREA/ContentWorkArea, don't include anything beyond the workarea name for the target.
~Jeff
cliffhanger
Thanks Jeff!
the destination area did the trick. I wish IW did their documentation better....they definitely need to improve that...