On Thu, May 24, 2012 at 11:39 PM, Pete Batard <p...@akeo.ie> wrote:
> This one should work a bit better.
>

Let me try to use this as an exercise to learn how to revert the
existing v1 patch and then apply this v2 patch.

> On 2012.05.24 14:17, Xiaofan Chen wrote:
>> One git question first, how to revert the v2 patch and then apply
>> this patch?
>
> If you just applied a patch, "git reset HEAD" should do the job... I
> think (I'd have to look up the command, since with TGit I'm just doing
> that in a couple of clicks by accessing the log).

It does not seem to work.

mymacmini:libusbx xiaofanc$ git log
commit 5566660ab1f7335b1273ae2f3525c8bc6a97776e
Author: Pete Batard <p...@akeo.ie>
Date:   Thu May 24 11:42:47 2012 +0100

    Darwin: Align severity of OS-X logging messages

    * Some informational messages were actually debug or warning
    * Fixes #1

commit 21d07cc81e90294264138e43480065c60b520dbf
Author: Pete Batard <p...@akeo.ie>
Date:   Thu May 10 20:01:10 2012 +0100

    All: Add parent and port topology calls

    * Adds libusb_get_port_number, libusb_get_parent and libusb_get_port_path
    * Linux implementation provided by Alan Stern, OS X by Nathan Hjelm
    * Unsupported for *BSD platforms

commit a544e5972bf2b0ac9e006439576f681a8439d311
Author: Pete Batard <p...@akeo.ie>
Date:   Wed May 23 18:25:01 2012 +0100

    Misc: Ensure all sources are UTF-8

    * Also remove extra lines at the end of samples

So I have two patches ahead of master which I applied
with "git am"

mymacmini:libusbx xiaofanc$ git reset HEAD

mymacmini:libusbx xiaofanc$ git log
commit 5566660ab1f7335b1273ae2f3525c8bc6a97776e
Author: Pete Batard <p...@akeo.ie>
Date:   Thu May 24 11:42:47 2012 +0100

    Darwin: Align severity of OS-X logging messages

    * Some informational messages were actually debug or warning
    * Fixes #1

commit 21d07cc81e90294264138e43480065c60b520dbf
Author: Pete Batard <p...@akeo.ie>
Date:   Thu May 10 20:01:10 2012 +0100

    All: Add parent and port topology calls

    * Adds libusb_get_port_number, libusb_get_parent and libusb_get_port_path
    * Linux implementation provided by Alan Stern, OS X by Nathan Hjelm
    * Unsupported for *BSD platforms

commit a544e5972bf2b0ac9e006439576f681a8439d311
Author: Pete Batard <p...@akeo.ie>
Date:   Wed May 23 18:25:01 2012 +0100

mymacmini:libusbx xiaofanc$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       0001-Core-Define-log-levels-in-libusb.h.patch
#       0002-Core-Only-display-timestamps-in-debug-mode-and-use-i.patch
#       Add-parent-and-port-topology-calls-v3.patch
#       Darwin-Align-severity-of-OS-X-logging-messages-v2.patch
#       Darwin-Align-severity-of-OS-X-logging-messages.patch
nothing added to commit but untracked files present (use "git add" to track)

The goal is to revert Darwin-Align-severity-of-OS-X-logging-messages.patch,
then apply the v2 patch and then the latest two patches (0001/0002-Core).
What is the best way to do this?

The explanation here does not seem to work in this case.
http://git-scm.com/book/en/Git-Basics-Undoing-Things

I read somewhere the better approach is to create a new test branch and
then applying patches in the test branch. And then create new test
branches along the way. Is this correct? Any turorial?

-- 
Xiaofan

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to