Size: 1146
Comment: +links
|
Size: 1229
Comment: Mention rdiff extension
|
Deletions are marked like this. | Additions are marked like this. |
Line 17: | Line 17: |
MYTIP=`hg tip --template "rev"` | MYTIP=`hg tip --template "{rev}"` |
Line 31: | Line 31: |
This grabs a bundle of incoming changes then overlays the bundle on your current repository (see [:LookingIntoBundles]) to generate the diff. If the diff is agreeable, you can unbundle the repo to make the changes permanent. | This grabs a bundle of incoming changes then overlays the bundle on your current [:Repository:repository] (see [:LookingIntoBundles]) to generate the diff. If the diff is agreeable, you can unbundle the repo to make the changes permanent. |
Line 33: | Line 33: |
c) Or just use RdiffExtension and run `hg diff http://remoterepo` |
Generate a diff between two Repositories
Usually, you can use the -p option to either incoming or outgoing. Example:
cd /path/to/repo1 hg incoming -p /path/to/repo2
Sometimes you may want a single diff. There are a number of ways to do this. We'll describe two:
a) The [:Clone:clone] method
The basic idea is to use a cheap temporary clone to do the work. If the diff is agreeable, you can then pull from your temporary clone.
MYTIP=`hg tip --template "{rev}"` hg clone -U . tmp # make a temporary clone with no working directory hg -R tmp pull http://remoterepo # pull the remote changes into the temporary repo hg -R tmp diff -r $MYTIP -r tip # rm -rf tmp
b) The [:Bundle:bundle] method
MYTIP=`hg tip --template "{rev}"` hg in -q --bundle tmp.hg http://remoterepo && hg -R tmp.hg diff -r $MYTIP -r tip
This grabs a bundle of incoming changes then overlays the bundle on your current [:Repository:repository] (see [:LookingIntoBundles]) to generate the diff. If the diff is agreeable, you can unbundle the repo to make the changes permanent.
c) Or just use RdiffExtension and run hg diff http://remoterepo