开发者

VS2010 - How can two or more people edit a use-case file at the same time?

I have a solution written in VS2010. I have a modeling project in this solution about use case. What I want is to allow two or more people to be able to edit the file at the same time. Also, I d开发者_如何学Pythonon't want people to overwrite each other. Instead, I'd like VS2010 to merge their changes. Is this possible in VS2010?


It's not advisable for multiple people to work on the same file at the same time, but if you use Team Foundation Server version control, then take a look at the topic Managing Models and Graphs Under Version Control:

Merging Changes in Model Files and Diagrams

After more than one user has worked on a model concurrently, Team Foundation version control will prompt you to merge the changes in the model files. Working on separate projects as described in the previous preceding sections will avoid most of the merges. Ordinarily, the remaining conflicts can be safely merged automatically. The following kinds of changes should cause no difficulty:

  • Types of lifelines. When you add a lifeline to an interaction (sequence diagram), its type is stored in the root model, unless you have created the lifeline from an existing type.

  • New activities and interactions are initially stored in the root model.

  • Adding elements and relationships.

  • Renaming or deleting elements that are referenced only within their own package.

Working on Shared Modeling Projects

To minimize conflicts between concurrent work on different parts of a project:

  • Divide your modeling project into packages representing different areas of work. Move the entire model into the packages, instead of leaving it in the root model. For more information, see Defining Packages and Namespaces.

  • Different users should not work on the same package or diagram at the same time.

  • If you are using profiles, make sure everyone has installed the same profiles. See Customizing Your Model with Profiles and Stereotypes.

To help ensure that you change only the package that you are working on:

  • Set the LinkedPackage property of a UML class, component, or use case diagram.

  • In UML Model Explorer, drag an activity or interaction into your package as soon as you have created it. This element will appear in UML Model Explorer when you create the first node in the activity or sequence diagram.

  • To help you keep track of packages, rename the package files to reflect the actual package names.

  • In Team Foundation version control, always perform Check In and Get Latest Version operations on the complete modeling project, never on individual files.

  • Always perform a Get operation immediately before you check in the modeling project.

  • Always close all diagrams before you perform a Get operation.

Note If a file is open when you perform a Get, and the operation results in local changes, then you will be prompted to reload the file. In this case, click No, and then reload the complete project. In Solution Explorer, right-click the modeling project node, click Unload Project, and then click Reload Project.


Live editing, like you'd get on Google Docs, isn't possible. If you just want to merge changes once a day I'd recommend a version control system, such as Subversion.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜