How to make diff/merge windows writable?

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

Moderator: SourceGear

Post Reply
Pawan
Posts: 19
Joined: Wed Apr 28, 2004 12:46 am

How to make diff/merge windows writable?

Post by Pawan » Fri Jun 25, 2004 6:57 pm

Hi,

I looked in the Knowledge base and I removed the commandline in Vault Client - Options: the text which looked like: /ro 2 and /ro 3. It still does not make those windows in my diff or merge window writable.

What is the correct way to make these files writable while I am doing a diff or merge?

Thanks
Pawan

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

Post by dan » Sun Jun 27, 2004 2:03 pm

Without the /ro options, the diff tool honors the read-write status of the files it is diffing/merging. In the case of merge, the right and left files are your baseline file and a temp copy of the repository version, which are probably read-only (as they should be).

Pawan
Posts: 19
Joined: Wed Apr 28, 2004 12:46 am

Post by Pawan » Mon Jun 28, 2004 6:48 pm

I understand that completely. We are finding that even though our local files are checked out and writable, diff tool does not make it writable - the top right corner on the text window does correctly show that the file is writable.

In case of merge, the middle window which is supposed to be the merge output should be a temp file and should be writable - but it is not.

So my question is following: after I have removed those ./ro options, if the diff/merge tool is still not letting me edit those files, is that a known bug or we are doing something wrong?

-Pawan

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

Post by dan » Tue Jun 29, 2004 8:18 am

Pawan wrote:So my question is following: after I have removed those ./ro options, if the diff/merge tool is still not letting me edit those files, is that a known bug or we are doing something wrong?
That would definitely be a bug, but I'm not able reproduce what you are seeing.

When I take the /ro flags out, I can save changes to my working folder, but still can't save changes to other files (baseline files or temp copies of repository versions, because they actually are read-only on the file system).

Basically, with /ro flags out (and there are different arg strings for both diff and merge in the options screen), it is supposed to honor the file system setting for read-only. Have you checked in the actual working folder for whether the file is read-only, or is it possible that it is checked out, and edited, but still read-only for some reason?

Pawan
Posts: 19
Joined: Wed Apr 28, 2004 12:46 am

Post by Pawan » Tue Jun 29, 2004 12:54 pm

So here is what I did:

1. I checked out a file from Visual Studio solution. I can happily modify this file in Visual Studio.
2. I went to Vault and selected file and chose "edit" option and edited it with notepad - it allowed me to change the file. Visual Studio prompted me to reload the file because notepad changed it.
3. In windows explorer, I checked if file was readonly - it is writable.
4. Now I selected "Show differences..." from Vault client. It showed me two panes - left one is repository and right one is my file on disk. It correctly highlighted the changes which I had through notepad.
5. It will not let me edit the right hand side pane which is the file on the disk.

Is this a bug? Are there file "owner" issues?

Thanks
Pawan

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

Post by dan » Tue Jun 29, 2004 2:13 pm

I tried the steps above with VS 2003, and it seemed to work fine. Are you using another version of VS? (It probably wouldn't let Notepad save the file if it were locked by VS though, so that probably not the problem).

Try this: Under the same scenario, choose File->Open New File Diff from within sgdm, and open the same working folder file, and see whether it is writable. That way, we can tell whether the problem is the args passed in, or the file itself.

Pawan
Posts: 19
Joined: Wed Apr 28, 2004 12:46 am

Post by Pawan » Thu Jul 01, 2004 10:04 am

Even when I open the writable file through sgdm -> new file diff (2way), the writable file pane is not writable.

-Pawan

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

Post by dan » Thu Jul 01, 2004 1:28 pm

Hmmm. That doesn't make much sense. Try invoking diff on any two random files and verify it honors the read-write flag on the files. You may want to even inovke sgdm from the vault client folder instead of within Vault itself, and see if that makes any difference.

Pawan
Posts: 19
Joined: Wed Apr 28, 2004 12:46 am

Post by Pawan » Fri Jul 02, 2004 2:37 pm

No - it does not.

What do you really mean by writable? By writable, I mean that I can go to that file pane and start typing anything I want in there. Is writable to you mean that you can click on those little diff "rectangles" in between the space between two panes which indicate the additions, deletions and changes? Or does it mean that I can type in that file pane like I can do in notepad or visual studio?

-Pawan

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

Post by dan » Mon Jul 05, 2004 3:29 pm

Ah, yes, we have different definitions of writable :) sgdm doesn't yet support the ability to edit the file by by hand - just the ability to move content from one pane to the other, and then save the file.

Sorry for the confusion...

Pawan
Posts: 19
Joined: Wed Apr 28, 2004 12:46 am

Post by Pawan » Thu Jul 08, 2004 11:32 am

It will be nice to be able to type in the middle merge window because some of the merges cannot be resolved by clicking on the differences you want. Is it possible for Source Gear to use third party merge tools like WinMerge?

-Pawan

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

Post by dan » Thu Jul 08, 2004 11:59 am

Yes, we do eventually plan to add the ability to type directly into the merge pane.

And yes, you can specify an alternate merge tool. See Tools->Options->Diff/Merge.

Post Reply