You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by Dominik Psenner <dp...@gmail.com> on 2011/08/13 10:15:10 UTC

Discussing the existing patches

Can we start a discussion on the existing patches? Primary targets of
discussion are the ones I applied here:

https://bitbucket.org/NachbarsLumpi/log4net-patches/

This includes the unresolved issues containing a patch file:
* LOG4NET-190
* LOG4NET-108
* LOG4NET-270
-- 
Dominik Psenner
## OpenPGP Key Signature #################################
# Key ID: B469318C                                       #
# Fingerprint: 558641995F7EC2D251354C3A49C7E3D1B469318C  #
##########################################################


Re: Discussing the existing patches

Posted by Dominik Psenner <dp...@gmail.com>.
On 08/13/2011 04:58 PM, Stefan Bodewig wrote:
> Absolutely.  I'm running out of time right now, but will focus on the
> three issues you've mentioned soon.

Great!

Here there are the patches:
https://bitbucket.org/NachbarsLumpi/log4net-patches

You can review them by enabling the patchqueue extension in your
mercurial configuration and then do:

$ hg qclone ssh://hg@bitbucket.org/NachbarsLumpi/log4net-patches

At this point you have cloned the repository containing the patch queue.
This means you have the complete history of log4net:

$ hg log -l 1
changeset:   553:7f145743e63e
tag:         tip
user:        rgrabowski@13f79535-47bb-0310-9956-ffa450edef68
date:        Wed Oct 13 03:26:57 2010 +0000
summary:     Additional fix for LOG4NET-59 to ensure correct call to
System.IO.File.GetLastWriteTime or GetLastWriteTimeUtc

and a hidden repository containing a versioned history of some patches.
To see which patches you got, you can do a:

$ hg qseries
LOG4NET-190
LOG4NET-108
LOG4NET-235
LOG4NET-271
LOG4NET-270

To apply a patch onto your working revision, you just have to:

$ hg qpush LOG4NET-190

Which will literally "create" a commit containing the patch information:

$ hg log -l 2
changeset:   554:200e5c7be470
tag:         LOG4NET-190
tag:         qbase
tag:         qtip
tag:         tip
user:        Dominik Psenner <dp...@gmail.com>
date:        Sun Aug 14 23:28:05 2011 +0200
summary:     LOG4NET-190

changeset:   553:7f145743e63e
tag:         qparent
user:        rgrabowski@13f79535-47bb-0310-9956-ffa450edef68
date:        Wed Oct 13 03:26:57 2010 +0000
summary:     Additional fix for LOG4NET-59 to ensure correct call to
System.IO.File.GetLastWriteTime or GetLastWriteTimeUtc

At this point you can take a look at the patch, test the impact and once
you're done with it, you can unapply the patch by doing:

$ hg qpop

which brings you back:

$ hg log -l 1
changeset:   553:7f145743e63e
tag:         tip
user:        rgrabowski@13f79535-47bb-0310-9956-ffa450edef68
date:        Wed Oct 13 03:26:57 2010 +0000
summary:     Additional fix for LOG4NET-59 to ensure correct call to
System.IO.File.GetLastWriteTime or GetLastWriteTimeUtc

If you wanted to modify a patch, you could push a patch with:

$ hg qpush LOG4NET-190
$ "hack hack hack"

Update the patch file:

$ hg qrefresh

And commit the changes you made to that patch file:

$ hg commit --mq

And finally push the changes you made to the patch repository:

$ hg push --mq

You can iterate over these steps as often as you want and work on a
patch as long as it takes to finish it in perfection without actually
modifying the project history itself. Of course one day the patch will
be finished and I would like to show you the steps you would take then.

First of all you apply the patch as before:

$ hg qpush LOG4NET-190

Then you finish it:

$ hg qfinish LOG4NET-190

Which does remove the patch from the series:

$ hg qseries
LOG4NET-108
LOG4NET-235
LOG4NET-271
LOG4NET-270

At this point we commit the changes made in the patch repository:

$ hg commit --mq -m'finished LOG4NET-190'

And push that information to the patch repository at bitbucket:

$ hg push --mq

What we have now in the project history is the newly added commit record
of the patch we made:

$ hg log -l 2
changeset:   554:200e5c7be470
tag:         tip
user:        Dominik Psenner <dp...@gmail.com>
date:        Sun Aug 14 23:28:05 2011 +0200
summary:     LOG4NET-190

changeset:   553:7f145743e63e
user:        rgrabowski@13f79535-47bb-0310-9956-ffa450edef68
date:        Wed Oct 13 03:26:57 2010 +0000
summary:     Additional fix for LOG4NET-59 to ensure correct call to
System.IO.File.GetLastWriteTime or GetLastWriteTimeUtc

And since the crew are surely interested in the work you've finished,
you do this to push the information to the log4net-crew repository:

$ hg push

This is how one works with patch queues! :-) At this point I could pull
the change in the crew repository by doing:

$ hg pull

and push that information to svn if I had write privileges.

Feel free to ask questions if there are any!
-- 
Dominik Psenner
## OpenPGP Key Signature #################################
# Key ID: B469318C                                       #
# Fingerprint: 558641995F7EC2D251354C3A49C7E3D1B469318C  #
##########################################################


Re: Discussing the existing patches

Posted by Stefan Bodewig <bo...@apache.org>.
On 2011-08-13, Dominik Psenner wrote:

> Can we start a discussion on the existing patches?

Absolutely.  I'm running out of time right now, but will focus on the
three issues you've mentioned soon.

Stefan