nqramjets Posted June 8, 2016 Report Share Posted June 8, 2016 # Works :: cm getfile 'C:\build\scripts\Script\SqlScript_1.sql' # Works :: cm getfile 'C:\build\Scripts\Script\SqlScript_1.sql' # Broken :: cm getfile 'serverpath:/scripts/Script/SqlScript_1.sql#br:/main/ATO 1' # Broken :: cm getfile 'serverpath:/Scripts/Script/SQLScript_1.sql#br:/main/ATO 1' # Works :: cm getfile 'serverpath:/scripts/Script/SQLScript_1.sql#br:/main/ATO 1' PlasticSCM- In a Windows system using "cm getfile serverpath:/path/to/the.file" work only if the path is precisely that case. On a windows system both folder and file names are not case-sensitive, but this is not respected when "serverpath" is used. For example, These options work/fail as indicated here. This is causing issues with automated script application because plastic can't find the files even though they're there. I've tested all permutations of casing for files and folders when using a filepath, but only the precise casing works for serverpath. NOTE: This is permanently broken, because changing the case of the file name does not change the file, so I can't even fix it and check it in. Thanks, Ryan Link to comment Share on other sites More sharing options...
manu Posted June 9, 2016 Report Share Posted June 9, 2016 Original Path: \scripts\Script\SQLScript_1.sql Local get-file (Win and Linux) cm getfile C:\Users\manu\wkspaces\T\scripts\Script\SQLScript_1.sql cm getfile C:\Users\manu\wkspaces\T\ScRiPtS\ScRiPt\sQlScRiPt_1.SqL Will both work because the system is able to get the internal wks revision id and get it's content. No mater if you type it wrong. Server get-file (Win and Linux) cm getfile serverpath:/scripts/Script/SQLScript_1.sql#br:/main Will work. cm getfile serverpath:/scripts/Script/SQLScript_1.sql#br:/main Will not work since the Plastic SCM server always behaves as a case-sensitive system. For example, These options work/fail as indicated here. This is causing issues with automated script application because plastic can't find the files even though they're there. You can use exactly the same path you used to submit the file to the repository, the ones you chose or you can use the revisionid instead. $>cm ls C:\Users\manu\wkspaces\T\ScRiPtS\ScRiPt\sQlScRiPt_1.SqL --format={revid} 51 $>cm getfile revid:51@rep:T@repserver:localhost:8084 And if you don't have a workspace then you can run a remote ls to get the id, and even the path. $>cm ls / --tree=br:/main@T@localhost:8084 --format="{revid}##{wkpath}" -r Use the output to run a non case sensitive search to find your file, finally use the id or the right path for the "cm getfile" command. NOTE: This is permanently broken, because changing the case of the file name does not change the file, so I can't even fix it and check it in. It's not broken, windows is a non case sensitive system so those kind of modifications can't be done in a Windows machine, you'll need a Linux/Mac one. Link to comment Share on other sites More sharing options...
nqramjets Posted June 9, 2016 Author Report Share Posted June 9, 2016 Thanks for the reply Manu, the "cm ls" workaround might be another option we could use. We have a system which automatically applies the scripts and dynamically generates the file names. When the developer does not use the exact casing the cm getfile obviously can't find it. I also have to correct my statement that it was permanently broken, as I was able to rename the file through the Plastic UI, changing the casing of the file to match the filename exactly, and Plastic did pick this up as a Move and allowed me to check it in. So, it is at least fixable if/when this happens again, so we're just adding some logic to send notifications when the files can't be found. It would be kinda nice to be able to issue a "cm getfile" with a switch which would fall back to a case-insensitive search if the exact file path wasn't found. Something like "cm getfile serverpath:/path/to.file --ignorecase" Do you think that would be worth adding to the UserVoice? Ryan Link to comment Share on other sites More sharing options...
manu Posted June 29, 2016 Report Share Posted June 29, 2016 Hi Ryan, sure, please add it to the UserVoice page, I'm happy to know you can workaround it somehow! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.