On Wed, 2007-10-31 at 09:06 +0100, Giovanni Bajo wrote:
>
> I'm OK with the feature, but your patch is wrong because you are
> reverting the --summarize patch that was added last week. You probably
> had a merge problem or something (like you updated, but you had the file
> already opened in an editor which is not smart enough to detect
> externally modified files).
>
> Please correct and resubmit.
Attached is a patch against svn current including required changes to
the --summarize option. Note that -d, -l, and --summarize can all be
used individually or simultaneously.
Here is the changelog.
[[[
* trunk/contrib/client-side/svnmerge/svnmerge.py
(display_revisions): display_style is now a list of styles any of which
can be used either individually or simultaneously.
(command_table): Used unique dest vars all of which will be added to the
list
passed to display_revisions.
]]]
-travis
--- /home/travis/svnmerge.py 2007-10-31 16:08:05.000000000 -0600
+++ ./svnmerge.py 2007-10-31 16:28:26.000000000 -0600
@@ -1116,16 +1116,18 @@ 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':
+ display_style.remove("logs")
+ if "diffs" in display_style or "summarize" in display_style:
+ if "summarize" in display_style:
summarize = '--summarize '
else:
summarize = ''
@@ -1141,10 +1143,20 @@ 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))
+
+ for style in ["diffs", "summarize"]:
+ try:
+ display_style.remove(style)
+ except ValueError:
+ continue
+
+ 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 +1256,10 @@ 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"],
+ opts["avail-display-summarize"]],
report_msg,
opts["source-url"])
@@ -1270,7 +1285,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 +1930,19 @@ 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",
+ dest="avail-display-summarize",
value="summarize",
+ default="",
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 +1962,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