From fd696b610ccbc3810e9dceaa62db7cc8e4435083 Mon Sep 17 00:00:00 2001 From: "Joel W. Reed" Date: Wed, 5 Sep 2007 22:54:19 -0400 Subject: [PATCH] tf rename should work now --- ChangeLog | 1 + .../ChangeRequest.cs | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 183d1f6..3935f97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,7 @@ # NEW: support wildcards in checkout paths # NEW: teach tf workspaces command to filter by workspace name if requested # NEW: add syntax guidance to tf help invocations + # BUGFIX: tf rename should work now # BUGFIX: teach diff /modified to check file hashes before reporting a modified file # BUGFIX: when told to delete a directory, delete files within them too # BUGFIX: implement CheckAuthentication call - this makes adding large numbers diff --git a/class/Microsoft.TeamFoundation.VersionControl.Client/ChangeRequest.cs b/class/Microsoft.TeamFoundation.VersionControl.Client/ChangeRequest.cs index 19d652c..7fbdd9c 100644 --- a/class/Microsoft.TeamFoundation.VersionControl.Client/ChangeRequest.cs +++ b/class/Microsoft.TeamFoundation.VersionControl.Client/ChangeRequest.cs @@ -29,6 +29,7 @@ using System; using System.IO; using System.Xml; +using Microsoft.TeamFoundation.VersionControl.Common; namespace Microsoft.TeamFoundation.VersionControl.Client { @@ -114,7 +115,9 @@ namespace Microsoft.TeamFoundation.VersionControl.Client { writer.WriteStartElement("ChangeRequest"); writer.WriteAttributeString("req", RequestType.ToString()); - writer.WriteAttributeString("lock", LockLevel.ToString()); + + if (LockLevel != LockLevel.None) + writer.WriteAttributeString("lock", LockLevel.ToString()); if (RequestType == RequestType.Add) writer.WriteAttributeString("enc", Encoding.ToString()); @@ -124,7 +127,13 @@ namespace Microsoft.TeamFoundation.VersionControl.Client //writer.WriteAttributeString("targettype", TargetType.ToString()); if (!String.IsNullOrEmpty(Target)) - writer.WriteAttributeString("target", Target); + { + // convert local path specs from platform paths to tfs paths as needed + string fxdTarget; + if (VersionControlPath.IsServerItem(Target)) fxdTarget = Target; + else fxdTarget = TfsPath.FromPlatformPath(Target); + writer.WriteAttributeString("target", fxdTarget); + } this.Item.ToXml(writer, "item"); //this.VersionSpec.ToXml(writer, "vspec"); -- 2.11.4.GIT