Giovanni Bajo wrote:
> This patch is OK together with the testcase. Please commit both.
Thanks for the review Giovanni.
>> # Write out commit message if desired
>> if opts["commit-file"]:
>> @@ -1202,6 +1199,8 @@
>> merged_revs = merged_revs | revs | reflected_revs | phantom_revs
>> branch_props[opts["source-path"]] = str(merged_revs)
>> set_merge_props(branch_dir, branch_props)
>> + # Reset the blocked revs
>> + set_block_props(branch_dir, old_block_props)
>
> Bonus points for a follow-up patch that moves the merge_props store to
> *before* the generation of the commit message. This allows to use CTRL+C to
> break the generation of the commit message, without leaving the working copy
> in an inconsistent state.
Attached.
[[[
Move the post-merge merge_props and blocked_props update to *before*
the generation of the commit message. This allows a CTRL+C interrupt
to break the generation of the commit message, without leaving the
working copy in an inconsistent state. Requested by Giovanni Bajo.
* contrib/client-side/svnmerge.py:
(action_merge): Move the commit log generation to the end of the
method.
Patch by: Raman Gupta <[EMAIL PROTECTED]>
Review by: ?
]]]
Cheers,
Raman
diff --git a/svnmerge/svnmerge.py b/svnmerge/svnmerge.py
index dac8af6..f55505d 100755
--- a/svnmerge/svnmerge.py
+++ b/svnmerge/svnmerge.py
@@ -1178,6 +1178,13 @@ def action_merge(branch_dir, branch_props):
(start - 1, end, opts["source-url"], branch_dir))
# TODO: to support graph merging, add logic to merge the property meta-data manually
+ # Update the set of merged revisions.
+ merged_revs = merged_revs | revs | reflected_revs | phantom_revs
+ branch_props[opts["source-path"]] = str(merged_revs)
+ set_merge_props(branch_dir, branch_props)
+ # Reset the blocked revs
+ set_block_props(branch_dir, old_block_props)
+
# Write out commit message if desired
if opts["commit-file"]:
f = open(opts["commit-file"], "w")
@@ -1195,13 +1202,6 @@ def action_merge(branch_dir, branch_props):
f.close()
report('wrote commit message to "%s"' % opts["commit-file"])
- # Update the set of merged revisions.
- merged_revs = merged_revs | revs | reflected_revs | phantom_revs
- branch_props[opts["source-path"]] = str(merged_revs)
- set_merge_props(branch_dir, branch_props)
- # Reset the blocked revs
- set_block_props(branch_dir, old_block_props)
-
def action_block(branch_dir, branch_props):
"""Block revisions."""
# Check branch directory is ready for being modified
_______________________________________________
Svnmerge mailing list
[email protected]
http://www.orcaware.com/mailman/listinfo/svnmerge