Commits

Steve Losh committed 53aadb5

cli: automatically clone the review data with --web

  • Participants
  • Parent commits 9cd3f10

Comments (0)

Files changed (3)

 Now you need a repository that has code review enabled.  Luckily, you've
 already got one -- hg-review uses itself for code review. 
 
-``cd`` into the directory you cloned hg-review to and initialize the review
-data, then start the web interface::
+``cd`` into the directory you cloned hg-review to and start the web interface::
 
     cd hg-review
-    hg review --init
     hg review --web
 
 Open http://localhost:8080/ in your browser of choice and poke around. Check

docs/overview.rst

 '''''''''''''''''''''''''''''''''''
 
 If you want to work with a repository that already has code review set up all
-you need to do is cd into that repository, pull down the review data, and fire
-up the web ui::
+you need to do is cd into that repository, and fire up the web ui::
 
     cd ~/src/someproject
-    hg review --init
     hg review --web
 
 Once that's done you can visit http://localhost:8080/ in your browser to start
     allow_anon = opts.pop('allow_anon')
     address = opts.pop('address')
     port = int(opts.pop('port'))
+
+    if api.review_initialized(repo) and not api.local_datastore_exists(repo):
+        _init_command(ui, repo, remote_path=None)
+
     rd = _get_datastore(ui, repo)
 
     import web