From 85f06b0ebf33cbf691ba65a42f41b694aa02fda0 Mon Sep 17 00:00:00 2001 From: "Joel W. Reed" Date: Mon, 15 Oct 2007 10:02:36 -0400 Subject: [PATCH] workspace.default --- ChangeLog | 3 +++ docs/tf.txt | 5 +++++ tools/opentf/Command.cs | 3 +++ tools/opentf/Settings.cs | 1 + 4 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index a89a024..21f46cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,9 @@ # API: Microsoft.TeamFoundation.Common: Artifact, ArtifactId, ILinking LinkFilter, LinkingUtilities, ServiceInterfaces + # add Workspace.Default setting: If the TF client cannot determine the + active workspace, first from the "/workspace:" option, and second the + workspace cache, then it will use the Workspace.Default setting if non-null. 2007-09-07 Joel Reed diff --git a/docs/tf.txt b/docs/tf.txt index c600b0a..ded72ec 100644 --- a/docs/tf.txt +++ b/docs/tf.txt @@ -269,6 +269,11 @@ The TF client stores configuration settings in ~/.tf/TfClient.config. the "/server:" option, and second the workspace cache, then it will use the Server.Default setting if non-null. +*Workspace.Default*:: + If the TF client cannot determine the active workspace, first from + the "/workspace:" option, and second the workspace cache, then it will + use the Workspace.Default setting if non-null. + WORKSPACE CACHE --------------- The TF client keeps a cache of workspaces and folder mappings in diff --git a/tools/opentf/Command.cs b/tools/opentf/Command.cs index 06921ad..181283f 100644 --- a/tools/opentf/Command.cs +++ b/tools/opentf/Command.cs @@ -88,6 +88,9 @@ abstract class Command : CommandOptions if (info != null) name = info.Name; } + if (!String.IsNullOrEmpty(name)) + name = Settings.Current.Get("Workspace.Default"); + if (String.IsNullOrEmpty(name)) { Console.WriteLine("Unable to determine the workspace"); diff --git a/tools/opentf/Settings.cs b/tools/opentf/Settings.cs index c1a6a3d..48c6c3f 100644 --- a/tools/opentf/Settings.cs +++ b/tools/opentf/Settings.cs @@ -66,6 +66,7 @@ public class Settings : SortedList Add("History.StopAfter", "256"); Add("Online.Recursive", "false"); Add("Server.Default", ""); + Add("Workspace.Default", ""); initialized = true; -- 2.11.4.GIT