| // Copyright (c) 2015 The LUCI Authors. All rights reserved. |
| // Use of this source code is governed under the Apache License, Version 2.0 |
| // that can be found in the LICENSE file. |
| |
| syntax = "proto3"; |
| |
| package srcman; |
| |
| option go_package = "go.chromium.org/luci/common/proto/srcman"; |
| |
| import "go.chromium.org/luci/common/proto/git/commit.proto"; |
| import "go.chromium.org/luci/common/proto/srcman/manifest.proto"; |
| |
| // ManifestDiff holds basic difference information between two source manifests. |
| message ManifestDiff { |
| // The older of the two manifests. |
| srcman.Manifest old = 1; |
| |
| // The newer of the two manifests. |
| srcman.Manifest new = 2; |
| |
| // Stat indicates how a given item has changed. |
| enum Stat { |
| // These two items are identical |
| EQUAL = 0; |
| |
| // The item was added in `new` compared to `old` |
| ADDED = 1; |
| |
| // The item was removed in `new` compared to `old` |
| REMOVED = 2; |
| |
| // The item is in both, but is incomparable (e.g. repo_url changed from |
| // `old` to `new`). |
| MODIFIED = 4; |
| |
| // The item is in both, and is directly comparable (e.g. different |
| // revisions of the same repo_url). This only applies to the revision fields |
| // of SCM messages. |
| // |
| // This is 0x8 | MODIFIED, so that users who don't care about DIFF v. |
| // MODIFIED can check `Status & MODIFIED`. |
| DIFF = 12; |
| } |
| |
| // Indicates if there is some overall difference between old and new. |
| Stat overall = 3; |
| |
| message GitCheckout { |
| // Indicates if there is some overall difference between old and new. |
| Stat overall = 1; |
| |
| // Indicates the status for the `revision` field. |
| // |
| // If this is DIFF, it is sensible to compute |
| // `git log repo_url old.revision new.revision` |
| Stat revision = 2; |
| |
| // Indicates the status for the `patch_revision` field. It evaluates |
| // the patch_fetch_ref values to ensure that old and new are different |
| // patches from the same CL. |
| // |
| // If this is DIFF, it is sensible to compute |
| // `git log repo_url old.patch_revision new.patch_revision` |
| Stat patch_revision = 3; |
| |
| // The URL that should be used for RPCs. It may differ from the url in old |
| // or new if the service computing this ManifestDiff knows of e.g. a repo |
| // URL migration. |
| string repo_url = 4; |
| |
| // If revision==DIFF, this may be populated with git history occurring |
| // between the two base revisions. |
| repeated git.Commit history = 5; |
| } |
| |
| message Directory { |
| // This is the overall status for this Directory. |
| Stat overall = 1; |
| |
| GitCheckout git_checkout = 2; |
| |
| Stat cipd_server_host = 3; |
| // Note: this will only ever be MODIFIED, because we cannot (yet) determine |
| // if two versions of a cipd package are diffable. We may later implement |
| // DIFF detection (i.e. if both packages use `version:<sha1>` tags). |
| map<string, Stat> cipd_package = 4; |
| |
| reserved 5, 6; |
| } |
| |
| map<string, Directory> directories = 4; |
| } |