Nicolas Évrard avatar Nicolas Évrard committed b30f263

Allow use of 'id' options without asking credentials

Comments (0)

Files changed (1)

hgreview/__init__.py

             repo.status(node1, node2, unknown=True)
 
     server = _get_server(ui)
+    if opts['id'] or opts['url']:
+        issue_id = _get_issue_id(repo) or ''
+        msg = '%s' % issue_id
+        if opts['url']:
+            msg = '%s/%s/' % (server, msg)
+        ui.status(msg, '\n')
+        return
+
     username = ui.config('review', 'username')
     if not username:
         username = GetEmail(ui)
                 open(issue_file, 'w').write(issue_id)
         return
 
-    if opts['id'] or opts['url']:
-        issue_id = _get_issue_id(repo) or ''
-        msg = '%s' % issue_id
-        if opts['url']:
-            msg = '%s/%s/' % (server, msg)
-        ui.status(msg, '\n')
-        return
-
     if unknown:
         ui.status('The following files are not added to version control:',
             '\n\n')
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.