You are not logged in.
Pages: 1
Sorry for my stupid question
I just want to patch DWM so I follow this introduction
PATCHES
diff generation
For mercurial users:cd dwm-directory
hg diff > dwm-X.Y-yourpatchname.diffpatch application
For mercurial users:cd dwm-directory
hg patch path/to/patch.diff
I think I got a .diff file and then run "hg diff > dwm-X.Y-yourpatchname.diff" in dwm-directory,right?(I got dwm by download using 'hg clone http://hg.suckless.org/dwm')
Everything went fine untill I try to do "hg patch path/to/patch.diff" where is exactly "path/to/patch.diff" be?
If you don't mind can you give me the step-by-step guild? I afraid that I did something wrong:(
I've try to find the way to solve it by using google and search in this forum but I still can't patch dwm:(
Last edited by megacyber (2012-03-11 04:28:14)
Sorry for my poor English:O
Offline
Everything went fine untill I try to do "hg patch path/to/patch.diff" where is exactly "path/to/patch.diff" be?
You should know where do you have that patch you created with 'hg diff > dwm-X.Y-yourpatchname.diff'.
Offline
I created it in ~/dwm so I've used 'hg patch /homt/myuser/dwm/patch.diff
but then I recieve 'abort: outstanding uncommitted changes' I think there's something I did wrong:(
Sorry for my poor English:O
Offline
Why don't you start with the ABS method described in the wiki, familiarize yourself with dwm and patching and then move to the hg method?
Offline
I've already used ABS method but it still doesn't work
I want to apply hg method to patching surf also so that why I choose hg method:(
Can you give me the step-by-step for patching surf or dwm,please:(
(I try to patch both surf and dwm but I'm now working on surf)
Sorry for my poor English:O
Offline
The ABS method works fine.
There are any number of threads here already with "step-by-step" instructions for patching dwm. I'm sure a quick search will turn one up...
Offline
It would be easier if you told us what patch are you trying to apply.
Offline
Oh sorry:(
I'm trying to appy homepage patch(http://surf.suckless.org/patches/homepage) to surf:(
Sorry for my poor English:O
Offline
Are you maintaining a patch set in mercurial? If not, then just follow the instructions on the surf page:
cd surf-directory
patch -p1 < path/to/patch.diff
#edit: the patch is only three lines - it's just as easy to copy it in by hand...
Last edited by jasonwryan (2012-03-11 03:33:56)
Offline
#edit: the patch is only three lines - it's just as easy to copy it in by hand...
You also have to edit config.h, otherwise the patch won't work (but surf gets compiled OK anyway).
I've just applied the patch, works as advertised.
Offline
It doesn't work this is an output
$ patch -p1 < /home/usrname/surf-0.3-homepage.diff
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -r dbb565b8d61c surf.c
|--- a/surf.c Fri Jun 25 09:42:58 2010 +0200
|+++ b/surf.c Mon Jul 05 21:56:52 2010 +0100
--------------------------
File to patch: surf-X.Y-yourpatchname.diff
patching file surf-X.Y-yourpatchname.diff
Hunk #1 FAILED at 833.
1 out of 1 hunk FAILED -- saving rejects to file surf-X.Y-yourpatchname.diff.rej
Sorry for my poor English:O
Offline
Are you applying this patch in the surf directory?
[karol@black surf]$ patch -p1 < ../surf-0.3-homepage.diff
patching file surf.c
Hunk #1 succeeded at 878 (offset 45 lines).
When pasting code, please use [ code ] tags, not [ quote ] tags https://bbs.archlinux.org/help.php#bbcode
like this
Last edited by karol (2012-03-11 03:46:20)
Offline
It doesn't work this is an output
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
Now, when you read the diff file, does that not tell you what file is being patched and where to place the diff in order for it to work?
Offline
Yes,it ask me for file to patch like the quote below
so I have it patch to surf-X.Y-yourpatchname.diff
File to patch: surf-X.Y-yourpatchname.diff
but it fails:(
Sorry for my poor English:O
Offline
Please post the contents of the surf directory.
Offline
Thank you everyone
I patched it now
It fails at first because I put .diff in difference directory i should put it in surf directory
So this's what I do
1. In ter terminal 'hg clone http://hg.suckless.org/surf' (without ' )
2. In the terminal 'cd surf' then edit the config.mk file with my favorite editor find the 'PREFIX' , 'X11INC' and 'X11LIB' then edit to
PREFIX = /usr
X11INC = /usr/include/X11
X11LIB = /usr/lib/X11
3. download .diff file to surf directory I downloaded by command 'wget http://surf.suckless.org/patches/surf-0.3-homepage.diff' but this patch have to add '#define HOMEPAGE "http://google.com" ' to the config.h so I add it to config.def.h because config.haven't existed yet but it will be created from config.def.h
4. In the terminal 'hg diff > thenameyouwant.diff'
5. In ther terminal 'hg patch < surf-0.3-homepage.diff'
6. In the terminal 'sudo make clean install'
Done;)
Sorry for my poor English:O
Offline
Pages: 1