command:target: Print full ID (bugdir/bug) on --resolve
authorW. Trevor King <wking@tremily.us>
Wed, 10 Jul 2013 14:07:37 +0000 (10:07 -0400)
committerW. Trevor King <wking@tremily.us>
Wed, 10 Jul 2013 14:07:37 +0000 (10:07 -0400)
The old implementation just printed the bug UUID (without the bugdir/
prefix).  This lead to the command we suggest in `be target --help`:

  $ be depend --status -closed,fixed,wontfix --severity -target \
    $(be target --resolve)

failing with an invalid ID.

Reported-by: Michael Sperber <sperber@deinprogramm.de>
libbe/command/target.py

index 6cf9cc6513d8fdbc86785801f8d41ab48bd173eb..20ffb578c1cbada8ecf5502ef5a6d337228749d2 100644 (file)
@@ -109,7 +109,7 @@ class Target (libbe.command.Command):
             if bug == None:
                 print >> self.stdout, 'No target assigned.'
             else:
-                print >> self.stdout, bug.uuid
+                print >> self.stdout, bug.id.long_user()
             return 0
         bugdir,bug,comment = (
             libbe.command.util.bugdir_bug_comment_from_user_id(