1

I am trying to use mercurial and work with multiple pull repos and a single push repo.

I have tried changing the .hg/hgrc and is as given below:

[paths]
default = remoteA
mine = remoteB
default-push = remoteB

How do I check for changes in my working directory when compared to the remoteB repo? I tried using hg status but this checks for diffs between the default repo and working directory.

1

It sounds like you are looking for hg outgoing.

You use hg status to see lists of changed files. You can compare either two commits against each other — this shows you what files changed from revision 10 to 20:

$ hg status --rev 10:20

or your can compare the working copy against a revision — this shows you changes made compared with the working copy parent revision:

$ hg status

and this shows you changes since revision 10:

$ hg status --rev 10

When you work with multiple repositories, then you can hg pull the changes from another repository into your local repository. You can then use hg status like above to compare revisions. You can also use hg log to see what has changed.

Using hg incoming is just like first using hg pull and then using hg log to list the new commits. That is normally the command used to see what is new in a remote repository. You can then later decide to actually pull the commits into your repository.

4
  • I tried using hg outgoing but I guess it does not seem to recognize any new unversioned files. Is this true or am I doing it wrong? – lordlabakdas May 7 '14 at 18:26
  • Notice the big difference between comparing files and looking at changesets. The hg outgoing command is showing you changesets, and will thus by definition only care about committed files. – Martin Geisler May 7 '14 at 19:05
  • aah, right. The hg outgoing does work in showing a changeset status. If I were understanding this right if my default remote is atleast a changeset in the future, thats when a hg incoming be useful. – lordlabakdas May 7 '14 at 19:50
  • Yes, exactly, hg incoming shows what the next hg pull would bring down (and hg outgoing shows what hg push would send). – Martin Geisler May 7 '14 at 20:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.