switch to namespace fix send patches

This commit is contained in:
Jeff Carr 2025-08-21 22:35:17 -05:00
parent 6db458b2df
commit 6a1541c132
3 changed files with 14 additions and 5 deletions

View File

@ -187,7 +187,7 @@ func (p *Patchset) addPatchFiles(repo *gitpb.Repo) error {
patch.parseData() patch.parseData()
patch.StartHash = repo.DevelHash() patch.StartHash = repo.DevelHash()
patch.NewHash = "na" patch.NewHash = "na"
patch.RepoNamespace = repo.GetGoPath() patch.Namespace = repo.GetGoPath()
if p.Patches == nil { if p.Patches == nil {
p.Patches = new(Patches) p.Patches = new(Patches)
} }

View File

@ -11,6 +11,14 @@ import (
"go.wit.com/log" "go.wit.com/log"
) )
// makes a new patches protobuf. These are all the patches on your machine.
func NewPatches() *Patches {
x := new(Patches)
x.Uuid = "2679065e-c81d-4a00-aca4-03c158a834fb"
x.Version = "v2.0.0 go.wit.com/lib/protobuf/forgepb"
return x
}
func (f *Forge) SendPatchSet(pset *Patchset) error { func (f *Forge) SendPatchSet(pset *Patchset) error {
var err error var err error
data, err := pset.Marshal() data, err := pset.Marshal()

View File

@ -30,7 +30,7 @@ import "google/protobuf/timestamp.proto"; // Import the well-known type for Time
// git log -1 --format="%H %aI %cI %an %ae %cn %ce" // git log -1 --format="%H %aI %cI %an %ae %cn %ce"
message Patch { message Patch {
string repoNamespace = 1; // the base repo git URL string namespace = 1; // the base repo git namespace
bytes data = 2; // the raw data of the whole patch bytes data = 2; // the raw data of the whole patch
string gH = 3; // after some deliberation, I think I'll just try variable names string gH = 3; // after some deliberation, I think I'll just try variable names
string gT = 4; string gT = 4;
@ -58,9 +58,10 @@ message Patch {
bool upstream = 26; // has this patch been applied upstream? bool upstream = 26; // has this patch been applied upstream?
} }
message Patches { // this is a "PATCH: [1/x]" series `autogenpb:gui:Patch` // this is a "PATCH: [1/x]" series
string uuid = 1; // `autogenpb:uuid:be926ad9-1111-484c-adf2-d96eeabf3079` message Patches { // `autogenpb:marshal` `autogenpb:gui:Patch`
string version = 2; // `autogenpb:version:v0.0.45` string uuid = 1; // `autogenpb:uuid:2679065e-c81d-4a00-aca4-03c158a834fb`
string version = 2; // `autogenpb:version:v2.0.0`
repeated Patch Patches = 3; repeated Patch Patches = 3;
} }