We help IT Professionals succeed at work.

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

dbaner2
dbaner2 asked
on
Medium Priority
315 Views
Last Modified: 2012-05-11
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?
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2015
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2015

Commented:
During the Find/Replace, I believe everything will be checked-out accordingly.

Author

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.
Ryan McCauleySenior Data Architect
CERTIFIED EXPERT

Commented:
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.

Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.