[Svnmerge] [PATCH] Add an option to ignore ancestry
Blair Zajac
blair at orcaware.com
Mon Dec 11 20:22:40 PST 2006
I haven't spent any time looking at the meaning of ancestry and how
it impacts Subversion. Does anybody have any links?
Regards,
Blair
On Dec 11, 2006, at 6:20 PM, Daniel Rall wrote:
> I haven't tested it out yet, but this patch looks good. Unless
> someone beats me to it, I plan on committing it to trunk RSN.
>
> - Dan
>
> On Fri, 08 Dec 2006, Pazu wrote:
>
>> The following patch adds an option to pass '--ignore-ancestry'
>> when calling 'svn
>> merge'.
>>
>> Cheers,
>>
>> -- Pazu
>>
>> --- svnmerge-old 2006-12-07 20:49:16.000000000 -0200
>> +++ svnmerge 2006-12-08 10:54:42.000000000 -0200
>> @@ -1116,6 +1116,7 @@
>>
>> blocked_revs = get_blocked_revs(branch_dir, opts["source-path"])
>> merged_revs = opts["merged-revs"]
>> + ignore_ancestry = opts["ignore-ancestry"]
>>
>> # Show what we're doing
>> if opts["verbose"]: # just to avoid useless calculations
>> @@ -1128,6 +1129,8 @@
>> report('memorizing reflected revision(s): %s' %
>> reflected_revs)
>> if blocked_revs & revs:
>> report('skipping blocked revisions(s): %s' %
>> (blocked_revs & revs))
>> + if ignore_ancestry:
>> + report('ignoring ancestry')
>>
>> # Compute final merge set.
>> revs = revs - merged_revs - blocked_revs - reflected_revs -
>> phantom_revs
>> @@ -1163,8 +1166,8 @@
>>
>> if not record_only:
>> # Do the merge
>> - svn_command("merge -r %d:%d %s %s" % \
>> - (start - 1, end, opts["source-url"],
>> branch_dir))
>> + svn_command("merge %s-r %d:%d %s %s" % \
>> + (ignore_ancestry and "--ignore-ancestry "
>> or "", start
>>
>> # Write out commit message if desired
>> if opts["commit-file"]:
>> @@ -1289,6 +1292,7 @@
>> error(err_str)
>>
>> record_only = opts["record-only"]
>> + ignore_ancestry = opts["ignore-ancestry"]
>>
>> if record_only:
>> report('recording rollback of revision(s) %s from "%s"' %
>> @@ -1307,8 +1311,8 @@
>> for start, end in rollback_intervals:
>> if not record_only:
>> # Do the merge
>> - svn_command("merge -r %d:%d %s %s" % \
>> - (end, start - 1, opts["source-url"],
>> branch_dir))
>> + svn_command("merge %s-r %d:%d %s %s" % \
>> + (ignore_ancestry and "--ignore-ancestry "
>> or "", end, s
>>
>> # Write out commit message if desired
>> # calculate the phantom revs first
>> @@ -1804,6 +1808,9 @@
>> which should not be merged, use '%s block'.""" % (NAME, NAME),
>> [
>> "-b", "-f", "-r", "-S", "-M", # import common opts
>> + Option("-I", "--ignore-ancestry",
>> + default=False,
>> + help="pass '--ignore-ancestry' to svn merge"),
>> ]),
>>
>> "block": (action_block,
>>
>>
>> _______________________________________________
>> Svnmerge mailing list
>> Svnmerge at orcaware.com
>> http://www.orcaware.com/mailman/listinfo/svnmerge
> _______________________________________________
> Svnmerge mailing list
> Svnmerge at orcaware.com
> http://www.orcaware.com/mailman/listinfo/svnmerge
More information about the Svnmerge
mailing list