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: patch-diff.githubusercontent.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:85bd5c77-2724-d952-f70d-14e4d08ff2f6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E3D0:31007:73D853:9FB62E:696F3AED |
| html-safe-nonce | 67072d5c54fb72336822cbd7eadf78c544a6f7632d871fcb3947166818f21794 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFM0QwOjMxMDA3OjczRDg1Mzo5RkI2MkU6Njk2RjNBRUQiLCJ2aXNpdG9yX2lkIjoiNDY2NzU3NDQ0OTYzOTIwOTcwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 56d86d755fcca2a7f4f568c673a06190da431a47d28421ec5d529fa1485f3ac8 |
| 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 | b278ad162d35332b6de714dfb005de04386c4d92df6475522bef910f491a35ee |
| 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 | 39aed5006635ab6f45e6b77d23e73b08a00272a3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width