Title: No error returned if patching is aborted due to existing .orig file · Issue #60 · techtonik/python-patch · GitHub
Open Graph Title: No error returned if patching is aborted due to existing .orig file · Issue #60 · techtonik/python-patch
X Title: No error returned if patching is aborted due to existing .orig file · Issue #60 · techtonik/python-patch
Description: Given the following a.txt file: 1 2 3 and the following working.patch: --- a.txt 2019-03-28 17:02:04.832004033 -0700 +++ b.txt 2019-03-28 17:02:34.999576803 -0700 @@ -1,4 +1,4 @@ -1 +0 2 3 Patching will fail if a.txt.orig already exists:...
Open Graph Description: Given the following a.txt file: 1 2 3 and the following working.patch: --- a.txt 2019-03-28 17:02:04.832004033 -0700 +++ b.txt 2019-03-28 17:02:34.999576803 -0700 @@ -1,4 +1,4 @@ -1 +0 2 3 Patching...
X Description: Given the following a.txt file: 1 2 3 and the following working.patch: --- a.txt 2019-03-28 17:02:04.832004033 -0700 +++ b.txt 2019-03-28 17:02:34.999576803 -0700 @@ -1,4 +1,4 @@ -1 +0 2 3 Patching...
Opengraph URL: https://github.com/techtonik/python-patch/issues/60
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"No error returned if patching is aborted due to existing .orig file","articleBody":"Given the following `a.txt` file:\r\n\r\n```\r\n1\r\n2\r\n3\r\n\r\n```\r\n\r\nand the following `working.patch`:\r\n\r\n```\r\n--- a.txt\t2019-03-28 17:02:04.832004033 -0700\r\n+++ b.txt\t2019-03-28 17:02:34.999576803 -0700\r\n@@ -1,4 +1,4 @@\r\n-1\r\n+0\r\n 2\r\n 3\r\n\r\n```\r\n\r\nPatching will fail if `a.txt.orig` already exists:\r\n\r\n```\r\n$ touch a.txt.orig\r\n$ ./patch.py --debug working.patch \u0026\u0026 echo Success!\r\n DEBUG reading working.patch\r\n DEBUG crlf: 0 lf: 5 cr: 0\t - file: b.txt hunk: 1\r\n DEBUG - 1 hunks for a.txt\r\n DEBUG total files: 1 total hunks: 1\r\n DEBUG normalize filenames\r\n DEBUG patch type = plain\r\n DEBUG source = a.txt\r\n DEBUG target = b.txt\r\n DEBUG processing 1/1:\t a.txt\r\n DEBUG hunk no.1 for file a.txt -- is ready to be patched\r\n WARNING can't backup original file to a.txt.orig - aborting\r\nSuccess!\r\n\r\n$ cat a.txt\r\n1\r\n2\r\n3\r\n\r\n```\r\n\r\nbut the program will exit successfully instead of returning an error.","author":{"url":"https://github.com/fmarier","@type":"Person","name":"fmarier"},"datePublished":"2019-04-18T00:32:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/60/python-patch/issues/60"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e13799be-892a-54e0-12bb-00a9695957bf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C720:3FFE1:141945B:1B8CDCC:696A0089 |
| html-safe-nonce | c85fbad5f791622245fca70da37dded9b52933e97710af378727f9ee94ecea8a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzIwOjNGRkUxOjE0MTk0NUI6MUI4Q0RDQzo2OTZBMDA4OSIsInZpc2l0b3JfaWQiOiI4MzM0NDUxODgyOTU5OTYyMjQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b6b13cf29780d490762900d8072b182c0d7eb920232644408aefd15a0e33af1e |
| hovercard-subject-tag | issue:434540912 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/techtonik/python-patch/60/issue_layout |
| twitter:image | https://opengraph.githubassets.com/51b79f4aa30e67fb4c68e4d3bfda2b2910dc27c03d66d480d6ad9edc62fc8a7a/techtonik/python-patch/issues/60 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/51b79f4aa30e67fb4c68e4d3bfda2b2910dc27c03d66d480d6ad9edc62fc8a7a/techtonik/python-patch/issues/60 |
| og:image:alt | Given the following a.txt file: 1 2 3 and the following working.patch: --- a.txt 2019-03-28 17:02:04.832004033 -0700 +++ b.txt 2019-03-28 17:02:34.999576803 -0700 @@ -1,4 +1,4 @@ -1 +0 2 3 Patching... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | fmarier |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 |
| turbo-cache-control | no-preview |
| go-import | github.com/techtonik/python-patch git https://github.com/techtonik/python-patch.git |
| octolytics-dimension-user_id | 515889 |
| octolytics-dimension-user_login | techtonik |
| octolytics-dimension-repository_id | 34159484 |
| octolytics-dimension-repository_nwo | techtonik/python-patch |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 34159484 |
| octolytics-dimension-repository_network_root_nwo | techtonik/python-patch |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bdde15ad1b403e23b08bbd89b53fbe6bdf688cad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width