| 
				
			 | 
			
			
				@@ -1,13 +1,18 @@ 
			 | 
		
	
		
			
			| 
				1
			 | 
			
				1
			 | 
			
			
				 ## About 
			 | 
		
	
		
			
			| 
				2
			 | 
			
				2
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				3
			 | 
			
				
			 | 
			
			
				-View **incremental**, **colored** diff in unified format or in **side by side** 
			 | 
		
	
		
			
			| 
				4
			 | 
			
				
			 | 
			
			
				-mode with **auto pager**.  Requires python (>= 2.5.0) and `less`. 
			 | 
		
	
		
			
			| 
				
			 | 
			
				3
			 | 
			
			
				+View **incremental**, **colored** diff in unified format or **side by side** 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4
			 | 
			
			
				+with **auto pager**.  Requires python (>= 2.5.0) and `less`. 
			 | 
		
	
		
			
			| 
				5
			 | 
			
				5
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				6
			 | 
			
				6
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				7
			 | 
			
				7
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				8
			 | 
			
				8
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				9
			 | 
			
				9
			 | 
			
			
				 ## Installation 
			 | 
		
	
		
			
			| 
				10
			 | 
			
				10
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				
			 | 
			
				11
			 | 
			
			
				+Cdiff is not in PyPI yet, so far you could download the script directly or use 
			 | 
		
	
		
			
			| 
				
			 | 
			
				12
			 | 
			
			
				+the `setup.py` to install. 
			 | 
		
	
		
			
			| 
				
			 | 
			
				13
			 | 
			
			
				+  
			 | 
		
	
		
			
			| 
				
			 | 
			
				14
			 | 
			
			
				+**Download directly** 
			 | 
		
	
		
			
			| 
				
			 | 
			
				15
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				11
			 | 
			
				16
			 | 
			
			
				 Save [src/cdiff.py](https://raw.github.com/ymattw/cdiff/master/src/cdiff.py) to 
			 | 
		
	
		
			
			| 
				12
			 | 
			
				17
			 | 
			
			
				 whatever directory which is in your `$PATH`, for example, `$HOME/bin` is in my 
			 | 
		
	
		
			
			| 
				13
			 | 
			
				18
			 | 
			
			
				 `$PATH`, so I save the script there and name as `cdiff`. 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -15,6 +20,17 @@ whatever directory which is in your `$PATH`, for example, `$HOME/bin` is in my 
			 | 
		
	
		
			
			| 
				15
			 | 
			
				20
			 | 
			
			
				     curl -ksS https://raw.github.com/ymattw/cdiff/master/src/cdiff.py > ~/bin/cdiff 
			 | 
		
	
		
			
			| 
				16
			 | 
			
				21
			 | 
			
			
				     chmod +x ~/bin/cdiff 
			 | 
		
	
		
			
			| 
				17
			 | 
			
				22
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				
			 | 
			
				23
			 | 
			
			
				+**Install with the setup.py** 
			 | 
		
	
		
			
			| 
				
			 | 
			
				24
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				25
			 | 
			
			
				+You can run the setup.py from the source to install `cdiff` to system wide 
			 | 
		
	
		
			
			| 
				
			 | 
			
				26
			 | 
			
			
				+directory. 
			 | 
		
	
		
			
			| 
				
			 | 
			
				27
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				28
			 | 
			
			
				+    git clone https://github.com/ymattw/cdiff.git 
			 | 
		
	
		
			
			| 
				
			 | 
			
				29
			 | 
			
			
				+    cd cdiff 
			 | 
		
	
		
			
			| 
				
			 | 
			
				30
			 | 
			
			
				+    sudo ./setup.py install 
			 | 
		
	
		
			
			| 
				
			 | 
			
				31
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				32
			 | 
			
			
				+This usually installs it as `/usr/local/bin/cdiff`. 
			 | 
		
	
		
			
			| 
				
			 | 
			
				33
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				18
			 | 
			
				34
			 | 
			
			
				 ## Usage 
			 | 
		
	
		
			
			| 
				19
			 | 
			
				35
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				20
			 | 
			
				36
			 | 
			
			
				 Cdiff reads diff from diff (patch) file if given, or stdin if redirected, or 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -29,7 +45,7 @@ Show usage: 
			 | 
		
	
		
			
			| 
				29
			 | 
			
				45
			 | 
			
			
				 View a diff (patch) file: 
			 | 
		
	
		
			
			| 
				30
			 | 
			
				46
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				31
			 | 
			
				47
			 | 
			
			
				     cdiff foo.patch             # view incremental, colored udiff 
			 | 
		
	
		
			
			| 
				32
			 | 
			
				
			 | 
			
			
				-    cdiff foo.patch -s          # view in side by side mode 
			 | 
		
	
		
			
			| 
				
			 | 
			
				48
			 | 
			
			
				+    cdiff foo.patch -s          # view side by side 
			 | 
		
	
		
			
			| 
				33
			 | 
			
				49
			 | 
			
			
				     cdiff foo.patch -s -w 90    # use text width 90 other than default 80 
			 | 
		
	
		
			
			| 
				34
			 | 
			
				50
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				35
			 | 
			
				51
			 | 
			
			
				 Read diff from local modification in a svn, git, or hg workspace: 
			 |