[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] Re: mtnpatch

From: Justin Patrin
Subject: [Monotone-devel] Re: mtnpatch
Date: Sat, 10 Jun 2006 11:12:58 -0700

On 5/27/06, Justin Patrin <address@hidden> wrote:
Forgive the crosspost, but I figured both of these lists would like to
know about this. I've written a little python script to parse the
output of mtn diff and output the patch and monotone commands to apply
the patch correctly to the working copy, including renames, drops, and
adds. I haven't *tested* it fully as yet (not quite sure about the
patch command) but it should work.

The point of this is to have a way to do cherrypicking between two
branches without lots of manual work and without having to sync all
changes. I know that OpenEmbedded is in dire need of such a thing so
this should be very helpful.

I have not yet implemented any kind of stdin functionality and this
script does not actually run anything, it only outputs the commands
that need to be run. This is mainly for easy sanity checking. I have
implemented only one option, -R, to output the reverse.

Please be kind, this is my first real bit of python coding.

Just thought I'd let everyone know that I just cherrypicked my first
revision with I made some efl/e17 updates to .dev and
edited one file, made a diff, and applied the diff to .oz354x with It worked like a charm.

For those that missed it, I have checked in into in contrib/. I have also switch to using a regex
instead of split() so that whitespace in filenames should be correctly
taken care of.

The script is used like this:
 mtn diff -r ParentRev -r RevToCherryPick > file.patch
 cd /branch/to/cherrypick/to
 contrib/ file.patch
Look at the output to make sure it's sane
 contrib/ file.patch | sh
 mtn ci

Justin Patrin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]