[Svnmerge] Re: Add "show blocked revisions" command to svnmerge.py
Daniel Rall
dlr at collab.net
Thu Apr 13 12:08:00 PDT 2006
On Thu, 13 Apr 2006, Madan S. wrote:
>
> Dan : I think hidden makes sense and is less verbose. Are you -1 if
> hidden is used? If so, pl. let me know (hey, I cant face the wrath
> of a committer, you know ;)
Reading the help for the 'block' command, I can see why you chose
'hidden' as a command name:
"""Block revisions within PATH so that they disappear from the available
list. This is useful to hide revisions which will not be integrated.
If --revision is omitted, it defaults to all the available revisions.
Do not use this option to hide revisions that were manually merged
into the branch. Instead, use '%s merge --record-only', which
records that a merge happened (as opposed to a merge which should
not happen)."""
That said, I'm still not fond of it, as the most common usage of the
word "hide" does not in my mind create an accurate description of the
command's behavior.
When svnmerge.py blocks revisions, it's not hiding them from view in
general, only hiding them from the 'avail' command. But svnmerge.py
is doing more than just that -- it's also preventing blocked revisions
from being merged from one branch to another.
block (transitive verb)
1. To make unsuitable for passage or progress by obstruction.
2. To hinder the passage, progress, or accomplishment of by or as if by interposing an obstruction.
3. To shut off from view <forest canopy blocking the sun>.
4. To interfere usually legitimately with (as an opponent) in various games or sports.
5. To prevent normal functioning of g : to restrict the exchange of (as currency or checks).
hide (transitive verb)
1. To put or keep out of sight; secrete.
2. To prevent the disclosure or recognition of; conceal: tried to hide the facts.
3. To cut off from sight; cover up: Clouds hid the stars.
4. To avert (one's gaze), especially in shame or grief.
I'm definitely +1 on the "show blocked revisions" functionality! More
comments inline below.
> [[[
> Implement 'svnmerge hidden'.
> 'svnmerge hidden' will list all the revisions marked as blocked, against
> the default or a given head (given by the -S/--head options).
>
> * contrib/client-side/svnmerge.py
> (action_hidden): New function to handle the 'svnmerge hidden' command.
> (command_table): Added new Option for handling the 'hidden' subcommand.
> ]]]
>
> PS : this patch assumes that the patch submitted at http://www.orcaware.com/pipermail/svnmerge/2006-April/000534.html has already been applied.
Yup, it's already applied. ;-)
> Index: contrib/client-side/svnmerge.py
> ===================================================================
> --- contrib/client-side/svnmerge.py (revision 19340)
> +++ contrib/client-side/svnmerge.py (working copy)
> @@ -993,6 +993,18 @@
> "revisions available to be merged are:",
> opts["head-url"])
>
> +def action_hidden(branch_dir, branch_props):
> + "Show all blocked revisions for the given branch_dir."
> +
> + revs = get_blocked_revs(branch_dir, opts["head-path"])
> +
> + # Limit to revisions specified by -r (if any)
> + if opts["revision"]:
> + revs = revs & RevisionSet(opts["revision"])
> +
> + display_revisions(revs, opts["hidden-display"],
> + "revisions blocked from view are:", opts["head-url"])
> +
I'd prefer the text "blocked from merge".
> def action_integrated(branch_dir, branch_props):
> """Show change sets already merged. This set of revisions is
> calculated from taking svnmerge-integrated property from the
> @@ -1634,6 +1646,25 @@
> [
> "-f", "-r", "-S", # import common opts
> ]),
> +
> + "hidden": (action_hidden,
> + "hidden [OPTION...] [PATH]",
> + """Show the revisions blocked for PATH as a revision list.
> + If --revision is given, the revisions shown will be limited to
> + those also specified in the option.""",
> + [
> + Option("-d", "--diff",
> + dest="hidden-display",
> + value="diffs",
> + default="revisions",
> + help="show corresponding diff instead of revision list"),
> + Option("-l", "--log",
> + dest="hidden-display",
> + value="logs",
> + help="show corresponding log history instead of revision list"),
> + "-r",
> + "-S",
> + ]),
> }
The patch looks really good, basically ready to apply after we
complete discussion of the command name.
--
Daniel Rall
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : /pipermail/svnmerge/attachments/20060413/827c1de3/attachment.pgp
More information about the Svnmerge
mailing list