Renamed file gets shown as added and removed in teamcity

204 views Asked by At

Whenever we rename the file ( rather than delete & add new - to keep history ) using IDE like IntelliJ or any other it shows as renamed from -> to in the changes.

Howerever in Teamcity it will be shown as 'deleted' and 'added'.

Eg case : My Java class name is ValidateTxtFiles.java & I would like to rename it to ValidateTxtAndShFiles.java

Is there any way to achieve this with any teamcity upgrade or using another thirdparty tool on top of teamcity?.

cur. ver used : 7.1.4

1

There are 1 answers

2
Michael12345 On

I wonder if this is a characteristic of your source control system. Which one are you using?

We are using Subversion and I've noticed that renames appear in the Subversion revision history as a Delete followed by an Add. However, the Add log entry has a "Copy from path" which references the path and revision of the file prior to renaming.

We are running TeamCity v 7.1.3 and I just tested this. Teamcity does indeed show two file changes, a Delete then an Add. However, in my case if I expand the detail of these two changes by hovering over the down arrow next to the "2 files", I see the Add has a little comment icon attached to it. If I hover over that, it also shows me original path and revision of the file before renaming.

So, I can tell it was a rename process.

This doesn't pose any problems for us because TeamCity is behaving at least as smart as the Subversion client we use, TortiseSVN. Perhaps your IDE is just too smart. :-)