CHOULANT Noham

Hello,
I would wish to update some files between two branche with API TFS
Thank you



Re: Team Foundation Server - Version Control update some files

pc152

Ok

Sorry for my english ;)

I want update one or two files between branch, no check-in only some files. Have you example please

Thank you





Re: Team Foundation Server - Version Control update some files

James Manning - MSFT

I think you're going to have to be more detailed on exactly what you want to have happen. Updating files in branches either happens for your local workspace copies (pend an edit with PendEdit, then modify the files) or on the server (checkin your pended edits). Since you're saying "between branch(es)", it sounds like you then want to merge the changes between 2 branches, which means to use the Merge API and then check those in.

Can you give a detailed example of what you're talking about That may be easier for me to follow. Thanks!






Re: Team Foundation Server - Version Control update some files

CHOULANT Noham

Ok

I have two developers (Dev1 and Dev2).
I have two branches (BRANCH1 and BRANCH2).

When Dev1 does one check-in, I list the files to modify (Files1.cs, Files2.cs).
When Dev2 does one check-in, I also list the files to modify (Files3.cs, Files4.cs).

I would wish to be able to update on BRANCH1 only the files (Files2.cs, Files3.cs) which were modified on BRANCH2.

Thank you




Re: Team Foundation Server - Version Control update some files

James Manning - MSFT

Is BRANCH2 a branch of BRANCH1 or vice-versa If I'm understanding you correctly, you want to merge the changes from branch2 to branch1 - from the command-line, that would be "tf merge branch2 branch1 /r" and from the OM it will be the call to workspace.Merge.

If they don't have a direct branch relationship, you'll need to either merge the changes to their common branch first and check them in there *or* do a baseless merge to get the changes over.






Re: Team Foundation Server - Version Control update some files

CHOULANT Noham

BRANCH2 is a branch of BRANCH1.

A fusion implies to amalgamate all the file modified of the BRANCH2 towards the BRANCH1. Whereas I do not want to amalgamate some files.




Re: Team Foundation Server - Version Control update some files

James Manning - MSFT

You can either specifically merge the desired files themselves by path, or after pending the merge, undo the changes that you don't want merged over. The latter can be easier since merging by specific file path can be fragile (won't work in many cases) if there are renames involved.




Re: Team Foundation Server - Version Control update some files

CHOULANT Noham

Ok Thank you for your help, I merging by specific file path.

Thank you