Combination of incoming + outgoing + status?

954 Views Asked by At

Is there an hg command that will combine hg incoming + hg outgoing + hg status?

This would tell you if there's anything remote that needs to come in, anything committed locally that needs to go out, or any local changes that need to be committed.

5

There are 5 best solutions below

0
On BEST ANSWER

Though you won't get the actual changesets or files, to get the current status summary, use the summary command:

hg summary --remote

Example output:

C:\Temp\repo> hg summary --remote
parent: 5:18ee64a17016 tip
 Added lots of unit-tests for DatabaseConnection.
branch: default
commit: 1 modified                          <-- status
update: 3 new changesets (update)           <-- local status, not at tip
remote: 1 or more incoming, 1 outgoing      <-- incoming/outgoing

Note that you only get counts, not the actual changesets, for that you need to execute the actual incoming or outgoing or status commands.

0
On

It sounds like you want to Generate a Diff Between Repositories.

As for local changes that need to be committed, that's just plain old hg status.

0
On

It sounds like you want to Merge

0
On

Fog Creek software created an extension called "gestalt" which provides the following commands:

  • advice: provides a suggestion of your next step
  • next: provides an overview and explanation of what to do next
  • overview: provides a general overview of your repository state

The public repo for these extensions can be found here.

0
On

I know this is an old question, but since I'm here, I'll just drop a note on my solution to this exact problem. (provided you use bash or equivalent).

I simply defined the following alias in my .profile:

alias hgs='echo;echo "STATUS";hg st;echo;echo "SUMMARY";hg sum;echo;echo "INCOMING";hg inc;echo;echo "OUTGOING";hg out'

(for other shells, you might need a slightly different syntax for defining aliases).

Feel free to modify as required. I also included 'hg summary' in my version, but this is easy to edit out.