Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 303
  • Last Modified:

Visual Studio Team System 2010(Source Control) - Mass code replacement

Hello,

We use Visual Studio Team System 2010(Source Control) to check-in code in our company. I need to replace a table name with a view name in 500 files that reside in the server and check them in. Currently I have to individually check-out each file, replace the table name with the view name and then check them in. This is a very time consuming/tedious/  process.
Is there any more efficient, reliable way through which this job can be achieved?
0
dbaner2
Asked:
dbaner2
  • 2
1 Solution
 
käµfm³d 👽Commented:
IIRC, you should be able to do a Find/Replace on the entire solution. After the replace, check-in the solution and it should recursively check-in all files below it that were modified.
0
 
käµfm³d 👽Commented:
During the Find/Replace, I believe everything will be checked-out accordingly.
0
 
dbaner2Author Commented:
Thanks. I will try doing it and let you know. I will try on a test Solution first. Cant take the risk on the main production files.
0
 
Ryan McCauleyDatabase and Reporting ManagerCommented:
The beauty of having everything checked into source control is that you *can* risk it, since you can always undo your changes before check-in if you make a mistake ;)

If it's all in a single solution, kaufmed's suggestion is the best. If they're spread across different solutions that you can't open them at once, I'd do the find/replace as he suggests, but then use the Visual Studio source control explorer to check in the changes - that way, you can do it all at once, in bulk, and associate that change with a single changeset for all your projects/solutions. If you check-in each solution on its own, then it makes a rollback or the history much more confusing in case you need to make any related changes in the future.

0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now