It's all about the answers!

Ask a question

scm annotate fail


dennys hsieh (2911519) | asked Jan 16 '14, 5:23 a.m.
edited Jan 16 '14, 5:44 a.m.
I try to run the command to get user data from RTC but got the error message.
Sorry, the message is Chinese, I have no idea how to show English message on my Windows cmd.exe
is there any suggestion for it ?

D:\>scm annotate --username xxxxx --password xxxxx "D:\...\Test.java"
執行 'annotate' 時,發生問題:
找不到 "D:\...\Test.java" 的遠端可版本化項目。 請嘗試 'scm help annotate',取得相關資訊。
ps: I can use this command for other files.

Update: thanks for Ralph, the following is English message, but I cannot find this message on Google.
Problem running 'annotate':
No remote versionable found for "D:\...\Test.java". Try 'scm help annotate' for more info
rmation.

Comments
Ralph Schoon commented Jan 16 '14, 5:37 a.m. | edited Jan 16 '14, 5:37 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Hi, I tried to answer how to change languages somehow in https://jazz.net/forum/questions/13690/how-to-switch-localization-to-english-on-machines-with-different-regional-settings

Basically in your situation, there is a file scm.ini in one of the folders where the scm commandline files are located. You can add this line at the end:

-Duser.language=en
This should switch the error messages to English, as far as I can tell.

One answer



permanent link
Shashikant Padur (4.2k27) | answered Jan 16 '14, 5:31 a.m.
JAZZ DEVELOPER
 You cannot annotate a local file. Is this a local file that is not checked in to the workspace?

Comments
dennys hsieh commented Jan 16 '14, 5:38 a.m.

It's not local file, I use Jazz RTC's client to sync the code to my local disk. And I can use this command for other project's file.


Actually, we use Sonar to scan code and it will use this command to get who/when check-in the code. I use the command line to debug.


Shashikant Padur commented Jan 16 '14, 5:58 a.m. | edited Jan 16 '14, 5:59 a.m.
JAZZ DEVELOPER

As far as the error message goes, it says the file could not be found in the remote repository workspace.

Can you run 'scm status' from the sandbox just to verify if the file does not shows as unresolved?
Also 'scm list remotefiles <workspace> <component> --depth -' should list all the files in that workspace/component.


dennys hsieh commented Jan 16 '14, 6:12 a.m.

scm status shows following message (only 1 line):

Workspace: (2629) "Test_Workspace" <-> (2630) "Test_Stream> 

and 'scm list remotefiles <workspace> <component> --depth -' shows the error message:
subcommand "remotefiles" requires argument-based initialization, but does not provide a directory argument.

Not sure the meaning of the error message I put workspace and component name for it. I remove depth parameter and still the same.


Shashikant Padur commented Jan 16 '14, 11:28 p.m.
JAZZ DEVELOPER
Can you run the following and paste the output:
scm list components Test_Workspace -r repoUri
or
scm list components 2629 (you can use the alias instead of the name)

scm list remotefiles Test_Workspace Your_component_name -r repoUri --depth -
or
scm list remotefiles 2629 Your_component_alias --depth -

dennys hsieh commented Jan 17 '14, 3:25 a.m.

 Thanks, I don't use alias, just put the original name, is it ok ?


scm list components Test_Workspace -r repoUri (I change "Test_Workspace" to my workspace's name.)
It shows "Invalid repository URI: repoUri. Try 'scm help list components' for more information."



dennys hsieh commented Jan 17 '14, 3:26 a.m.

 scm list components 2629 (I change "2629" to my workspace's name.)

It shows "subcommand "components" requires argument-based initialization, but does not provide a directory argument."

scm list remotefiles Test_Workspace Your_component_name -r repoUri --depth -
(I change "Test_Workspace" to my workspace's name and "Your_component_name" to my component's name.)
It shows "Invalid repository URI: repoUri. Try 'scm help list remotefiles' for more information."

scm list remotefiles 2629 Your_component_alias --depth - 
(I change "2629" to my workspace's name and "Your_component_alias" to my component's name.)
It shows "subcommand "remotefiles" requires argument-based initialization, but does not provide a directory argument."


Shashikant Padur commented Jan 17 '14, 3:56 a.m. | edited Jan 17 '14, 3:58 a.m.
JAZZ DEVELOPER

-r repoUri : replace 'repoUri' text to the repository url you use to connect to your rtc server.


No issues with using either name or alias. If you use alias you do not have to use the -r option. If you use name then you need to specify the -r option.


dennys hsieh commented Jan 20 '14, 1:09 a.m.
cm list components Test_Workspace -r repoUri
=> It works

scm list remotefiles Test_Workspace Your_component_name -r repoUri --depth -
=> It works and shows following log

   ......
  (3110) "COMP_NAME"
  (3111) "COMP_NAME"
  (3112) "COMP_NAME"
  (3113) "COMP_NAME"
  (3114) "COMP_NAME"
  (3115) "COMP_NAME"
   ......
  

dennys hsieh commented Jan 20 '14, 1:09 a.m.

Because there are too many logs, I use ctrl-c and want to run it again.

But when I run the 2 commands again, I got the error

java.lang.NumberFormatException: For input string: "_MBfC4a5LEeKZe"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Long.parseLong(Long.java:410)
at java.lang.Long.valueOf(Long.java:525)
at com.ibm.team.filesystem.cli.core.internal.aliases.AliasLoader.parseLine(AliasLoader.java:150)
 


Shashikant Padur commented Jan 20 '14, 3:08 a.m.
JAZZ DEVELOPER

Looks like the alias file got corrupted for some reason. Could go to the <users home directory>/.jazz-scm and delete the aliases file?


dennys hsieh commented Jan 21 '14, 12:14 a.m.

 After clear the file, it works now. It shows lots of file list, is it correct ?


Shashikant Padur commented Jan 21 '14, 6:20 a.m.
JAZZ DEVELOPER

 Yes, that is fine. What I wanted to check was does it show your Test.java file in the 'list remotefiles' command output? and do you have the same structure in your sandbox with all those files?


dennys hsieh commented Jan 21 '14, 11:58 p.m.

No, I cannot find Test.java in it. And I cannot find thisfile in sandbox (.jazz5/....)

I think it's the root cause?


Shashikant Padur commented Jan 28 '14, 5:54 a.m.
JAZZ DEVELOPER

Your sandbox is not .jazz5. The .jazz5 folder contains the metadata required by RTC and the parent of this folder is your sandbox.

showing 5 of 14 show 9 more comments

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.