public static void UpdateStashedState(StashedState stashedState, StashedStateData stashedStateData) { Verify.Argument.IsNotNull(stashedState, "stashedState"); Verify.Argument.IsNotNull(stashedStateData, "stashedStateData"); stashedState.Index = stashedStateData.Index; }
public static StashedState CreateStashedState(Repository repository, StashedStateData stashedStateData) { Verify.Argument.IsNotNull(repository, "repository"); Verify.Argument.IsNotNull(stashedStateData, "stashedStateData"); Revision revision; lock(repository.Revisions.SyncRoot) { revision = repository.Revisions.GetOrCreateRevision(stashedStateData.Revision.SHA1); } if(!revision.IsLoaded) { UpdateRevision(revision, stashedStateData.Revision); } return new StashedState(repository, stashedStateData.Index, revision); }