Bug when trying to add files with identical filenames?

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Guest

Bug when trying to add files with identical filenames?

Post by Guest » Thu Jan 13, 2005 8:54 am

Hi,

I think I have discovered another bug in Vault 3.0.0 (2752).

I've added one of my projects to Vault. The project's root folder ($\Project) contains a file called "Index.html". Some time later I created a sub folder ($\Project\Docs), to which I wanted to add a file that's also called "Index.html". Although this file has the same filename as the first one, it's a different file with a different contents. But when I use Vault's "Add Files/Folders" function the "Index.html" file isn't shown! All other files at that location are in the list, but files that have the same filename as files currently managed by Vault seem to be filtered out. So I'm unable to add another file to Vault that has the filename "Index.html".

Note that when I create the whole folder tree in one add operation it all works fine. So when I use the "Add Files/Folders" dialog to add the whole directory tree of my project (which contains both "index.html" files) it works perfectly. But when I try to do this in separate steps it fails.

I hope you understand what I mean and can reproduce this behaviour.

GregM
Posts: 485
Joined: Sat Mar 13, 2004 9:00 am

Post by GregM » Thu Jan 13, 2005 9:37 am

Did you click on the right project ($/Project/Docs) before using the Add Files function? Add Files only adds them to the selected project.

lzandman
Posts: 16
Joined: Thu Jan 06, 2005 8:34 am
Location: Groningen, The Netherlands

Post by lzandman » Fri Jan 14, 2005 7:30 am

GregM wrote:Did you click on the right project ($/Project/Docs) before using the Add Files function? Add Files only adds them to the selected project.
No, I didn't do it that way, because at that particular moment the Docs subfolder didn't yet exist in Vault. Normally I only create the project's root folder manually and add additional subfolders by using the "Add Files/Folders" dialog. As you know this replicates your drive's folder tree in Vault. If I would use the method you suggest (which actually does work!) I'd first have to manually create all subfolders in Vault and use the "Add Files/Folders" function on each of those folders to add the files. Imagine having a large project with a lot of subfolders...

So I think there's still a bug in Vault's "Add files/folders" dialog. Let me explain by describing what I did:

I created the $/Project folder manually in Vault and added the initial project files to it. One of these files was called "Index.html". After a couple of days I added the Docs subfolder to my project (on my hard disc). This folder also contained a file called "Index.html". Ofcourse I wanted to add this folder to my project in Vault, so I right clicked the $/Project folder in Vault and selected the "Add Files/Folders" function. In the resulting dialog I placed a checkmark before the Docs folder and pressed OK. The Docs folder was correctly created in Vault and all files were added to it, except for the "Index.html" file!

So it appears Vault filtered out the "Index.html" file, because the folder for which I started the "Add Files/Folders" dialog already contained a file with that name. This behaviour would be correct if I planned on adding the file to $/Project, because otherwise I would overwrite the file that was already there. But in my case the file would end up in $/Project/Docs, so there wouldn't be any problem and Vault would have no reason to filter out the file! I really think this is a bug.

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Fri Jan 14, 2005 8:54 am

There are two ways to add files in the Vault GUI client - the Add Files/Folders command the Detect New Files commands.

Add Files/Folders adds selected files and folders to the place where you invoked it from, regardless of where on your local hard disk you get the files from. So, the behavior you are getting is correct - if you selected $/Projects, Index.html is not available to add from anywhere, because it would add it $/Projects, and there is already a file there with that name.

You might want to try the "Detect New Files" command. It only works on working folders, and puts files that are deeper in the tree into the place in the repository that corresponds to the working folder structure. So, if you invoked it on $/Projects, and then chose Docs/Index.html to be added, it would add it to $/Projects/Docs/Index.html.

It's a bit confusing to describe, but notice in the Add dialog at the bottom where it says the files are to be placed into the repository to get a better idea of how it works.

GregM
Posts: 485
Joined: Sat Mar 13, 2004 9:00 am

Post by GregM » Fri Jan 14, 2005 9:01 am

Ah, I didn't get from your initial post that you added "Docs" to $/Project, it sounded like you were trying to add just "Index.html".

lzandman
Posts: 16
Joined: Thu Jan 06, 2005 8:34 am
Location: Groningen, The Netherlands

Post by lzandman » Fri Jan 14, 2005 10:06 am

dan wrote:Add Files/Folders adds selected files and folders to the place where you invoked it from, regardless of where on your local hard disk you get the files from. So, the behavior you are getting is correct - if you selected $/Projects, Index.html is not available to add from anywhere, because it would add it $/Projects, and there is already a file there with that name.
I'm sorry, but I have to disagree with you. I just did another test where I created the following files/folders on my hard disc:
C:\Project
C:\Project\Index.html
C:\Project\Docs
C:\Project\Docs\Index.html
C:\Project\Docs\Readme.txt
I put this project into Vault in two steps:

First I create a new folder in Vault called $/Project. From that folder I invoke the "Add Files/Folders" dialog and add the Index.html file. Vault now has the following contents:
$/Project
$/Project/Index.html
So far, so good. Now I add the Docs folder to the Project folder. Again I invoke the "Add Files/Folders" dialog from the Project folder and put a checkmark in front of the Docs folder. After pressing OK Vault contains the following files:
$/Project
$/Project/Index.html
$/Project/Docs
$/Project/Docs/Readme.txt
As you can see the Index.html file was skipped. You claim this has happened because else $/Project/Index.html would be overwritten. But why? The Index.html file in the Docs folder is is located at the same level as the Readme.html file. So I would expect the contents of Vault to be this:
$/Project
$/Project/Index.html
$/Project/Docs
$/Project/Docs/Readme.txt
$/Project/Docs/Index.html
As you can see from the above the original Index.html wouldn't be overwritten at all, because they would end up in a different folder! If what you say is right, Vault should have put the Readme.txt file in $/Project/Readme.txt.

I'm still convinced there's something wrong here...

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Fri Jan 14, 2005 10:23 am

Ah, I see what is happening. The problem is that if you add a folder that contains the same file name (at the top level) as a file that exists in the folder you invoked it from, that file doesn't get added. That's a mouthful to say :) Any index.html files below the doc level should get added however - it is just the top level where there is a problem.

Yes, I will add this as a bug - thanks for reporting it.

GregM
Posts: 485
Joined: Sat Mar 13, 2004 9:00 am

Post by GregM » Fri Jan 14, 2005 10:57 am

Hey, yeah, that happened to me the other day too. I added a folder, and the stdafx.cpp and stdafx.h in it didn't get added. I thought maybe I had done something wrong, and didn't pursue it any further. At least now I know why that happened.

lzandman
Posts: 16
Joined: Thu Jan 06, 2005 8:34 am
Location: Groningen, The Netherlands

Post by lzandman » Fri Jan 14, 2005 12:34 pm

Good to see that you finally understand what I mean :)

It took an awful lot of typing :shock: :)

christian
Posts: 202
Joined: Tue Sep 14, 2004 1:02 pm
Location: UK

Post by christian » Mon Jan 24, 2005 3:28 am

dan wrote: Yes, I will add this as a bug - thanks for reporting it.
Hi Dan,
Just reviewing the support forums and came across this thread. In my books this is a **MAJOR** bug. If we can't rely on Vault to correctly add ALL files then we're stuffed with source control. This really needs to be given first priority. I'm just glad I ran into this posting as at least now I can manually check all files have been added.

Can you say when this will get fixed?
Thanks
Christian

lzandman
Posts: 16
Joined: Thu Jan 06, 2005 8:34 am
Location: Groningen, The Netherlands

Post by lzandman » Mon Jan 24, 2005 10:00 am

christian wrote: In my books this is a **MAJOR** bug. If we can't rely on Vault to correctly add ALL files then we're stuffed with source control.
I agree. I didn't emphasize on it in my previous posts, but I discovered the bug because one of my projects turned out to be incomplete. Luckely for me I am still only evaluating Vault and not actually depending on it in my daily workflow yet.
What's the Speed of Dark?

christian
Posts: 202
Joined: Tue Sep 14, 2004 1:02 pm
Location: UK

Post by christian » Mon Jan 24, 2005 10:03 am

We're about to pull the plug on source safe this week but something like this may mean we delay until this issue is fixed.

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Mon Jan 24, 2005 11:02 am

We'll be looking at this soon - if we can't get it into a dot release, it will make it in 3.1.

Until then, the workaround is to add those files in a separate transaction.

christian
Posts: 202
Joined: Tue Sep 14, 2004 1:02 pm
Location: UK

Post by christian » Mon Jan 24, 2005 11:34 am

dan wrote:We'll be looking at this soon - if we can't get it into a dot release, it will make it in 3.1.
Hi Dan,
Do you have an estimate on when this bug fix will be released assuming its to go into vs 3.1?
Thanks

lzandman
Posts: 16
Joined: Thu Jan 06, 2005 8:34 am
Location: Groningen, The Netherlands

Post by lzandman » Thu Sep 01, 2005 2:36 am

It's been a while since I posted this bug. Has it been fixed? I couldn't find a reference to this bug in the release notes of the last couple of Vault releases.

Not that it matter for us though, because we decided to switch to Subversion instead of Vault. But I'm just curious and if this (important) bug hasn't been fixed it deserves some extra attention :)
What's the Speed of Dark?

Post Reply