From d60ad7cb3177d251ba503562f39f0897a9b52929 Mon Sep 17 00:00:00 2001 From: "Joel W. Reed" Date: Mon, 26 Nov 2007 16:55:20 -0500 Subject: [PATCH] BUGFIX: tf online shouldn't croak if is an add awaiting + its first checkin --- ChangeLog | 2 ++ tools/opentf/OnlineCommand.cs | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index b6cf9da..eaa06c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,8 @@ # NEW: 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. + # BUGFIX: tf online shouldn't croak if is an add awaiting + its first checkin # BUGFIX: tf undo shouldn't undo all local changes # BUGFIX: when parsing changeset and shelveset datetimes don't drop the time portion diff --git a/tools/opentf/OnlineCommand.cs b/tools/opentf/OnlineCommand.cs index 503d2b6..bea0ccd 100644 --- a/tools/opentf/OnlineCommand.cs +++ b/tools/opentf/OnlineCommand.cs @@ -69,6 +69,14 @@ class OnlineCommand : Command { bool isReadOnly = (FileAttributes.ReadOnly == (File.GetAttributes(path) & FileAttributes.ReadOnly)); + // if a path is in the itemList but has a null hash skip any further processing + // the file is an add awaiting its first checkin + if (itemList[path] == null) + { + Console.WriteLine("Previously added: " + path); + return; + } + if (!itemList.ContainsKey(path)) { if (OptionAdded) -- 2.11.4.GIT