Make repos without VIEW_VC also post Committed to the codereview.

[email protected]
BUG=153446


Review URL: https://chromiumcodereview.appspot.com/11094033

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@160960 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gcl.py b/gcl.py
index 750e4ca..d043a35 100755
--- a/gcl.py
+++ b/gcl.py
@@ -1033,8 +1033,10 @@
                             re.DOTALL).match(output).group(1)
       viewvc_url = gclient_utils.UpgradeToHttps(GetCodeReviewSetting('VIEW_VC'))
       change_info.description += '\n'
-      if viewvc_url:
+      if viewvc_url and revision:
         change_info.description += "\nCommitted: " + viewvc_url + revision
+      elif revision:
+        change_info.description += "\nCommitted: " + revision
       change_info.CloseIssue()
   return 0
 
diff --git a/git_cl.py b/git_cl.py
index acd04a5..244259d 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -1384,6 +1384,8 @@
     viewvc_url = settings.GetViewVCUrl()
     if viewvc_url and revision:
       cl.description += ('\n\nCommitted: ' + viewvc_url + revision)
+    elif revision:
+      cl.description += ('\n\nCommitted: ' + revision)
     print ('Closing issue '
            '(you may be prompted for your codereview password)...')
     cl.CloseIssue()