Questions tagged [patch]

A patch is a piece of software designed to fix problems with, or update a computer program or its supporting data. This includes fixing security vulnerabilities and other bugs, and improving the usability or performance.

Programmers publish and apply patches in various forms. Because proprietary software authors withhold their source code, their patches are distributed as binary executables instead of source. This type of patch modifies the program executable—the program the user actually runs—either by modifying the binary file to include the fixes or by completely replacing it.

Patches can also circulate in the form of source code modifications. In these cases, the patches consist of textual differences between two source code files. These types of patches commonly come out of open source projects. In these cases, developers expect users to compile the new or changed files themselves.

Because the word "patch" carries the connotation of a small fix, large fixes may use different nomenclature. Bulky patches or patches that significantly change a program may circulate as "service packs" or as "software updates". Microsoft Windows NT and its successors (including Windows 2000, Windows XP, and later versions) use the "service pack" terminology.

In several Unix-like systems, particularly Linux, updates between releases are delivered as new software packages. These updates are in the same format as the original installation so they can be used either to update an existing package in-place (effectively patching) or be used directly for new installations.

2809 questions
1
vote
1 answer

Seeing the expected results of a commiting only part of a file in git?

So let's say I've already run git add -p and I've selected the hunks I'd like to add to the file, and the hunks I would not like to add to the file. How can I see the resulting file in full based on what is about to be committed without committing…
leeand00
  • 25,510
  • 39
  • 140
  • 297
1
vote
2 answers

Rails RSpec test for patch update (via web) of associated model

I'm doing the Michael Hartl Rails tutorial (using Rails 4 and RSpec-Rails 3.3.3) and implementing users with admin privileges, which it achieves by adding an admin boolean attribute to the User model. I've instead decided to use a spearate Admin…
1
vote
0 answers

Authentication error building a job with a patch file

I am trying to build a jenkins job using the library python-jenkins. Now this works fine if I try it with a normal data file using the command: j.build_job('test', {'param1' : filepath}) Here j is the Jenkins instance I use for my server and…
Naveed Haider
  • 105
  • 1
  • 2
  • 6
1
vote
1 answer

Removing files from Git commit message

I've been working on kernel patches for the first time and I did 6 patches and added them to git. Now, whenever I commit all the files come up in the git commit message as follows: Now, I just want to send changes about one file at a time. I asked…
unixia
  • 4,102
  • 1
  • 19
  • 23
1
vote
2 answers

How to get patch files from multiple commits?

For example, let's focus on the latest 4 successive commits. commit1 is the latest while commit4 the earliest: commit1 HEAD commit2 commit3 commit4 ... I want get patch file from commit1&2&3. I have tried the following two commands, but they…
Zachary
  • 1,633
  • 2
  • 22
  • 34
1
vote
1 answer

using clang-format on a patch

I tried clang-format and it works really well for my coding style. I wanted to know if it is possible to use clang format on just my patch so that I don't format code which I don't want to modify. That way I could run clang-format on my patch…
A. K.
  • 34,395
  • 15
  • 52
  • 89
1
vote
1 answer

Are (specific) diff/patch tools suitable to update an executable binary file?

I've just read this paper which presents the BSDiff tool as a method to diff-and-patch binary files. I wonder whether these types of tools are good and suitable in systems which can't afford any kind of error in this process. I'm working in an…
Carles Araguz
  • 1,157
  • 1
  • 17
  • 37
1
vote
1 answer

How do I merge changes of one file into another across different repositories

Merging one file from one branch to another has been asked before with the rather concise solution to do: git checkout A git checkout --patch B f But how does one do this effectively across two repositories?
cfi
  • 10,915
  • 8
  • 57
  • 103
1
vote
1 answer

Create patch of modified part only

I have a file with 1500 lines, more or less and I modified only one line and used diff -u original.txt modified.txt > original.patch and instead of creating a patch file with the modified part only, it has not only the original, but the modified…
Secafo
  • 107
  • 6
1
vote
1 answer

python mock patch decorator behaves different for class methods and individual functions

Several times I've ran into a problem with unittest.mock.patch decorator. When I tried to mock individual functions from included module, patch didn't work. However if functions from included module are collected as class methods, patch works…
AnaPana
  • 1,958
  • 19
  • 18
1
vote
3 answers

python mocking: mock.patch.object gotchas

I have been writing unit tests for over a year now, and have always used patch.object for pretty much everything (modules, classes, etc). My coworker says that patch.object should never be used to patch an object in a module (i.e.…
vitiral
  • 8,446
  • 8
  • 29
  • 43
1
vote
1 answer

Why MSI Patching a TTF font file always cause a reboot?

We create a MSP patch that update a TrueType font (.TTF) file but it is causing 1603 (a reboot is required after installation.) Here is the MSI log: MSI (s) (5C:48) [23:33:56:432]: Executing op:…
Rex Hui
  • 71
  • 1
  • 7
1
vote
2 answers

Remove or rename files during minor update(wix 3.9 patch)

We’re generating setups automatically every week, in order to fix bugs or introduce new features to our product. All the components are being harvest automatically in the Wix Library(ies) pre build step(s). eg: "%WIX%bin\Heat.exe" project…
melic
  • 19
  • 4
1
vote
1 answer

The JDK 7 has reached "end of public updates". Can Android developers use the JDK 8 as a drop-in replacement?

My question I own a Samsung Galaxy S Relay 4G smartphone running Android 4.1.2 "Jelly Bean". I want to use a Windows 8.1 laptop to compile software which will run on the phone. Oracle's Java SE Support Roadmap states that most parts of Java SE 7…
1
vote
3 answers

Solr and Morfologik - how to install a patch?

I installed Solr (5.2.1) from here http://lucene.apache.org/solr/mirrors-solr-latest-redir.html. I created a new filed type in the schema.xml sile:
Simon
  • 1,099
  • 1
  • 11
  • 29