#80 Generate and apply patches

open
nobody
6
2013-10-28
2003-03-01
Anonymous
No

This would be a great GUI to generate and apply patch
files, with some nice features:

* generate patch from diff
* apply patch and resolve conflicts interactively
* edit the operations in a patch file
* generate an "undo" patch during manual edits of a
directory tree
* generate a "redo" patch during manual edits of a
directory tree

Discussion

  • Kimmo Varis
    Kimmo Varis
    2003-09-09

    Logged In: YES
    user_id=631874

    Assigning to me. I have working code for patch creation.
    Needs some cleanup still, but I submit patch in few days.

    If I have time I work later with patch applying too.

     
  • Kimmo Varis
    Kimmo Varis
    2003-09-09

    • assigned_to: nobody --> kimmov
     
  • Kimmo Varis
    Kimmo Varis
    2003-09-18

    Logged In: YES
    user_id=631874

    I applied patch "#803904 Create patches" to CVS.

     
  • Kimmo Varis
    Kimmo Varis
    2003-10-17

    • assigned_to: kimmov --> nobody
    • labels: --> 572062
     
  • Kimmo Varis
    Kimmo Varis
    2003-10-17

    Logged In: YES
    user_id=631874

    Unassigning. Patch generation works now. Other items are to
    be done.

     
  • Kimmo Varis
    Kimmo Varis
    2004-03-08

    • priority: 5 --> 3
    • status: open --> open-later
     
  • Kimmo Varis
    Kimmo Varis
    2004-03-08

    Logged In: YES
    user_id=631874

    Setting resolution to 'Later'.

    some thoughts about implementing this, if somebody is
    interested:
    - get GNU/patch codes, and modify them to compile in Visual C 6
    - simple approach: compile patch.exe and call it to generate
    patched file to temp directory
    - advanced approach: compile patch code to WinMerge.exe like
    GNU/diffutils and create patched file as temp file.
    - after temp file is created, open original file and temp
    file to WinMerge

     
  • Logged In: YES
    user_id=527360

    Applying patches (diff files) is really something I would
    love to see.
    So count this comment as a vote in favour... ;o)

     
  • Holger Dors
    Holger Dors
    2005-02-24

    Logged In: YES
    user_id=13794

    I would also really like to see that WinMerge could apply
    patches as well; so think of this comment as another vote for
    this... ;-)

    +1 ;-)

     
  • Kimmo Varis
    Kimmo Varis
    2005-02-24

    Logged In: YES
    user_id=631874

    I think easiest way to implement this is to use GnuWin32
    port of patch:
    - create copy of file to patch into $temp directory
    - apply patch to that copied file
    - open original file and patched file into WinMerge file compare

    Easy to implement, finding time is the problem...

    Increasing priority since this is definitely in list for
    next stable release.

     
  • Kimmo Varis
    Kimmo Varis
    2005-02-24

    • priority: 3 --> 6
    • labels: 572062 --> File handling
    • status: open-later --> open
     
  • Cameron Stone
    Cameron Stone
    2007-06-28

    Logged In: YES
    user_id=810587
    Originator: NO

    Nudge.

    Any further thought on applying patches?

     
  • Kimmo Varis
    Kimmo Varis
    2007-07-20

    Logged In: YES
    user_id=631874
    Originator: NO

    Unfortunately no at the moment.

    The GnuWin32 is based on MinGW32 and GCC. So getting it to even build with MSVC might be a challenge of its own. Building patch-implementation as DLL or lib (to use from WinMerge code) might be pretty fun too.

    "Fast" solution could be to use the executable build with MinGW. Not elegant, but should work.

    If somebody wants to work with this, I can try to help. But I don't believe I have time to implement this anytime soon. Maybe next year..

     
  • Kimmo Varis
    Kimmo Varis
    2008-07-01

    Logged In: YES
    user_id=631874
    Originator: NO

    > Is the code in
    > http://www.freebsd.org/cgi/cvsweb.cgi/src/gnu/usr.bin/patch/ is better
    > suitable for compiling with MSVC?
    Hard to say, but initially doesn't look like it.

    >If not then there is a page at
    > http://unxutils.sourceforge.net/ that claims to have native win32 port of
    > patch utility.
    I have to check again, but if I remember correctly unxutils (like GnuWin32) tools are still compiled with Cygwin/MinGW. Meaning they are compiled with GCC but linked against MS DLLs. So porting to MSVC is still some work.

     
  • Maarten Brock
    Maarten Brock
    2013-01-21

    May I also request this feature? It would be really useful!
    +1 from me.

     
  • shemesh
    shemesh
    2013-10-28

    is this feature planned for next release?
    i vote +1