Skip to main content

Line number chars terminator -- update past patches with its current line number

Project description

patchtool

Prerequisite

Here I will simply list the packages on which the tool is implemented. It should be working fine with similar environment

OS: RHEL-8.1.0

Interpreter: 3.6.8

Version Controller: git 2.18.1

Compiler: gcc-8.3.1

Kernel: 4.18.0-128.el8.x86_64

Installation

No need to install, just git clone the repository, or download the latest release and enjoy your using:) Either method is ok, for our latest release is always synchronized from the master branch.

How to use

usage: main.py [-h] -d D -p P

optional arguments:
  -h, --help  show this help message and exit
  -d D        The directory where this patch tool is hoped to be used
  -p P        Directory of the patch file

An ordinary usage goes like this:

python3 main.py -d [git_directory] -p [patchfile_path]

Requirements for input patch file

A standard input has a format as follow, which can be automatically generated by virtcov, a tool used for libvirt coverage test:

From <commit_hash> 
[headers]
<neck_information>
<body>
--
<version>

where <commit hash> is a hexadecimal integer generated by the submission where the bug was solved. [headers] represents header information of the commit. <neck_information> is necessary for separating header and body, with a format shown as below:

\s[0-9]*\sfile(s)?\schanged,\s[0-9]*\s(insertions\(\+\)|deletions\(\-\))(,\s[0-9]*\sdeletions\(\-\))?

The <body> part shows the diff information of the bug commit, whose format is given below:

diff --git a/<sorce_directory> b/<dir_after_effect>
index <hash> <operation_code>
--- a/<sorce_directory>
+++ b/<dir_after_effect>
@@ -[0-9]{1,},[0-9]{1,} +[0-9]{1,},[0-9]{1,} @@ [other_info]
...

which can be repeated multiple times.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

patchtool-1.0rc1.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

patchtool-1.0rc1-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file patchtool-1.0rc1.tar.gz.

File metadata

  • Download URL: patchtool-1.0rc1.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

File hashes

Hashes for patchtool-1.0rc1.tar.gz
Algorithm Hash digest
SHA256 81f876b74059be0d9be3e8a8c57a5280e7d0b2df395f5302542980b5078123db
MD5 fb38f8aa8e461340ec261894b33d686c
BLAKE2b-256 5f2cbd4e297cfa928253e5211c7b55406a22751181f24f410a90900db9d5128d

See more details on using hashes here.

File details

Details for the file patchtool-1.0rc1-py3-none-any.whl.

File metadata

  • Download URL: patchtool-1.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

File hashes

Hashes for patchtool-1.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 d8c54f2ad97b1caddd01403fd8eeec9a66f7c37b1f4e4cba7e00f1af976a4fef
MD5 fe56cd1dfea2b2501f69cb47309db1d3
BLAKE2b-256 f69d4bb8e3e3c01ff9b428ef16715aa7421d46405836ff019793d392f3a35a5c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page