| Index: git_cl.py | 
| diff --git a/git_cl.py b/git_cl.py | 
| index 869154cdc219e00444f941ee483f24a8317f312e..ae363fb216da5a19874c1c8266a4a267de26f63c 100755 | 
| --- a/git_cl.py | 
| +++ b/git_cl.py | 
| @@ -33,7 +33,7 @@ import rietveld | 
| import scm | 
| import subprocess2 | 
| import watchlists | 
| - | 
| +import find_owners | 
|  | 
| DEFAULT_SERVER = 'https://codereview.appspot.com' | 
| POSTUPSTREAM_HOOK_PATTERN = '.git/hooks/post-cl-%s' | 
| @@ -1817,6 +1817,28 @@ def CMDset_close(parser, args): | 
| cl.CloseIssue() | 
| return 0 | 
|  | 
| +def CMDowners(parser, args): | 
| +  """Interactively find the owners for reviewing""" | 
| +  group = optparse.OptionGroup(parser, "Find owners options") | 
| +  group.add_option( | 
| +      "--no-color", dest="ncolor", default=False, | 
| +      action="store_true", | 
| +      help=("Use this option to disable color output")) | 
| +  parser.add_option_group(group) | 
| +  opt, args = parser.parse_args(args) | 
| +  cl = Changelist() | 
| + | 
| +  if args: | 
| +    base_branch = args[0] | 
| +  else: | 
| +    # Default to diffing against the common ancestor of the upstream branch. | 
| +    base_branch = RunGit(['merge-base', cl.GetUpstreamBranch(), 'HEAD']).strip() | 
| + | 
| +  change = cl.GetChange(base_branch, None) | 
| +  return find_owners.FindOwners( | 
| +      [f.LocalPath() for f in | 
| +          cl.GetChange(base_branch, None).AffectedFiles()], | 
| +      change.RepositoryRoot(), opt.ncolor).run() | 
|  | 
| def Command(name): | 
| return getattr(sys.modules[__name__], 'CMD' + name, None) | 
|  |