net error - still not corrected

Kamen Mazdrashki kamenim at samba.org
Wed Sep 15 15:32:32 MDT 2010


Hi David,

On Thu, Sep 16, 2010 at 00:11, David Gonzalez <info at dghvoip.com> wrote:

> Hi Kamen,
>
> You're right I'm not familiar with git, as I used to do cvs and less
> subversion so if you could point me on how to apply the patch "git am
> <file>" fails with
>
> git am 0001-s4-net-join-Fix-Python-class-definition.patch
> Applying: s4-net-join: Fix Python class definition
> error: patch failed: source4/scripting/python/samba/drs_utils.py:23
> error: source4/scripting/python/samba/drs_utils.py: patch does not apply
> Patch failed at 0001 s4-net-join: Fix Python class definition
> When you have resolved this problem run "git am --resolved".
> If you would prefer to skip this patch, instead run "git am --skip".
> To restore the original branch and stop patching run "git am --abort".
>
> Hmm, very strange...
Are you applying this against latest git checkout for master?
And you must be inside samba's source tree. For instance:
<samba-checkout-dir>/source4
is fine too.
Oh, and you applied it in correct way :)


> And the file your attached on your last message contains this, where
> exactly does the patch start/end?. It's obviously not from  that "From"
> line.
>
> The whole thing is the 'patch' and after applying it, it will produce a
nice commit
in your git log (you can view it with 'git log')

The raw patch though is starting after the 'diff --git...' line.
But applying it with git is very recommended.


> From 08d08dd3bcd735fba7c5ee6df300263467735249 Mon Sep 17 00:00:00 2001
> From: Kamen Mazdrashki <kamenim at samba.org>
> Date: Wed, 15 Sep 2010 23:53:11 +0300
> Subject: [PATCH] s4-net-join: Fix Python class definition
>
> ---
>  source4/scripting/python/samba/drs_utils.py |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/source4/scripting/python/samba/drs_utils.py
> b/source4/scripting/pyt
> hon/samba/drs_utils.py
> index 854608a..3f0c307 100644
> --- a/source4/scripting/python/samba/drs_utils.py
> +++ b/source4/scripting/python/samba/drs_utils.py
> @@ -23,7 +23,7 @@ from samba.dcerpc import drsuapi, misc
>  from samba.net import Net
>  import samba, ldb
>
> -class drs_Replicate():
> +class drs_Replicate(object):
>      '''DRS replication calls'''
>
>      def __init__(self, binding_string, lp, creds, samdb):
> --
> 1.6.0.4
>
>
Just another note on git. If you have a Samba checkout few days old,
you can update it like this:
1. git stash save "my work in progress" -> this is in case you have tried
something on the code alredy
2. git fetch origin
3. git rebase origin/master
4. git am 0001-s4-net-join-Fix-Python-class-definition.patch -> this should
work and it work for me just fine
5. git stash pop -> use this in case you have stashed something in step 1.

Good luck. Git is great. Once you get familiar with it, cvs will look like a
very clumsy svn to you :)

-- 
CU,
Kamen


More information about the samba-technical mailing list