start adding something to check the hashes
This commit is contained in:
parent
338018376b
commit
ac57825c10
|
@ -102,11 +102,12 @@ func (pset *Patchs) makePatchSetNew(repo *gitpb.Repo) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return pset.addPatchFiles(repo.GetGoPath())
|
return pset.addPatchFiles(repo)
|
||||||
}
|
}
|
||||||
|
|
||||||
// process each file in pDir/
|
// process each file in pDir/
|
||||||
func (p *Patchs) addPatchFiles(psetDir string) error {
|
func (p *Patchs) addPatchFiles(repo *gitpb.Repo) error {
|
||||||
|
psetDir := repo.GetGoPath()
|
||||||
tmpDir := p.TmpDir
|
tmpDir := p.TmpDir
|
||||||
log.Info("ADD PATCH FILES ADDED DIR", tmpDir)
|
log.Info("ADD PATCH FILES ADDED DIR", tmpDir)
|
||||||
fullDir := filepath.Join(tmpDir, psetDir)
|
fullDir := filepath.Join(tmpDir, psetDir)
|
||||||
|
@ -135,6 +136,7 @@ func (p *Patchs) addPatchFiles(psetDir string) error {
|
||||||
patch := new(Patch)
|
patch := new(Patch)
|
||||||
patch.Filename, _ = filepath.Rel(p.TmpDir, path)
|
patch.Filename, _ = filepath.Rel(p.TmpDir, path)
|
||||||
patch.Data = data
|
patch.Data = data
|
||||||
|
patch.StartHash = repo.DevelHash()
|
||||||
p.Patchs = append(p.Patchs, patch)
|
p.Patchs = append(p.Patchs, patch)
|
||||||
log.Info("ADDED PATCH FILE", path)
|
log.Info("ADDED PATCH FILE", path)
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -10,7 +10,9 @@ message Patch {
|
||||||
string repoPath = 3; // path to the git repo
|
string repoPath = 3; // path to the git repo
|
||||||
string branchName = 4; //
|
string branchName = 4; //
|
||||||
string branchHash = 5; //
|
string branchHash = 5; //
|
||||||
google.protobuf.Timestamp ctime = 7; // the git commit timestamp of the version
|
google.protobuf.Timestamp ctime = 7; // the git commit timestamp of this patch
|
||||||
|
string commitHash = 8; // the git commit hash of this patch
|
||||||
|
string startHash = 9; // the start commit hash
|
||||||
}
|
}
|
||||||
|
|
||||||
message Patchs { // `autogenpb:marshal`
|
message Patchs { // `autogenpb:marshal`
|
||||||
|
|
Loading…
Reference in New Issue