S
S
Sergey Ivanov2015-09-17 13:16:11
linux
Sergey Ivanov, 2015-09-17 13:16:11

How to update via patch?

The bottom line is that I have folders with site versions on one server.
I get a diff from them,
diff -Naur v1 v2
I get a diff file, everything is fine. I start using it and nothing comes out.
patch < diff.diff
he swears

patching file index.php
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file index.php.rej

I can't figure out what's wrong
here is an example file
diff -Naur v1/index.php v2/index.php
--- v1/index.php	2015-09-17 14:25:21.112513877 +0500
+++ v2/index.php	2015-09-17 14:25:35.140514257 +0500
@@ -1,3 +1,3 @@
-<?php_egg_logo_guid
+<?php
 
-dfdf
\ No newline at end of file
+echo 1;
\ No newline at end of file

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Ruslan Fedoseev, 2015-09-17
@martin74ua

and what did you write down in rezhekty? there it is written that it did not allow to apply the patch

V
Vladimir, 2015-09-17
@rostel

the "p" parameter cuts the beginning of the path to the desired number
and do not forget to enter the root of the target directory

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question