Upload new patchset to draft publishes the patchset

371 views
Skip to first unread message

Rich Schmitt

unread,
Apr 5, 2013, 2:53:31 PM4/5/13
to repo-d...@googlegroups.com

If I push a commit as a draft, then update the commit and repush the change, the change transitions from draft to published.

For example

git commit -as -m "test"
git push ssh://review/test HEAD:refs/drafts/master

git commit --amend -as -m "test 2"
git push ssh://review/test HEAD:refs/changes/<change>

The change is no longer a draft.  Is there a way I can upload a newer patchset to a change while leaving the change in the draft state?

We don't use the commit-msg hook and associated commit-id in the commit message.  Does updating a patchset in a draft work when using commit-id?  Or is there some other way to update patchsets in drafts?

Rich

Matthias Sohn

unread,
Apr 5, 2013, 3:36:23 PM4/5/13
to Rich Schmitt, Repo and Gerrit Discussion
why do you push to refs/changes/<change> after amending ?
Try instead to again push to refs/drafts/master, also ensure that the commit message
contains the correct changeId, the easiest way to achieve that is to install the commit-msg
hook [1].


--
Matthias

Rich Schmitt

unread,
Apr 5, 2013, 3:48:16 PM4/5/13
to repo-d...@googlegroups.com, Rich Schmitt

I know about the commit-id way.  We weren't using that approach (for various reasons).  I guess my post is more a question.  Maybe pushing to an explicit change branch doesn't support drafts.  That's would be fine, I'm just wondering if anyone knows for sure.  I can try a test using commit-ids in the commit-msg and see if updated patchsets to drafts leave the review in a draft state.

Matthias Sohn

unread,
Apr 5, 2013, 3:55:52 PM4/5/13
to Rich Schmitt, Repo and Gerrit Discussion
On Fri, Apr 5, 2013 at 9:48 PM, Rich Schmitt <blue6...@gmail.com> wrote:

I know about the commit-id way.  We weren't using that approach (for various reasons).  I guess my post is more a question.  Maybe pushing to an explicit change branch doesn't support drafts.  That's would be fine, I'm just wondering if anyone knows for sure.  I can try a test using commit-ids in the commit-msg and see if updated patchsets to drafts leave the review in a draft state.

I didn't say commit-id but change-Id which isn't the same id.

The "Upload Changes" docu page [1] clearly states that change-Ids should be used for uploading new
patchsets and that pushing to refs/changes/<change> is deprecated. 

Hence I wouldn't be surprised if drafts don't work with this deprecated upload method.


--
Matthias
Reply all
Reply to author
Forward
0 new messages