File: test-multiple-remotes.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 (77 lines) | stat: -rw-r--r-- 2,408 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Load commonly used test logic
  $ . "$TESTDIR/testutil"

  $ git init gitrepo
  Initialized empty Git repository in $TESTTMP/gitrepo/.git/
  $ cd gitrepo
  $ echo alpha > alpha
  $ git add alpha
  $ fn_git_commit -m "add alpha"
  $ git checkout -b not-master
  Switched to a new branch 'not-master'
  $ cd ..

  $ git clone --bare --quiet gitrepo repo.git

  $ hg init hgrepo
  $ cd hgrepo
  $ cat > .hg/hgrc <<EOF
  > [paths]
  > default:multi-urls = yes
  > default = path://git, path://bare
  > git = $TESTTMP/gitrepo
  > also-git = $TESTTMP/gitrepo
  > bare = $TESTTMP/repo.git
  > also-bare = $TESTTMP/repo.git
  > EOF

  $ hg pull
  pulling from $TESTTMP/gitrepo
  importing 1 git commits
  adding bookmark master
  adding bookmark not-master
  new changesets ff7a2f2d8d70 (1 drafts)
  (run 'hg update' to get a working copy)
  pulling from $TESTTMP/repo.git
  no changes found
  $ hg tags
  tip                                0:ff7a2f2d8d70
  git/not-master                     0:ff7a2f2d8d70
  git/master                         0:ff7a2f2d8d70
  bare/not-master                    0:ff7a2f2d8d70
  bare/master                        0:ff7a2f2d8d70
  also-git/not-master                0:ff7a2f2d8d70
  also-git/master                    0:ff7a2f2d8d70
  also-bare/not-master               0:ff7a2f2d8d70
  also-bare/master                   0:ff7a2f2d8d70

  $ hg up master
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  (activating bookmark master)
  $ echo beta > beta
  $ fn_hg_commit -A -m "add beta"
  $ hg push
  pushing to $TESTTMP/gitrepo
  searching for changes
  adding objects
  remote: found 0 deltas to reuse
  added 1 commits with 1 trees and 1 blobs
  updating reference refs/heads/master
  pushing to $TESTTMP/repo.git
  searching for changes
  adding objects
  remote: found 0 deltas to reuse
  added 1 commits with 1 trees and 1 blobs
  updating reference refs/heads/master

  $ hg tags
  tip                                1:47580592d3d6
  git/master                         1:47580592d3d6
  bare/master                        1:47580592d3d6
  also-git/master                    1:47580592d3d6
  also-bare/master                   1:47580592d3d6
  git/not-master                     0:ff7a2f2d8d70
  bare/not-master                    0:ff7a2f2d8d70
  also-git/not-master                0:ff7a2f2d8d70
  also-bare/not-master               0:ff7a2f2d8d70