[Svnmerge] Patch: Using -d/--diff and -l/--log at the same time

Giovanni Bajo rasky at develer.com
Thu Nov 1 04:18:42 PDT 2007


On Wed, 2007-10-31 at 16:46 -0600, Travis Shirk wrote:

> The patch I sent in my previous mail is correct, although this one is a
> bit cleaner with respect to the old/new filenames including the correct
> revision that patch was made against.

If you add this simple class to the option parsing machinery:

class OptionArgList(OptionArg):
    def apply(self, state, value):
        assert value is not None
        state.setdefault(self.dest, []).append(value)

the final code will result cleaner, I reckon.

> +    if display_style:
> +        for style in display_style:
> +            if style:
> +                # Skip empty string styles, they are likely empty
> defaults
> +                assert False, "unhandled display style: %s" %
> display_style
> +

I think additional verifications like this better belong to the
testsuite (unless they're just the quick assert line).

Also I'm not sure from the code if you allowed both --diffs and
--summarize to be specified together (thus displaying both the patch and
the summary).
-- 
Giovanni Bajo





More information about the Svnmerge mailing list