Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hg diff local to remote file

Tags:

mercurial

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?
like image 568
mtay Avatar asked Mar 30 '11 05:03

mtay


People also ask

What does hg commit do?

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.

What is hg command?

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.

How do you revert in Heartgold?

To revert a file to a specific changeset, use hg revert -r CHANGESET FILENAME . This will revert the file without committing it.


2 Answers

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.

like image 194
Ry4an Brase Avatar answered Nov 13 '22 23:11

Ry4an Brase


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.

like image 23
VonC Avatar answered Nov 13 '22 23:11

VonC