commit | 2630dd9787c1b75b70a980175ffa41b63f59e3b8 | [log] [tgz] |
---|---|---|
author | Doug Anderson <dianders@google.com> | Thu Apr 07 13:36:30 2011 -0700 |
committer | Shawn O. Pearce <sop@google.com> | Thu Apr 07 16:51:50 2011 -0400 |
tree | d160084fbdc7fcff49e6f52b7cf0212a52482692 | |
parent | dafb1d68d33137779c96a83c7e42cac0e7a27ca4 [diff] |
Fixed problems w/ 2nd repo init if first repo init had bad URL. This is the simplest fix: if we had problems syncing the manifest.git directory and we were the ones that created it, we should delete it. This doesn't try to do anything complex like try to recover from a .repo directory that got broken in some other way. This is filed as: <http://crosbug.com/13403> TEST=manual Init once with a bad URL: $ repo init -u http://foobar.example.com Getting manifest ... from http://foobar.example.com Connection closed by 172.22.121.77 error: Couldn't resolve host 'foobar.example.com' while accessing http://foobar.example.com/info/refs fatal: HTTP request failed fatal: cannot obtain manifest http://foobar.example.com Init again: identical to the first. Good: $ repo init -u http://foobar.example.com Getting manifest ... from http://foobar.example.com Connection closed by 172.22.121.77 error: Couldn't resolve host 'foobar.example.com' while accessing http://foobar.example.com/info/refs fatal: HTTP request failed fatal: cannot obtain manifest http://foobar.example.com Init with correct URL: $ repo init -u http://git.chromium.org/git/manifest -m minilayout.xml Getting manifest ... from http://git.chromium.org/git/manifest [ ... cut ... ] repo initialized in /.../repoiniterr Try a bad URL after a good one; it doesn't get saved (good): $ repo init -u http://foobar.example.com Connection closed by 172.22.121.77 error: Couldn't resolve host 'foobar.example.com' while accessing http://foobar.example.com/info/refs fatal: HTTP request failed fatal: cannot obtain manifest http://foobar.example.com Just to confirm, I can still do a good one after a bad... $ repo init -u http://git.chromium.org/git/manifest -m minilayout.xml Your Name [George Washington]: Your Email [george@washington.example.com]: Your identity is: George Washington <george@washington.example.com> is this correct [y/n]? y repo initialized in /.../repoiniterr Change-Id: I1692821a330d97b1d218b2e191a93245b33f2362