Author Topic: Add files, adding tree will duplicate files already in the project  (Read 2727 times)

ehoffman

  • Community Member
  • Posts: 23
  • Hero Points: 1
SlickEdit Pro 2015 (v20.0.1.3 64-bit)

Hello, can you confirm this bug?

If you add a tree to a project, then the files will be duplicated in the project.

Steps:
- For example, I have C:\TMP with 3 files, file1.txt, file2.txt, file3.txt.
- I then create a workspace, and a project, and add the C:\TMP directory (Add tree, C:\TMP\*.*)
- I can see that the project contains the 3 files, and if I go back to project properties, I see the 'Files' tab contains the 3 files.
- Now, I add tree again, and re-select the 'C:\TMP\*.*'.  Click OK to add the tree.
- The project still show the same 3 files.  But if I go back to project properties, I now see that the project contains 6 files (each of the files are duplicated).

I can do that over and over, and each time, the files get duplicated once more.

If I click on 'Add tree...' from the project properties, then after each time I add the tree, the project manager window seems to clean-up the duplicates, but it does not.  If you just close and re-open the project properties dialog, all the duplicates will be there again.

The project file (the .vpj) will show the duplicate entries.

This does not seem to impact the tagging (no duplicates when doing reference search for example).

This is new to SE 2015, was not present in SE 2014.  Adding a tree would only add a file to the project if it was not already present.  And if you do this in SE 2015, from the Project properties dialog, you do see that the project properties show no duplicates (immediately after adding the tree, not if you close and re-open the project properties).  Adding a tree over and over is very common and important, especially to update a project tree in a dynamic multi-developer environment with SVN where developers commit new files in a large project.

Best regards,
Eric


Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: Add files, adding tree will duplicate files already in the project
« Reply #1 on: February 12, 2016, 03:17:33 pm »
I can confirm this issue.  I am investigating this, but it may not be hotfixable and might have go into the next release.   

JimmieC

  • Senior Community Member
  • Posts: 424
  • Hero Points: 16
Re: Add files, adding tree will duplicate files already in the project
« Reply #2 on: February 12, 2016, 03:22:15 pm »
This may only be with the *.* wildcard. I repeatedly add trees because I have added a couple of files to a project. So far, I have not noticed any file duplication in the project properties window or the file list. However, I am using file scope restrictions of:

*.c;*.cpp;*.h;*.asm;*.elf;*.s;*.map;*.cmd;*.lib;*.bat;*.cfg;*.mcp;*.lib;*.xmap

Regards,
Jim

ehoffman

  • Community Member
  • Posts: 23
  • Hero Points: 1
Re: Add files, adding tree will duplicate files already in the project
« Reply #3 on: February 15, 2016, 04:21:54 pm »
I tried with non-"*.*" and it does the same thing.

JimmieC, indeed, there is no duplicate in the project tree (in the "Projects" pane), but if you go to "project properties", you should see the number of files in the project increasing every time.

Regards,
Eric

Edit: By the way, thank you Lee for confirming.  A reproduced issue is an issue already half-solved :)
« Last Edit: February 15, 2016, 04:23:46 pm by ehoffman »

davew

  • Senior Community Member
  • Posts: 224
  • Hero Points: 6
Re: Add files, adding tree will duplicate files already in the project
« Reply #4 on: April 15, 2016, 04:57:32 pm »
I am seeing this problem as well, with a little different twist.

When creating a project using Add Tree, there were 12,000+ files added and I clicked OK.
Then when I went back into the Project Properties dialog, it said I had 40,000+ files.
When looking through the files, the ones at the beginning of the list were duplicated once and the further down the list I looked the number of duplicates grew. At the end of the list, files were being duplicated 4 times (5 entries for the same file).

This is all without doing Add Tree a second time.

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: Add files, adding tree will duplicate files already in the project
« Reply #5 on: April 15, 2016, 06:21:52 pm »
Yes, that issue was discovered in v20.0.1, and there is a fix to address the issue in the latest release v20.0.2.  See details here: https://community.slickedit.com/index.php/topic,13242.0.html

Updating to v20.0.2 will prevent any further duplicates from being inserted into projects using the add tree.  I am attaching a batch macro that will cleanup the current open workspace, it will prompt you for any project that contains duplicate file entries and remove them.  To use, download the attached macro, and on the SlickEdit command-line (Esc in most emulations) type:  xcom <path to download file>\RemoveProjectDuplicates.e.  All projects in the current workspace will be checked, duplicate file entries removed, and saved.

davew

  • Senior Community Member
  • Posts: 224
  • Hero Points: 6
Re: Add files, adding tree will duplicate files already in the project
« Reply #6 on: April 15, 2016, 06:50:45 pm »
Ah, thanks Lee. I missed that update.