feature request: git merge proposal refs/pull (github) or refs/changes (gerrit) function
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned |
Bug Description
Hi,
Often times when reviewing merge proposals I want to see the difference between two versions.
Example:
a.) user pushes initial code
b.) reviewer reviews and requests changes
c.) user pushes ammended changes
'c' is easy enough if the user just added commits on top of 'a'. Often
times, though, the developer does 'git commit --amend'.
The launchpad seems to have access to the older tip, and with the selection
box you can flip between the versions, but It would be nice to be able
to see those commits locally.
As example:
https:/
there, the developer Lars has several different versions of the merge proposal
and those can be selected via 'Preview Diff'
but there is no way I can get the old version from a 'git fetch'.
I want access to see what dd61338 looked like (or 74671dc or 288fbfe).
All I can currently get is the most recent commit (68c2ca5).
gitweb can still see the old commits:
https:/
So this is a feature request really for two things:
a.) some namespace that contains merge proposals for a project (like github's
refs/pull/NUMBER) this makes it easy to fetch merge proposals for reviewing
locally with a git config like:
[remote "myproject"]
url = https:/
fetch = +refs/heads/
fetch = +refs/pull/
b.) access to different versions of the merge request.
I can't find a way to get this info from github, but gerrit does have it.
As an example:
https:/
$ git ls-remote | grep 83/400883
From https:/
51f005cdc012d36
e3abbee44f24523
705db9879a20114
0d1f9b4d9d160b4
0892c10388b35bb
b3bb055ffdd0ed0
f347852f355d4b2
f559be35a03f580
So comparing two different versions of the change there is just
git diff refs/changes/
function like is available in gerrit, but seemingly not available in github
tags: | added: feature git lp-code |
Changed in launchpad: | |
importance: | Undecided → Low |
status: | New → Triaged |
I came across another use case for this (or at least a related feature).
Often times a user will make a merge proposal, the code gets reviewed,
'Approved', and then the commits in the MP are squashed and rebased before
being added to trunk.
At that point, the requester has a branch that contains more "rich" history
than the master branch. If the user ever deletes that branch, then the history
is not available to anyone outside of the launchpad UI.
I came to this when looking at a ubuntu-git merge proposal: /code.launchpad .net/~paelzer/ ubuntu/ +source/ open-iscsi/ +git/open- iscsi/+ merge/346739
https:/
Because Christian's branch was still available I was able to rebase his commits xenial- devel). This would not have been possible if Christian had
(originally done on ubuntu/devel onto a stable release branch
ubuntu/
deleted his branch in a house-cleaning.
Heres what I did:
# create the branch and set its HEAD to christian's MP branch. cosmic- fix-1755858- socket- activation to=pkg/ ubuntu/ xenial- devel $BRANCH
# then make it track a Stable release branch.
$ git branch $BRANCH paelzer/
$ git branch --set-upstream-
# checkout branch and rebase. 2.0.874- 5ubuntu2
$ git checkout $BRANCH
$ git rebase -i pkg/import/
If 'refs/changes/' like branches were available I could have substituted changes/ 346739/ FINAL cosmic- fix-1755858- socket- activation above.
refs/
for paelzer/