# [PATCH] contrib/remote-helpers: setup ui.username in test-hg.sh

3 messages from 2012-11-11 to 2012-11-11. Participants: Ramkumar Ramachandra, Felipe Contreras.
Thread: https://gitlist.dev/t/32067

## Ramkumar Ramachandra, 2012-11-11 10:41

Subject: [PATCH] contrib/remote-helpers: setup ui.username in test-hg.sh
Message-ID: <CALkWK0kguFpA3ExSt7YKtugWq-0FvNQ=QFaKUo6uUjt8+=5mfw@mail.gmail.com>
URL: https://gitlist.dev/e/CALkWK0kguFpA3ExSt7YKtugWq-0FvNQ%3DQFaKUo6uUjt8%2B%3D5mfw%40mail.gmail.com

```
test-hg.sh forgets to set ui.username, which is required for `hg
commit`.  Fix this.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 Squash this into fc/remote-hg in pu?

 contrib/remote-helpers/test-hg.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/contrib/remote-helpers/test-hg.sh
b/contrib/remote-helpers/test-hg.sh
index 40e6e3c..031dcbd 100755
--- a/contrib/remote-helpers/test-hg.sh
+++ b/contrib/remote-helpers/test-hg.sh
@@ -29,6 +29,15 @@ check () {
        test_cmp expected actual
 }

+setup () {
+       (
+       echo "[ui]"
+       echo "username = A U Thor <author@example.com>"
+       ) >> "$HOME"/.hgrc
+}
+
+setup
+
 test_expect_success 'cloning' '
   test_when_finished "rm -rf gitrepo*" &&

-- 
1.7.12.1.428.g652398a.dirty

```

## Felipe Contreras, 2012-11-11 12:39

Subject: Re: [PATCH] contrib/remote-helpers: setup ui.username in test-hg.sh
Message-ID: <CAMP44s3cx9EHfM7wEX3zV-MXqX11VusYj8W9cL63mFTUq+_C+Q@mail.gmail.com>
URL: https://gitlist.dev/e/CAMP44s3cx9EHfM7wEX3zV-MXqX11VusYj8W9cL63mFTUq%2B_C%2BQ%40mail.gmail.com
In-Reply-To: <CALkWK0kguFpA3ExSt7YKtugWq-0FvNQ=QFaKUo6uUjt8+=5mfw@mail.gmail.com>

```
On Sun, Nov 11, 2012 at 11:41 AM, Ramkumar Ramachandra
<artagnon@gmail.com> wrote:
> test-hg.sh forgets to set ui.username, which is required for `hg
> commit`.  Fix this.

Hmm, I get 'no username found, using 'felipec@nysa' instead', but
everything works fine.

Doesn't hurt to do that though.

Cheers.

-- 
Felipe Contreras

```

## Ramkumar Ramachandra, 2012-11-11 12:50

Subject: Re: [PATCH] contrib/remote-helpers: setup ui.username in test-hg.sh
Message-ID: <CALkWK0kjYDtzS3tk9EurWya+w+aohuzqBC-2sqiuZ6emdXhPyA@mail.gmail.com>
URL: https://gitlist.dev/e/CALkWK0kjYDtzS3tk9EurWya%2Bw%2BaohuzqBC-2sqiuZ6emdXhPyA%40mail.gmail.com
In-Reply-To: <CAMP44s3cx9EHfM7wEX3zV-MXqX11VusYj8W9cL63mFTUq+_C+Q@mail.gmail.com>

```
Felipe Contreras wrote:
> On Sun, Nov 11, 2012 at 11:41 AM, Ramkumar Ramachandra
> <artagnon@gmail.com> wrote:
>> test-hg.sh forgets to set ui.username, which is required for `hg
>> commit`.  Fix this.
>
> Hmm, I get 'no username found, using 'felipec@nysa' instead', but
> everything works fine.

I get:

  abort: no username supplied (see "hg help config")

And the test aborts.

Ram

```
