Title: [svnmerge][PATCH] Remove hardcoding of subcommands.

Now on, introducing a subcommand, would just be a matter
of appending an entry to the command_table dictionary (of
course that implies implementing the action_cmd() function
too ;).

[[[
Remove hard-coding for subcommand checking.

* contrib/client-side/svnmerge.py
  (main): Compare the given subcommand against the
command_table keys,
  instead of hard-coded values.
]]]

Index: contrib/client-side/svnmerge.py
===================================================================
--- contrib/client-side/svnmerge.py     (revision 19340)
+++ contrib/client-side/svnmerge.py     (working copy)
@@ -1661,7 +1661,7 @@
             head = args[0]
         elif len(args) > 1:
             optsparser.error("wrong number of parameters", cmd)
-    elif str(cmd) in ["avail", "integrated", "merge", "block", "unblock"]:
+    elif str(cmd) in command_table.keys():
         if len(args) == 1:
             branch_dir = args[0]
         elif len(args) > 1:
Remove hard-coding for subcommand checking.

* contrib/client-side/svnmerge.py
  (main): Compare the given subcommand against the command_table keys,
  instead of hard-coded values.
_______________________________________________
Svnmerge mailing list
[email protected]
http://www.orcaware.com/mailman/listinfo/svnmerge

Reply via email to