Modify a changeset

6 views
Skip to first unread message

Johan de Koning

unread,
Jul 30, 2009, 5:18:46 PM7/30/09
to Repo and Gerrit Discussion
Today I uploaded a change to the Android Repository. But I did not
checked the files correctly and found out that one of the files
contains some strange characters (https://review.source.android.com/
#patch,sidebyside,10889,1,AndroidBoard.mk visible as red).

Is it possible to modify this change? Or should I made a new patch? I
was looking at git push but could not get any results (go errors like
the remote end hung up unexpectedly)

https://review.source.android.com/#change,10889

Jean-Baptiste Queru

unread,
Jul 30, 2009, 5:23:24 PM7/30/09
to repo-d...@googlegroups.com
Assuming that that commit is the last (or only one) in your topic
branch, and that you have no local changes:

-edit local file
-git commit --amend
-repo upload --replace . (and specify 10889 between the brackets if it
doesn't pre-populate for you).

JBQ
--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, Android Open-Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

Shawn Pearce

unread,
Jul 30, 2009, 5:23:39 PM7/30/09
to repo-d...@googlegroups.com

You want to look at the documentation on replacing changes:

http://gerrit.googlecode.com/svn/documentation/2.0/user-upload.html#toc4

Johan de Koning

unread,
Jul 31, 2009, 1:53:03 AM7/31/09
to Repo and Gerrit Discussion
Thanks for the reply. A new changeset is added only the strange
characters are not removed.

On 30 jul, 23:23, Jean-Baptiste Queru <j...@android.com> wrote:
> Assuming that that commit is the last (or only one) in your topic
> branch, and that you have no local changes:
>
> -edit local file
> -git commit --amend
> -repo upload --replace . (and specify 10889 between the brackets if it
> doesn't pre-populate for you).
>
> JBQ
>
> On Thu, Jul 30, 2009 at 2:18 PM, Johan de
>

Johan de Koning

unread,
Jul 31, 2009, 2:16:13 AM7/31/09
to Repo and Gerrit Discussion
Executed the following commands. I have a clean local source tree

repo download platform/vendor/htc/dream-open 10889
git checkout -b 10899
repo start default platform/vendor/htc/dream-open
git reset --hard 10899
git branch -d 10899
change local files
git commit --amend
(comment given to 10899 is shown)
repo upload --replace platform/vendor/htc/dream-open
(fill in 10899 between brackets)

But when i compare the changes on the review server I still see the
strange red line (which contains some strange characters). So nothing
is changed

Jean-Baptiste Queru

unread,
Jul 31, 2009, 8:59:33 AM7/31/09
to repo-d...@googlegroups.com
You forgot to git add your files before your git commit --amend (or
you forgot the -a option for git commit -amend). My bad, I should have
made that more explicit (after a while it becomes so natural that I'm
now forgetting to mention it).

Hint: in a simple workflow where you're only working on one file at a
time, running "git show" before repo upload is a good way to see what
you're about to upload.

JBQ

Johan de Koning

unread,
Jul 31, 2009, 1:37:11 PM7/31/09
to Repo and Gerrit Discussion
Thanks

git commit -a --amend

solved it
Reply all
Reply to author
Forward
0 new messages