File: test-serve-git.t

package info (click to toggle)
hg-git 1.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,244 kB
  • sloc: python: 8,702; sh: 185; makefile: 23
file content (60 lines) | stat: -rw-r--r-- 2,250 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#require serve

Load commonly used test logic
  $ . "$TESTDIR/testutil"

Enable progress debugging:

  $ cat >> $HGRCPATH <<EOF
  > [progress]
  > delay = 0
  > refresh = 0
  > width = 60
  > format = topic unit total number item bar
  > assume-tty = yes
  > EOF

Create a dummy repository and serve it

  $ git init -q test
  $ cd test
  $ echo foo > foo
  $ git add foo
  $ fn_git_commit -m test
  $ echo bar > bar
  $ git add bar
  $ fn_git_commit -m test
  $ git daemon --listen=localhost --port=$HGPORT \
  > --pid-file=$DAEMON_PIDS --detach --export-all --verbose \
  > --base-path=$TESTTMP \
  > || exit 80
  $ cd ..

Make sure that clone over the old git protocol doesn't break

  $ hg clone -U git://localhost:$HGPORT/test copy 2>&1
  \r (no-eol) (esc)
  Counting objects 1/6 [=====>                              ]\r (no-eol) (esc)
  Counting objects 2/6 [===========>                        ]\r (no-eol) (esc)
  Counting objects 3/6 [=================>                  ]\r (no-eol) (esc)
  Counting objects 4/6 [=======================>            ]\r (no-eol) (esc)
  Counting objects 5/6 [=============================>      ]\r (no-eol) (esc)
  Counting objects 6/6 [===================================>]\r (no-eol) (esc)
                                                              \r (no-eol) (esc)
  \r (no-eol) (esc)
  Compressing objects 1/3 [==========>                      ]\r (no-eol) (esc)
  Compressing objects 2/3 [=====================>           ]\r (no-eol) (esc)
  Compressing objects 3/3 [================================>]\r (no-eol) (esc)
                                                              \r (no-eol) (esc)
  \r (no-eol) (esc)
  importing commits 1/2 b23744d34f97         [======>       ]\r (no-eol) (esc)
  importing commits 2/2 3af9773036a9         [=============>]\r (no-eol) (esc)
                                                              \r (no-eol) (esc)
  importing 2 git commits
  new changesets c4d188f6e13d:221dd250e933
  $ hg log -T 'HG:{node|short} GIT:{gitnode|short}\n' -R copy
  HG:221dd250e933 GIT:3af9773036a9
  HG:c4d188f6e13d GIT:b23744d34f97
  $ hg tags -v -R copy
  tip                                1:221dd250e933
  default/master                     1:221dd250e933 git-remote