Skip to content

Commit

Permalink
Took out BranchId from the lowest level storage providers
Browse files Browse the repository at this point in the history
  • Loading branch information
cassidydotdk committed May 15, 2021
1 parent 5e53cab commit f623b21
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/Rainbow.Storage.Sc/ItemData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Diagnostics;
using System.Linq;
using Rainbow.Model;
using Sitecore.Data;
using Sitecore.Data.Items;

namespace Rainbow.Storage.Sc
Expand Down Expand Up @@ -58,7 +59,7 @@ public virtual string Path

public virtual string Name => _item.Name;

public virtual Guid BranchId => _item.BranchId.Guid;
public virtual Guid BranchId => ID.Null.Guid; // Disabling any and all BranchId handling for now _item.BranchId.Guid;

public virtual Guid TemplateId => _item.TemplateID.Guid;

Expand Down
9 changes: 6 additions & 3 deletions src/Rainbow.Storage.Yaml/OutputModel/YamlItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public virtual void LoadFrom(IItemData itemData, IFieldFormatter[] fieldFormatte
TemplateId = itemData.TemplateId;
Path = itemData.Path;

BranchId = itemData.BranchId;
// Disabling any and all BranchId handling for now
// BranchId = itemData.BranchId;

foreach (var field in itemData.SharedFields)
{
Expand Down Expand Up @@ -81,7 +82,8 @@ public virtual void WriteYaml(YamlWriter writer)
writer.WriteMap("Path", Path);
writer.WriteMap("DB", DatabaseName);

if (BranchId != default(Guid)) writer.WriteMap("BranchID", BranchId.ToString());
// Disabling any and all BranchId handling for now
// if (BranchId != default(Guid)) writer.WriteMap("BranchID", BranchId.ToString());

if (SharedFields.Any())
{
Expand Down Expand Up @@ -128,7 +130,8 @@ public virtual void ReadYaml(YamlReader reader)
if (branch.HasValue && branch.Value.Key.Equals("BranchID"))
{
reader.ReadMap();
BranchId = Guid.Parse(branch.Value.Value);
// Disabling any and all BranchId handling for now
// BranchId = Guid.Parse(branch.Value.Value);
}

var sharedFields = reader.PeekMap();
Expand Down
6 changes: 3 additions & 3 deletions src/SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[assembly: AssemblyProduct("Rainbow")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("2.1.3.0")]
[assembly: AssemblyFileVersion("2.1.3.0")]
[assembly: AssemblyInformationalVersion("2.1.3")]
[assembly: AssemblyVersion("2.1.4.0")]
[assembly: AssemblyFileVersion("2.1.4.0")]
[assembly: AssemblyInformationalVersion("2.1.4-pre1")]
[assembly: CLSCompliant(false)]

0 comments on commit f623b21

Please sign in to comment.