Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: patchconv/README.md

Issue 29493601: Issue 5431 - Fix test for copyright update script (Closed) Base URL: https://hg.adblockplus.org/codingtools
Patch Set: Create sample_file from tmpdir_factory Created Aug. 3, 2017, 6:20 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Convert Rietveld patches to apply them locally 1 # Convert Rietveld patches to apply them locally
2 2
3 The `patchconv` module and `patchconv` script convert SVN-style patches that 3 The `patchconv` module and `patchconv` script convert SVN-style patches that
4 are downloaded from [Rietveld](https://github.com/rietveld-codereview/rietveld) 4 are downloaded from [Rietveld](https://github.com/rietveld-codereview/rietveld)
5 code reviews to Git-style patches that can be used as input for `hg import` or 5 code reviews to Git-style patches that can be used as input for `hg import` or
6 `git apply`. 6 `git apply`.
7 7
8 In many cases the patches from the review can be applied directly with 8 In many cases the patches from the review can be applied directly with
9 `patch -p1`. However, if the changes contain copies or renames or include 9 `patch -p1`. However, if the changes contain copies or renames or include
10 binary files, `patch` will not apply them correctly. Git and Mercurial commands 10 binary files, `patch` will not apply them correctly. Git and Mercurial commands
11 will also not work because when the changes are uploaded to the review, they 11 will also not work because when the changes are uploaded to the review, they
12 are converted to SVN-like format that Rietveld normally works with. `patchconv` 12 are converted to SVN-like format that Rietveld normally works with. `patchconv`
13 undoes this conversion and returns the patch to the state where it can be 13 undoes this conversion and returns the patch to the state where it can be
14 applied using Git or Mercurial. 14 applied using Git or Mercurial.
15 15
16 ## Installation 16 ## Installation
17 17
18 Install directly from Mercurial repository using pip: 18 Install directly from Mercurial repository using pip:
19 19
20 $ pip install 'hg+https://hg.adblockplus.org/codingtools#egg=patchconv&subdi rectory=patchconv' 20 $ pip install 'hg+https://hg.[Dadblockplus.org/codingtools#egg=patchconv&sub directory=patchconv'
Vasily Kuznetsov 2017/08/04 16:54:46 This seems like an accidental change. Or am I miss
rosie 2017/08/05 18:41:07 Yes. Must've happened when I was working on the up
21 21
22 ## Usage 22 ## Usage
23 23
24 The script in the package will be available immediately after the installation. 24 The script in the package will be available immediately after the installation.
25 Its interface is simple: it reads from stdin and writes to stdout. 25 Its interface is simple: it reads from stdin and writes to stdout.
26 26
27 $ patchconv <patch-from-rietveld.diff >git-patch.diff 27 $ patchconv <patch-from-rietveld.diff >git-patch.diff
28 28
29 ## Testing 29 ## Testing
30 30
31 The tests can be run via [Tox](http://tox.readthedocs.org/) 31 The tests can be run via [Tox](http://tox.readthedocs.org/)
OLDNEW
« no previous file with comments | « no previous file | update-copyright/tests/data/sample_file.py » ('j') | update-copyright/tests/test_update_copyright.py » ('J')

Powered by Google App Engine
This is Rietveld