How can I detect if a changeset renames a file?
Lauren Hayward Schaefer (3.3k●1●17●27)
| asked Jun 18 '15, 7:37 a.m.
JAZZ DEVELOPER edited Jun 18 '15, 11:28 a.m. by Krzysztof Kaźmierczyk (7.5k●4●80●103)
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?
|
One answer
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
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.
Comments
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?
The command I use is
lscm resume changeset [changesetId] -t [workspaceId] -r [repoUrl] --overwrite-uncommitted
At any point in the resume process is fine.