Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect that commits are pushable

In Git it is easy, because remote/branch is pointing to a different commit than branch. How to do it with Mercurial?

like image 968
Mot Avatar asked Nov 25 '11 12:11

Mot


People also ask

How do you check if there are Unpushed commits?

We can view the unpushed git commits using the git command. It will display all the commits that are made locally but not pushed to the remote git repository.

Are commits timestamped?

Git commits are written with timestamps containing the timezone of the machine. Once written, it's not regenerated or changed by normal reading operations.


2 Answers

If you mean seeing what's different between your local repo and the one you're pushing to, try

hg outgoing
like image 135
Mikezx6r Avatar answered Nov 03 '22 00:11

Mikezx6r


Since Mercurial 2.1, there is also a purely local solution: phases. The draft phase is probably what you are looking for. For details, refer to:

https://www.mercurial-scm.org/wiki/Phases

You may find hg phase <rev> and hg log -r "draft()" interesting.

like image 35
mstrap Avatar answered Nov 03 '22 00:11

mstrap