ferventcoder/nugetpackages — pull request #48 by mwrock (2012-05-29 04:30:56+00:00)
Title: Better poshgit install and upgrade experience

I made some changes to my own posh-hg package after noticing that upgrading to a new version can break the profile. I made some changes to:

1. Ensure that any previous prompt logic that does not impact the physical prompt itself (eg. setting the window title to the current location) is preserved.
2. Swallow the Write-host/output of all previous prompts
3. Make updates replace the current posh-hg instead of adding the new one to the end

This also makes my posh-git-hg package more robust. If the same logic (in this pull request) could be added to poshgit, posh-git-hg would better handle scenarios where posh-hg is upgraded after posh-git-hg. Curently it would blow away any previous prompt logic. Of course I may be one of the very few impacted since my profile does change the window title to the current directory so my console2 tab names reflect their current directories.

I understand that there is alot of extra logic here (possibly making it morre error prone) for some perhaps insignificant edge cases. So I totally understand if you do not want to take it. I have also included some pester tests. The tests need to be run from the poshgit directory.