threads / patch / 32067

patchcontrib/remote-helpers: setup ui.username in test-hg.sh

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

## tl;dr

3 messages between Nov 11, 2012 and Nov 11, 2012. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Ramkumar Ramachandra· Nov 11, 2012, 10:41 UTC · lore

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(+)
Show changes to contrib/remote-helpers/test-hg.sh +9 −0
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· Nov 11, 2012, 12:39 UTC · re: Ramkumar Ramachandra · lore

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

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· Nov 11, 2012, 12:50 UTC · re: Felipe Contreras · lore

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

Felipe Contreras wrote:
Show 7 quoted lines
> 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

← back to recent threads