Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Draft commits on mercurial

Tags:

I have been committing regularly to a mercurial repo which is managed by Bitbucket. Today when I made a commit as I always do, Bitbucket has marked the commit as "draft" (this has never happened before). Any ideas what a draft commit is?

like image 760
Navin Viswanath Avatar asked Dec 18 '13 02:12

Navin Viswanath


People also ask

How do you squash commits in Mercurial?

Squashing Commits Once the commits are in draft, run the hg histedit rev-id command, specifying the earliest draft commit. This will open the history edit function in your terminal, allowing you to fold the commit messages into one. Select a commit to use as the one into which the others will be squashed.

How do you Uncommit in Heartgold?

A simple way to 'uncommit' your last commit is to use hg strip -r -1 -k. In case the link breaks, the documentation mentioned by @phb states: hg rollback Roll back the last transaction (DANGEROUS) (DEPRECATED) Please use 'hg commit --amend' instead of rollback to correct mistakes in the last commit.


2 Answers

I see the same thing. It looks like there was a change implemented recently to support phases. I fixed this by going into the settings for my repo and 1) turning on "This is a non-publishing repository", 2) Saving, then 3) turning it back off. It may work for you.

like image 144
Chris Simmons Avatar answered Sep 23 '22 01:09

Chris Simmons


A draft is part of the phases framework: https://www.mercurial-scm.org/repo/hg/help/phases

I am not that familiar with this feature, but it would appear as if Bitbucket possibly changed some setting and is now marking public commits as draft.

I too noticed this, but in the last few minutes, it appears as if the system removed the draft label.

like image 35
JoshAdel Avatar answered Sep 22 '22 01:09

JoshAdel