Duplicates finder (.NET) doesn't work with AccuRev plugin

Hi,

     I was trying to set up a duplicate finder build configuration using AccuRev plugin. It generates the artifacts well and everything seems to work but when you want to see the results the source code doesn't appear as it should. Then when I change the source control to subversion (I have put the same code I have in Accurev but in a subversion server) the duplicated source code appears although the output was done from Accurev code. So it seems that the code browser window is trying to connect to accurev but it can't, and I don't know why becase what it has to show is stored in the xml artifact which is already in the artifacts folder.

     Of course the duplicates works very good with Subversion... generates the artifacts and you can browse the results, but it doesn't work that way with AccuRev.

Could someone help me with this? is there any workaround I can use or something? Or maybe I'm doing something wrong... I don't know.

Thanks a lot,
Alexis.

5 comments
Comment actions Permalink

Hello Alexis,

I have not used the Duplicates finder (.NET) feature before.   Are there any error/warning messages in the logs about the AccuRev plugin failing to find files? If so, can you send them to me so that I can have a look into the issue?

Cheers
  Francois (fgretief _at_ gmail _dot_ com)

0
Comment actions Permalink

Thanks Fracois for you reply.

I couldn't find any error, but what I found was this, if I have two files that have duplicates let's say file1.cs and file2.cs the log in the stdout_<date>.log shows this:

accurev cat -v 120642 -p depot_name "folder1/folder2/folder3/file1.cs"
accurev cat -v 120642 -p depot_name "folder1/folder2/folder3/file2.cs"

but the ouput of those commands is this if you run it directly:
Unknown stream or ver spec: 120642

basically the command should be (assuming version 1 in the stream):

accurev cat -v stream_name/1 -p depot_name "\.\folder1\folder2\folder3\file2.cs"

So I think it should be a problem related to that cat command. I will investigate this again tomorrow.

Thanks,
Alexis.

0
Comment actions Permalink

Francois,

TeamCity duplicates page invokes VcsSupport::getContent method to show duplicate fragments.

Hope this helps.

0
Comment actions Permalink

Hello Alexis,

From your description it looks like Duplicates finder is feeding the wrong version numbers to the VcsSupport::getContent method.  Those -v numbers looks like transaction numbers.  The getContent method in the AccuRev SCM plugin is expecting a stream_name/version pair for each file.

Pavel, how does the Duplicates finder determine the version number of the files?

AccuRev does not use a single repository wide revision number like SVN.  Each file has a unique stream_name/version pair that identifies a specific version of a file.

In the VcsSupport::collectBuildChanges method, I make a stream/version pair when creating a new VcsChange object.  That pair is used when viewing source code in the change history.

Cheers
  Francois

0
Comment actions Permalink

Sorry for delay. Duplicates Tab tries to load file with version reported by VCS plugin in ModificationData object: getVersion() method.

0

Please sign in to leave a comment.