init: add -o, --origin to name manifest remote
The -o option permits the user to control the name of the manifest's remote, which normally is hardcoded to be 'origin', but can differ because we derive it at runtime from the configuration file. Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
parent
b3d2c9214b
commit
5f947bba69
4 changed files with 40 additions and 15 deletions
|
@ -1442,10 +1442,12 @@ class MetaProject(Project):
|
|||
if self.Exists:
|
||||
cb = self.CurrentBranch
|
||||
if cb:
|
||||
base = self.GetBranch(cb).merge
|
||||
if base:
|
||||
self.revisionExpr = base
|
||||
cb = self.GetBranch(cb)
|
||||
if cb.merge:
|
||||
self.revisionExpr = cb.merge
|
||||
self.revisionId = None
|
||||
if cb.remote and cb.remote.name:
|
||||
self.remote.name = cb.remote.name
|
||||
|
||||
@property
|
||||
def LastFetch(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue