Get Adobe Flash player
Добро пожаловать, Гость
Логин: Пароль: Запомнить меня

the ukraine - REMMONT.COM
(1 чел.) (1) гость
Это необязательный заголовок Форума раздела предложений.
  • Страница:
  • 1

ТЕМА: the ukraine - REMMONT.COM

the ukraine - REMMONT.COM 2 года, 11 мес. назад #399960

  • Monicabymn
  • Вне сайта
  • Завсегдатай
  • Постов: 262
  • Репутация: 0
[color=#5388b4]Powershell tfs - Кабринский Эдуард


<h1>Powershell tfs</h1>
<p>[youtube]</p>
Powershell tfs <a href="remmont.com">World news today live</a> Powershell tfs
<h1> Adventures in Database Administration </h1>
<h2>Monday, December 21, 2015</h2>
<h3>Using Powershell to Manipulate TFS Get Latest, Check In, and Merge</h3>
<p>In our environment, changes made in the Test branch have to travel through the Main branch and into the Release branch to be deployed into production. Sometimes changes need to move through quickly without regard to other changes, especially in an environment where there may be a single coder. <strong>Note: the following code will merge all checked in code regardless of who checked it in. Be careful in multi-coder environments.</strong></p>
<p>While PowerShell is being used to write this process, many of the commands below are actual command line directives. These older, mature commands have more features than the native PowerShell TFS commands and are documented more extensively.</p>
<p>The first line in the PowerShell script should be the Set-Location command. This will set the scripts working location to the location of the TFS workspace. In my instance it is ?C:\Development?.</p>
<p>Next, the comment that I want attached to the ?Check in? of the changed files to each branch.</p>
<p>In order to keep from typing the full path of the TF.exe on each Merge and Checkin, a variable is used to hold the file location.</p>
<p>$CommandLocation = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe "</p>
<p>Since there are multiple branches that need to be merged and checked out, I?m hard coding the GET command for each branch. Basically, it gets the latest version of each file (not including your changes) from each branch. This is done to keep merge confilcts to a minimum.</p>
<p>$GetDevCommand = " get $/ / / /recursive /force " <br />$GetMainCommand = " get $/ / / /recursive /force " <br />$GetReleaseCommand = " get $/ / / /recursive /force "</p>
<p>is the name of the Team Project you are working in under the Team Collection.</p>
<p>is either Dev, Main, or Release in this instance.</p>
<p>is the name of a directory (and possible subdirectories) below the branch. This can be as granular as needed in that can be specified. The /recursive flag recurses through all subdirectories under the and /force causes them to be overwritten.</p>
<p>The same hard coding occurs in the Merge and Checkin commands below</p>
<p>$MergeToMain = " merge $/ / / $/ / / /recursive /version:T" <br />$CheckinToMain = " checkin /comment:$comment /recursive /noprompt ""c:\development\ / / """</p>
<p>$MergeToRelease = " merge $/ / / $/ / / /recursive /version:T" <br />$CheckinToRelease = " checkin /comment:$comment /recursive /noprompt ""c:\development\ / / """</p>
<p>Once you enter the TeamProjectName, Branch, and Directory, the work of moving files in TFS can begin. This is accomplished with the Start-Process command.</p>
<p>By using the ?wait and ?RedirectStandardOutput flags, each command executes sequentially and redirects the output from each command to its own txt file for troubleshooting later.</p>
<p>#Get Lastest Files From Sources Control <br />Start-Process "$CommandLocation" "$GetDevCommand" -wait -RedirectStandardOutput c:\temp\Get-TFS.txt <br />Start-Process "$CommandLocation" "$GetMainCommand" -wait -RedirectStandardOutput c:\temp\Get-TFS.txt <br />Start-Process "$CommandLocation" "$GetReleaseCommand" -wait -RedirectStandardOutput c:\temp\Get-TFS.txt</p>
<p>#Merge and Checkin to Main <br />Start-Process "$CommandLocation" "$MergeToMain" -nonewwindow -wait -RedirectStandardOutput c:\temp\MergePreProd-TFS.txt <br />Start-Process "$CommandLocation" "$CheckinToMain" -nonewwindow -wait -RedirectStandardOutput c:\temp\CheckinPreProd-TFS.txt</p>
<p>#Merge and Checkin to Release <br />Start-Process "$CommandLocation" "$MergeToRelease" -nonewwindow -wait -RedirectStandardOutput c:\temp\MergeProd-TFS.txt <br />Start-Process "$CommandLocation" "$CheckinToRelease" -nonewwindow -wait -RedirectStandardOutput c:\temp\CheckinProd-TFS.txt <br /></p>
<p>In this instance the output for each command is directed to a file the in the C:\Temp directory for viewing later.</p>
<h2>Powershell tfs</h2>

<h3>Powershell tfs</h3>
<p>[youtube]</p>
Powershell tfs <a href="remmont.com">Latest news headlines today</a> Powershell tfs
<h4>Powershell tfs</h4>
Adventures in Database Administration Monday, December 21, 2015 Using Powershell to Manipulate TFS Get Latest, Check In, and Merge In our environment, changes made in the Test branch have
<h5>Powershell tfs</h5>
Powershell tfs <a href="remmont.com">Powershell tfs</a> Powershell tfs
SOURCE: <h6>Powershell tfs</h6> <a href="dev-ops.engineer/">Powershell tfs</a> Powershell tfs
#tags#[replace: -,-Powershell tfs] Powershell tfs#tags#
ssylki.info/?who=remmont.com/lloydspharm...ers-pharmacy-careers ssylki.info/?who=mansions-for-sale.remmont.com ssylki.info/?who=credit-reporting-agencies.remmont.com/news ssylki.info/?who=auto-salvage-yards.remmont.com ssylki.info/?who=best-life-insurance-companies.remmont.com/news
  • Страница:
  • 1
Время создания страницы: 0.16 секунд

Вход и регистрация

Вход на форум

Форум - поиск

Ключевое слово

Статистика

10335873
Сегодня
Вчера
За неделю
Прошл. неделя
Месяц
Прошл. месяц
Всего
2677
1717
2677
10302418
73048
40820
10335873
Ваш IP: 3.138.116.50
Дата: 2024-05-13 16:50:28