The subject says it all really, but I'd like to have diffs and logs at
once without having to run svnmerge twice and merging the data. The
only thing extra I think I'd like is a delimiter line to collect the log
and diff together in the output, but this patch omits that feature.
Any interest?
-travis
P.S. Patched against r2749 of svnmerge.py
--- svnmerge.py-r27479 2007-10-29 20:59:19.000000000 -0600
+++ svnmerge.py 2007-10-29 21:00:14.000000000 -0600
@@ -1116,20 +1116,17 @@ def display_revisions(revs, display_styl
log format, or as diffs. When displaying revisions numerically,
prefix output with REVISIONS_MSG when in verbose mode. Otherwise,
request logs or diffs using SOURCE_URL."""
- if display_style == "revisions":
+ if "revisions" in display_style:
if revs:
report(revisions_msg)
print revs
- elif display_style == "logs":
+ display_style.remove("revisions")
+ if "logs" in display_style:
for start,end in revs.normalized():
svn_command('log --incremental -v -r %d:%d %s' % \
(start, end, source_url))
- elif display_style in ("diffs", "summarize"):
- if display_style == 'summarize':
- summarize = '--summarize '
- else:
- summarize = ''
-
+ display_style.remove("logs")
+ if "diffs" in display_style:
for start, end in revs.normalized():
print
if start == end:
@@ -1141,10 +1138,15 @@ def display_revisions(revs, display_styl
# Note: the starting revision number to 'svn diff' is
# NOT inclusive so we have to subtract one from ${START}.
- svn_command("diff -r %d:%d %s %s" % (start - 1, end, summarize,
- source_url))
- else:
- assert False, "unhandled display style: %s" % display_style
+ svn_command("diff -r %d:%d %s" % (start - 1, end, source_url))
+ display_style.remove("diffs")
+
+ 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
+
def action_init(target_dir, target_props):
"""Initialize for merges."""
@@ -1244,7 +1246,8 @@ def action_avail(branch_dir, branch_prop
if opts["revision"]:
revs = revs & RevisionSet(opts["revision"])
- display_revisions(revs, opts["avail-display"],
+ display_revisions(revs,
+ [opts["avail-display-diff"], opts["avail-display-log"]],
report_msg,
opts["source-url"])
@@ -1270,7 +1273,7 @@ def action_integrated(branch_dir, branch
if opts["revision"]:
revs = revs & RevisionSet(opts["revision"])
- display_revisions(revs, opts["integrated-display"],
+ display_revisions(revs, [opts["integrated-display"]],
"revisions already integrated are:", opts["source-url"])
def action_merge(branch_dir, branch_props):
@@ -1915,17 +1918,14 @@ command_table = {
value=["blocked"],
help="show the blocked revision list (see '%s block')" % NAME),
Option("-d", "--diff",
- dest="avail-display",
+ dest="avail-display-diff",
value="diffs",
default="revisions",
help="show corresponding diff instead of revision list"),
- Option("--summarize",
- dest="avail-display",
- value="summarize",
- help="show summarized diff instead of revision list"),
Option("-l", "--log",
- dest="avail-display",
+ dest="avail-display-log",
value="logs",
+ default="",
help="show corresponding log history instead of revision list"),
"-r",
"-S",
@@ -1945,6 +1945,7 @@ command_table = {
Option("-l", "--log",
dest="integrated-display",
value="logs",
+ default="",
help="show corresponding log history instead of revision list"),
"-r",
"-S",
_______________________________________________
Svnmerge mailing list
[email protected]
http://www.orcaware.com/mailman/listinfo/svnmerge