repo download all changes for a given topic

1,870 views
Skip to first unread message

ty...@cronologics.com

unread,
Aug 18, 2016, 2:37:15 AM8/18/16
to Repo and Gerrit Discussion
Hey all,

I'm just getting started with repo, and I'm not sure if this feature exists already, but I want to be able to easily download related changes under a certain topic/branch. 

Example:

1. repo start newtopic project1 project2
2. (do some work on project1 and project2 and commit)
3. repo upload -t
4. now you have two changesets, for project1 and for project2.

I want an easy way to download those changesets for both projects in a quick and easy way.

i.e. instead of going into Gerrit, clicking download, copying the download command, cd into project1, paste the download command, then repeat the whole thing for project2, i just want to type:

repo download -t newtopic

and it will find all the changesets that were submitted together for that topic, and download them all at once.

Is this possible, or does it already exist? If it doesn't exist yet, if I work on it, will people want it / merge it into the main project?

Thanks!

Tyler

David Pursehouse

unread,
Aug 18, 2016, 3:52:30 AM8/18/16
to ty...@cronologics.com, Repo and Gerrit Discussion
On Thu, Aug 18, 2016 at 3:37 PM <ty...@cronologics.com> wrote:
Hey all,

I'm just getting started with repo, and I'm not sure if this feature exists already, but I want to be able to easily download related changes under a certain topic/branch. 

Example:

1. repo start newtopic project1 project2
2. (do some work on project1 and project2 and commit)
3. repo upload -t
4. now you have two changesets, for project1 and for project2.

I want an easy way to download those changesets for both projects in a quick and easy way.

i.e. instead of going into Gerrit, clicking download, copying the download command, cd into project1, paste the download command, then repeat the whole thing for project2, i just want to type:

repo download -t newtopic

and it will find all the changesets that were submitted together for that topic, and download them all at once.

Is this possible, or does it already exist?

No, this doesn't exist in repo.  The download command only allows to download explicitly specified changes.
 
If it doesn't exist yet, if I work on it, will people want it / merge it into the main project?

I can see that this would be a useful feature.  I would review it.

 

Dan Willemsen

unread,
Aug 18, 2016, 4:57:20 AM8/18/16
to David Pursehouse, ty...@cronologics.com, Repo and Gerrit Discussion
I could see the use of this, but it would require using Gerrit APIs as far as I can tell. And that's not something we do today, we only go through the git protocol. So it would need some new code for figuring out the proper api endpoint and authentication. But it would make `repo download` less useless in general; today you must specify a patch number (it defaults to 1), since the git protocol can't specify the "latest" patch.

Or, the gerrit download links could be extended to include the information for every change in the topic. `repo download` already supports downloading more than one change at a time by just repeating the "project change#/patch#" syntax.

And there's at least one edge case that's not well handled with repo download today: if there's more than one copy of the same project in the manifest, we just pick the first one to apply the change to. At least with it done manually, the user hopefully has a better idea of which directory to apply the patch to.

- Dan

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Pursehouse

unread,
Aug 18, 2016, 5:06:08 AM8/18/16
to Dan Willemsen, ty...@cronologics.com, Repo and Gerrit Discussion
On Thu, Aug 18, 2016 at 5:57 PM Dan Willemsen <dwill...@google.com> wrote:
I could see the use of this, but it would require using Gerrit APIs as far as I can tell. And that's not something we do today, we only go through the git protocol. So it would need some new code for figuring out the proper api endpoint and authentication. But it would make `repo download` less useless in general; today you must specify a patch number (it defaults to 1), since the git protocol can't specify the "latest" patch.


Indeed.  I said it would be useful, not that it would be easy :)
 
Or, the gerrit download links could be extended to include the information for every change in the topic. `repo download` already supports downloading more than one change at a time by just repeating the "project change#/patch#" syntax.


This would certainly be an easier way to solve it, but it would limit its usability to Gerrit servers having the updated links.
Reply all
Reply to author
Forward
0 new messages