Stop using $USER in misc/review

For folks whose $USER doesn't match their
Gerrit username, editing misc/review is not a
great solution, since the changes cannot be
committed (nf notwithstanding).

Instead, let ssh config files do their thing;
these are not part of the repo, and thus can
be set once and merrily forgotten.

Change-Id: If03fe05e5779553ed1f98310e8f22b0635ada7bb
This commit is contained in:
Josh Bleecher Snyder 2013-06-04 17:30:23 -07:00
parent 481bdf346a
commit 224e25d8cc
2 changed files with 7 additions and 5 deletions

View File

@ -25,7 +25,4 @@ scalar(<STDIN>);
system("git", "commit", "--amend") and die "git commit --amend fail\n"; system("git", "commit", "--amend") and die "git commit --amend fail\n";
} }
my $user = $ENV{USER}; exec("git", "push", "ssh://camlistore.org:29418/camlistore", "HEAD:refs/for/master");
$user = "adg" if $user eq "nf";
exec("git", "push", "ssh://$user\@camlistore.org:29418/camlistore", "HEAD:refs/for/master");

View File

@ -23,7 +23,12 @@
<ul class='lispaced'> <ul class='lispaced'>
<li>Camlistore requires changes to be reviewed before they are committed.</li> <li>Camlistore requires changes to be reviewed before they are committed.</li>
<li>Sign in to Gerrit at <a href="http://camlistore.org/r/">http://camlistore.org/r/</a> and set your username + SSH key(s). <li>Sign in to Gerrit at <a href="http://camlistore.org/r/">http://camlistore.org/r/</a> and set your username + SSH key(s).
You'll want your Gerrit username to be the same as your local machine's $USER, else you'll need to modify the misc/review script.</li> If your Gerrit username is not the same as your local machine's $USER, add a section like:
<pre>
Host camlistore.org
User &lt;your-gerrit-username&gt;
</pre>
to your ssh config file (probably <tt>~/.ssh/config</tt>).</li>
<li>Usual Work Flow</li> <li>Usual Work Flow</li>
<ul> <ul>
<li>Create a topic branch. Commit away. If you modify or squash your commits during review, don't touch <a href="http://gerrit.googlecode.com/svn/documentation/2.2.1/user-changeid.html">the Change-Id line</a>.</li> <li>Create a topic branch. Commit away. If you modify or squash your commits during review, don't touch <a href="http://gerrit.googlecode.com/svn/documentation/2.2.1/user-changeid.html">the Change-Id line</a>.</li>