Skip to content

Commit

Permalink
add copy svn path to not committed files
Browse files Browse the repository at this point in the history
  • Loading branch information
Reis Moritz (IFAT DCGR ATV PTS PMO / EE) authored and Reis Moritz (IFAT DCGR ATV PTS PMO / EE) committed Feb 25, 2020
1 parent 9d2400f commit f2bda1b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
6 changes: 3 additions & 3 deletions InstallerSVNPathCopy/InstallerSVNPathCopy.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -462,15 +462,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:SVN Path Copy"
"ProductCode" = "8:{878B2B18-E643-4D64-BDF6-7D50A0DD7ABA}"
"PackageCode" = "8:{46916B4D-4E9F-46D0-9F09-1D215C89F205}"
"ProductCode" = "8:{AD837D7B-AD04-4150-9AA3-C7AE7F3CC515}"
"PackageCode" = "8:{553FB412-2487-48B9-B7B1-0F88D132A7CE}"
"UpgradeCode" = "8:{124C8FD5-AE5B-43DB-B3A3-30393442E0A6}"
"AspNetVersion" = "8:2.0.50727.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:TRUE"
"ProductVersion" = "8:1.1.0"
"ProductVersion" = "8:1.2.0"
"Manufacturer" = "8:SVNPathCopy"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:https://github.com/clFaster/SVNPathCopy"
Expand Down
4 changes: 2 additions & 2 deletions SVNPathCopy/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
[assembly: AssemblyVersion("1.2.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]
11 changes: 8 additions & 3 deletions SVNPathCopy/SVNPathCopy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ private bool IsFileOrFolderInSVNRepo()
return true;
}

private bool IsCopySVNPathPossible()
private bool IsCopySVNPathPossible(bool withRevision)
{
using (SvnClient svnClient = new SvnClient())
{
SvnStatusArgs svnStatusArgs = new SvnStatusArgs
{
Depth = SvnDepth.Empty
Depth = SvnDepth.Infinity
};
svnClient.GetStatus(SelectedItemPaths.First(), svnStatusArgs, out Collection<SvnStatusEventArgs> states);
if (states.Count == 0)
Expand All @@ -56,6 +56,11 @@ private bool IsCopySVNPathPossible()
}
if (states.Count != 0 && !states.First().IsRemoteUpdated)
{
if (withRevision == false)
{
// Copy SVN Path without revision even if not committed changes!
return true;
}
MessageBox.Show("Item is scheduled for addition - please commit your changes", "Error");
return false;
}
Expand Down Expand Up @@ -84,7 +89,7 @@ private String GetSVNURI(bool withRevision)

private void CopySVNPath(bool withRevision)
{
if (IsCopySVNPathPossible())
if (IsCopySVNPathPossible(withRevision))
{
Clipboard.SetText(GetSVNURI(withRevision));
}
Expand Down

0 comments on commit f2bda1b

Please sign in to comment.