It's all about the answers!

Ask a question

How can I detect if a changeset renames a file?


Lauren Hayward Schaefer (3.3k11727) | asked Jun 18 '15, 7:37 a.m.
JAZZ DEVELOPER
edited Jun 18 '15, 11:28 a.m. by Krzysztof Kaźmierczyk (7.5k480103)
I'm using the CLI, and I need to detect if any of the files in the changeset I'm about to resume have been renamed (specifically if the capitalization in the filename has been renamed).  How can I detect file renames?

Comments
Krzysztof Kaźmierczyk commented Jun 18 '15, 11:21 a.m.

hi Lauren,
Can you provide the current command you are using to resume? Also do you want to see if the changeset has the changes before resuming it? Or it is ok during resume?



Lauren Hayward Schaefer commented Jun 18 '15, 12:45 p.m.
JAZZ DEVELOPER

The command I use is
lscm resume changeset  [changesetId] -t [workspaceId] -r [repoUrl] --overwrite-uncommitted

At any point in the resume process is fine.

One answer



permanent link
Melissa Kivisto (2871121) | answered Jul 15 '15, 11:47 a.m.
You can try using --json with scm status before resuming, and look for
                                        "move": true,
string.  If it is found, you can further examine the string to check for the case change:
                                    "new-path": "\/Xyz.txt",
                                    "path": "\/xyz.txt",
(this is of course assuming that the file was renamed using scm move.  Otherwise, you'd look for the file deletion and addition).

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.