[Python-Dev] devguide: Cover how to (un-)apply a patch.

skip at pobox.com skip at pobox.com
Tue Jan 18 20:32:42 CET 2011

    >> I prefer Brett's solution.  It's one command instead of one command
    >> per VCS.  It works with other version control systems and provides me
    >> the opportunity to save a copy I can restore later.

    Georg> It assumes you already have the copy.

Sure, but the way to get the input to the patch command is easy, and is
probably almost the same for any version control system:

    whatever-vcs diff > patch.diff

The odds that someone will remember the syntax for the diff command for the
VCS are much higher than the revert command.  My guess is "diff" is executed
more often than any other version control commands except "update" and
"commit", and far more often than "revert".  Personally, I'm not sure I've
ever used "revert" more than a handful of times in my entire professional

I realize the world is passing me by and that I'm rapidly turning into a
dinosaur w.r.t. distributed version control, but as you write/update the
developer's guide remember that proficiency in Python does not necessarily
equate to proficiency in version control systems, especially with the less
frequently used commands.  I personally would prefer that more general
commands and concepts be used where possible so that newcomers not be put
off unnecessarily by the complexity of version control.


More information about the Python-Dev mailing list