Книга: Learning GNU Emacs, 3rd Edition
12.8.2 Difference Reports
12.8.2 Difference Reports
Earlier, we mentioned that version control systems help you generate difference reports between versions. VC's command for this is C-x v = (for vc-diff). This command normally shows you the difference between your work file and the last revision you checked in so that you can see exactly what changes you'll be committing if you check in again.
If you give this command a prefix argument, C-u C-x v =, it prompts you for a file name and two revision numbers and reports the difference between those revisions of the file. If the older revision number is empty (that is, you simply press Enter at that prompt), it defaults to the last checked-in revision. If the newer revision is empty, it defaults to the work file. So pressing Enter twice compares the work file with what was last checked in to the repository, a very common task.
It's also possible to get a difference report for a whole tree of project files. If the filename you give C-u C-x v = is actually a directory, you'll see the differences between your specified versions for every registered file underneath that directory.
By design, such a difference report can be shipped and mechanically applied as a patch using Larry Wall's patch utility (available on all modern Unixes). This is a tremendous help when you're cooperating on a software project by email; you can download sources, register them, make modifications—and then, with one command, generate a complete patch set of your changes to mail to your collaborators.
The exact format of these reports varies somewhat between version control systems because VC uses each system's native difference reporter.[87] Generally, the output resembles that of the Unix diff command. We'll see how to customize the report later in this chapter. Finally, the last section of the chapter introduces Ediff, an alternate and powerful way to compare and resolve differences between multiple files or versions.
- 12.8.1 Working with Groups and Subtrees of Files
- 12.8.2 Difference Reports
- 12.8.3 Retrieving Old Revisions
- 12.8.4 Viewing Change Histories
- 12.8.5 Registering a File
- 12.8.6 Inserting Version Control Headers
- 12.8.7 Making and Retrieving Snapshots
- 12.8.8 Updating ChangeLog Files
- 12.8.9 Renaming Version-Controlled Files
- 12.8.10 When VC Gets Confused
- Difference between Events and Delegates
- 2.3.4. Внесение в отчет Crystal Reports новых полей
- 2.3.2. Инструментальная среда Crystal Reports Designer
- 2.3.5. Группировка записей отчета Crystal Reports
- 2.3. Использование Crystal Reports для создания отчетов
- 2.3.3. Создание простых отчетов в среде Crystal Reports Designer
- Understanding Build Reports
- Sending Output Reports
- set_difference
- set_symmetric_difference
- adjacent_difference
- 9.3.4 C++ Mode Differences