This may be a silly question but when comparing a local to remote file, what is the path to the remote file?
Does hg want you to provide the head/revision you are referring to or something?
ie:
hg diff /local/file /remote?/file?
Use the command hg update to switch to an existing branch. Use hg commit --close-branch to mark this branch head as closed. When all heads of a branch are closed, the branch will be considered closed.
A quick overview of the basic commands: hg init: create a new repository. hg commit: save your changes in the current repository. hg log: see all changes in your repository. hg pull: get all changes from another repository into the current one.
To revert a file to a specific changeset, use hg revert -r CHANGESET FILENAME . This will revert the file without committing it.
Mercurial doesn't do this. The only comparison with other repositories is hg incoming
and hg outgoning
which show which changesets differ between repositories. You can add the --patch
option to either of those to see the patches that are the meat of those changesets, but you can't compare two versions of a file without having them in the same local clone.
From Hg man
hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
I am not sure if you can speak about a "remote file" in a DVCS: you need to fetch or clone a remote repo in order to be able to make any hg diff
.hg fetch
, for instance, is described here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With