-No concern from the export-manifest side, I think it's great.
-I think that in the most common case where someone would want to use
such a manifest they'll already have an instance inited and synced. I
think in such a case it'd be more convenient to have a repo checkout
command that'd take an exported manifest as an argument, verify that
its structure matches that of the inited instance, and checkout the
appropriate sha-1s.
-I think that capturing the entire information as a real manifest is
valuable, because it's actually self-contained (and in a distance
future it can be used with the patten that you mentioned).
-I wonder what would be the appropriate way for a team to store such
manifests for easy future retrieval. It'd seem that having them
"somewhere" in manifest.git would make the most sense. I'm not sure
what granularity would make sense from a scalability point of view
(daily build per branch, i.e. about a thousand per year, or each
individual change, i.e. tens of thousands per year). If they're stored
as branches, this allows the usual repo init -b syntax to work, and
the counterpart might be repo checkout -b.
That way, as a user, I can see several major scenarios:
-capture a snapshot of my client with repo export-manifest -o
mine.xml, and sync back to if with repo checkout -i mine.xml
-init and sync a tree from an existing snapshot manifest: repo init -u
... -b PLAT-RC33 ; repo sync
-checkout my local tree to match an existing manifest: assuming (repo
init -u ... -b PLAT ; repo sync) at some point in the past, run repo
checkout -b PLAT-RC33.
The command names are entirely made up.
JBQ
--
Jean-Baptiste M. "JBQ" Queru
Android Engineer, Google.
Questions sent directly to me will likely get ignored or forwarded to
a public forum with no further warning.
Thoughts:
-No concern from the export-manifest side, I think it's great.
-I think that in the most common case where someone would want to use
such a manifest they'll already have an instance inited and synced. I
think in such a case it'd be more convenient to have a repo checkout
command that'd take an exported manifest as an argument, verify that
its structure matches that of the inited instance, and checkout the
appropriate sha-1s.
-I think that capturing the entire information as a real manifest is
valuable, because it's actually self-contained (and in a distance
future it can be used with the patten that you mentioned).
-I wonder what would be the appropriate way for a team to store such
manifests for easy future retrieval. It'd seem that having them
"somewhere" in manifest.git would make the most sense. I'm not sure
what granularity would make sense from a scalability point of view
(daily build per branch, i.e. about a thousand per year, or each
individual change, i.e. tens of thousands per year). If they're stored
as branches, this allows the usual repo init -b syntax to work, and
the counterpart might be repo checkout -b.
That way, as a user, I can see several major scenarios:
-capture a snapshot of my client with repo export-manifest -o
mine.xml, and sync back to if with repo checkout -i mine.xml
On Tue, Mar 3, 2009 at 12:56 PM, Shawn Pearce <s...@google.com> wrote:
> What about command name? I'm a bit unhappy about "export-manifest" as a
> command name, it seems long and ugly to me compared to our more simple
> "init" and "sync". But its the best I could come up with.
That's just a name. It's probably not gonna be a command that gets run
manually a lot, and if it is we could always have a short name for it
(e.g. repo em). At least the name is very descriptive.
> Yes. One downside is when we ever get around to doing inheritance
> (http://jira.source.android.com/jira/browse/REPO-3). What do we do when we
> export a manifest that is based on inheritance? Do we flatten it all out
> like I'm doing here in export-manifest, or do we export only parts? It gets
> ugly for everyone, user, repo tool developer, etc.
As far as I can tell "flat" should be enough. Manifests are easy to
use, actually, and can be edited manually, so anything more advanced
can be done by hand.
> This is actually heading into the area where git submodules behave, where
> the submodules are always tagged with specific SHA-1s. Android originally
> said we didn't want to do that, because we wanted to allow the submodules to
> "float" to the current latest version on some named branch. Now we seem to
> be backpeddling into behaving like git submodules where we peg every
> subproject and have to update the manifests anytime the subproject changes?
I'd say that this is an issue of usage, and each project might want to
have different approaches. I personally like to have everything float,
and having the ability to "peg" at the manifest level seems like an
added bonus that will probably give other people some flexibility (if
anything, if it's similar to what git submodules does, it'll provide a
familiar migration path for existing single-tree git users). I think
that the Android side will be mostly interested in being able to
temporarily repo sync to a snapshot, and the sync back to the head.
Compare:
p4 sync @127436 # sync to the perforce state of cupcake at the last export
# Followed by:
p4 sync # sync to the head revision
With
repo sync @44 # sync to the git state of cupcake at the last export
# Followed by:
repo sync # sync to the head
(Yes, I made up that repo syntax, it actually feels out of place, but
the similarity is interesting IMHO).
BTW, I do think that creating the thousands of branches would be
useful, as it'd allow to name them in order, which I know is something
that many people on the Android side are asking for. If we start with
a cupcake client (repo init -u ... -b cupcake), maybe those branches
could be named cupcake@34, cupcake@41, cupcake@44...
JBQ
IMHO, check them into the manifest Git repository. Then you can reference any given snapshot as the commit SHA-1. Making a thousand a day is no big deal, they are just unique commits in the manifest repository.
This is actually heading into the area where git submodules behave, where the submodules are always tagged with specific SHA-1s. Android originally said we didn't want to do that, because we wanted to allow the submodules to "float" to the current latest version on some named branch. Now we seem to be backpeddling into behaving like git submodules where we peg every subproject and have to update the manifests anytime the subproject changes?
What about command name? I'm a bit unhappy about "export-manifest" as a command name, it seems long and ugly to me compared to our more simple "init" and "sync".
BTW, I do think that creating the thousands of branches would be
useful, as it'd allow to name them in order, which I know is something
that many people on the Android side are asking for. If we start with
a cupcake client (repo init -u ... -b cupcake), maybe those branches
could be named cupcake@34, cupcake@41, cupcake@44...
JBQ
--
Jean-Baptiste M. "JBQ" Queru
Android Engineer, Google.
Questions sent directly to me that have no reason for being private
Is there a way to achieve this with repo across all projects?
I was
under the impression that, given two changes done in two different
projects, there was no way to know which one was made before the
other.
I think there's a plan on the Android side to have a reference server
sync in a loop and remember the state after each change as it sees
them (and number those states monotonically). I was just wondering how
useful repo manifest would be in that case, and how much the result
could be stored in manifest.git
JBQ
--
Yeah, my concern with fast-forwarding is that it means that the
numbering of builds wouldn't be unique even on a single machine (and
therefore obviously not globally).
I think there's a plan on the Android side to have a reference server
sync in a loop and remember the state after each change as it sees
them (and number those states monotonically). I was just wondering how
useful repo manifest would be in that case, and how much the result
could be stored in manifest.git
JBQ, convinced.
--
To me this command seems like the tag function of GIT. By saving the
manifest file, you actually take a snapshot of all the projects and
give the snapshot a name.Does it sound this way? However, a GIT tag
will be maintained by GIT. But we have to maintain the "repo tag" by
ourselves.
With the "repo tag" we can easily reproduce the build easily and
exactly. The other thing I am thinking is, we need also a way to know
the differences between two "repo tags" or between one "repo tag" and
current system. For example, which project is added or deleted, which
project is modified.