Mercurial > hg-git
annotate tests/test-pull.t @ 1056:312c4bb96e68
tests: update globs so ssh command injection tests pass on macOS
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Mon, 23 Oct 2017 14:41:36 -0500 |
parents | c35751c248c3 |
children |
rev | line source |
---|---|
575
a7da97e69d56
tests: extract extension configuration into a testutil library
David M. Carr <david@carrclan.us>
parents:
569
diff
changeset
|
1 Load commonly used test logic |
a7da97e69d56
tests: extract extension configuration into a testutil library
David M. Carr <david@carrclan.us>
parents:
569
diff
changeset
|
2 $ . "$TESTDIR/testutil" |
a7da97e69d56
tests: extract extension configuration into a testutil library
David M. Carr <david@carrclan.us>
parents:
569
diff
changeset
|
3 |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
4 set up a git repo with some commits, branches and a tag |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
5 $ git init -q gitrepo |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
6 $ cd gitrepo |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
7 $ echo alpha > alpha |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
8 $ git add alpha |
576
c4849b2dab87
tests: extract commonly used commit/tag functions into testutil library
David M. Carr <david@carrclan.us>
parents:
575
diff
changeset
|
9 $ fn_git_commit -m 'add alpha' |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
10 $ git tag t_alpha |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
11 $ git checkout -qb beta |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
12 $ echo beta > beta |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
13 $ git add beta |
576
c4849b2dab87
tests: extract commonly used commit/tag functions into testutil library
David M. Carr <david@carrclan.us>
parents:
575
diff
changeset
|
14 $ fn_git_commit -m 'add beta' |
704
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
15 $ git checkout -qb delta master |
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
16 $ echo delta > delta |
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
17 $ git add delta |
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
18 $ fn_git_commit -m 'add delta' |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
19 $ cd .. |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
20 |
706
5e74edb7a62d
safebranchrevs: handle changelog having no commits
Siddharth Agarwal <sid0@fb.com>
parents:
705
diff
changeset
|
21 pull a tag |
5e74edb7a62d
safebranchrevs: handle changelog having no commits
Siddharth Agarwal <sid0@fb.com>
parents:
705
diff
changeset
|
22 $ hg init hgrepo |
5e74edb7a62d
safebranchrevs: handle changelog having no commits
Siddharth Agarwal <sid0@fb.com>
parents:
705
diff
changeset
|
23 $ echo "[paths]" >> hgrepo/.hg/hgrc |
5e74edb7a62d
safebranchrevs: handle changelog having no commits
Siddharth Agarwal <sid0@fb.com>
parents:
705
diff
changeset
|
24 $ echo "default=$TESTTMP/gitrepo" >> hgrepo/.hg/hgrc |
5e74edb7a62d
safebranchrevs: handle changelog having no commits
Siddharth Agarwal <sid0@fb.com>
parents:
705
diff
changeset
|
25 $ hg -R hgrepo pull -r t_alpha |
5e74edb7a62d
safebranchrevs: handle changelog having no commits
Siddharth Agarwal <sid0@fb.com>
parents:
705
diff
changeset
|
26 pulling from $TESTTMP/gitrepo |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
27 importing git objects into hg |
706
5e74edb7a62d
safebranchrevs: handle changelog having no commits
Siddharth Agarwal <sid0@fb.com>
parents:
705
diff
changeset
|
28 (run 'hg update' to get a working copy) |
5e74edb7a62d
safebranchrevs: handle changelog having no commits
Siddharth Agarwal <sid0@fb.com>
parents:
705
diff
changeset
|
29 $ hg -R hgrepo update t_alpha |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
30 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
31 $ hg -R hgrepo log --graph |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
32 @ changeset: 0:ff7a2f2d8d70 |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
33 bookmark: master |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
34 tag: default/master |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
35 tag: t_alpha |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
36 tag: tip |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
37 user: test <test@example.org> |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
38 date: Mon Jan 01 00:00:10 2007 +0000 |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
39 summary: add alpha |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
40 |
705
4e0e9e25b03b
test-pull.t: add test for no-op pull
Siddharth Agarwal <sid0@fb.com>
parents:
704
diff
changeset
|
41 no-op pull |
4e0e9e25b03b
test-pull.t: add test for no-op pull
Siddharth Agarwal <sid0@fb.com>
parents:
704
diff
changeset
|
42 $ hg -R hgrepo pull -r t_alpha |
4e0e9e25b03b
test-pull.t: add test for no-op pull
Siddharth Agarwal <sid0@fb.com>
parents:
704
diff
changeset
|
43 pulling from $TESTTMP/gitrepo |
4e0e9e25b03b
test-pull.t: add test for no-op pull
Siddharth Agarwal <sid0@fb.com>
parents:
704
diff
changeset
|
44 no changes found |
4e0e9e25b03b
test-pull.t: add test for no-op pull
Siddharth Agarwal <sid0@fb.com>
parents:
704
diff
changeset
|
45 |
4e0e9e25b03b
test-pull.t: add test for no-op pull
Siddharth Agarwal <sid0@fb.com>
parents:
704
diff
changeset
|
46 no-op pull with added bookmark |
4e0e9e25b03b
test-pull.t: add test for no-op pull
Siddharth Agarwal <sid0@fb.com>
parents:
704
diff
changeset
|
47 $ cd gitrepo |
4e0e9e25b03b
test-pull.t: add test for no-op pull
Siddharth Agarwal <sid0@fb.com>
parents:
704
diff
changeset
|
48 $ git checkout -qb epsilon t_alpha |
4e0e9e25b03b
test-pull.t: add test for no-op pull
Siddharth Agarwal <sid0@fb.com>
parents:
704
diff
changeset
|
49 $ cd .. |
4e0e9e25b03b
test-pull.t: add test for no-op pull
Siddharth Agarwal <sid0@fb.com>
parents:
704
diff
changeset
|
50 $ hg -R hgrepo pull -r epsilon |
4e0e9e25b03b
test-pull.t: add test for no-op pull
Siddharth Agarwal <sid0@fb.com>
parents:
704
diff
changeset
|
51 pulling from $TESTTMP/gitrepo |
4e0e9e25b03b
test-pull.t: add test for no-op pull
Siddharth Agarwal <sid0@fb.com>
parents:
704
diff
changeset
|
52 no changes found |
4e0e9e25b03b
test-pull.t: add test for no-op pull
Siddharth Agarwal <sid0@fb.com>
parents:
704
diff
changeset
|
53 |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
54 pull a branch |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
55 $ hg -R hgrepo pull -r beta |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
56 pulling from $TESTTMP/gitrepo |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
57 importing git objects into hg |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
58 (run 'hg update' to get a working copy) |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
59 $ hg -R hgrepo log --graph |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
60 o changeset: 1:7fe02317c63d |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
61 | bookmark: beta |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
62 | tag: default/beta |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
63 | tag: tip |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
64 | user: test <test@example.org> |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
65 | date: Mon Jan 01 00:00:11 2007 +0000 |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
66 | summary: add beta |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
67 | |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
68 @ changeset: 0:ff7a2f2d8d70 |
705
4e0e9e25b03b
test-pull.t: add test for no-op pull
Siddharth Agarwal <sid0@fb.com>
parents:
704
diff
changeset
|
69 bookmark: epsilon |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
70 bookmark: master |
705
4e0e9e25b03b
test-pull.t: add test for no-op pull
Siddharth Agarwal <sid0@fb.com>
parents:
704
diff
changeset
|
71 tag: default/epsilon |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
72 tag: default/master |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
73 tag: t_alpha |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
74 user: test <test@example.org> |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
75 date: Mon Jan 01 00:00:10 2007 +0000 |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
76 summary: add alpha |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
77 |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
78 add another commit and tag to the git repo |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
79 $ cd gitrepo |
704
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
80 $ git checkout -q beta |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
81 $ git tag t_beta |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
82 $ git checkout -q master |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
83 $ echo gamma > gamma |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
84 $ git add gamma |
576
c4849b2dab87
tests: extract commonly used commit/tag functions into testutil library
David M. Carr <david@carrclan.us>
parents:
575
diff
changeset
|
85 $ fn_git_commit -m 'add gamma' |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
86 $ cd .. |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
87 |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
88 pull everything else |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
89 $ hg -R hgrepo pull |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
90 pulling from $TESTTMP/gitrepo |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
91 importing git objects into hg |
703
4cddcb768cf4
git_handler.fetch: actually return number of heads added or removed
Siddharth Agarwal <sid0@fb.com>
parents:
579
diff
changeset
|
92 (run 'hg heads' to see heads, 'hg merge' to merge) |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
93 $ hg -R hgrepo log --graph |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
94 o changeset: 3:6f898ad1f3e1 |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
95 | bookmark: master |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
96 | tag: default/master |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
97 | tag: tip |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
98 | parent: 0:ff7a2f2d8d70 |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
99 | user: test <test@example.org> |
704
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
100 | date: Mon Jan 01 00:00:13 2007 +0000 |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
101 | summary: add gamma |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
102 | |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
103 | o changeset: 2:678ebee93e38 |
704
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
104 |/ bookmark: delta |
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
105 | tag: default/delta |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
106 | parent: 0:ff7a2f2d8d70 |
704
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
107 | user: test <test@example.org> |
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
108 | date: Mon Jan 01 00:00:12 2007 +0000 |
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
109 | summary: add delta |
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
110 | |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
111 | o changeset: 1:7fe02317c63d |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
112 |/ bookmark: beta |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
113 | tag: default/beta |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
114 | tag: t_beta |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
115 | user: test <test@example.org> |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
116 | date: Mon Jan 01 00:00:11 2007 +0000 |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
117 | summary: add beta |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
118 | |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
119 @ changeset: 0:ff7a2f2d8d70 |
705
4e0e9e25b03b
test-pull.t: add test for no-op pull
Siddharth Agarwal <sid0@fb.com>
parents:
704
diff
changeset
|
120 bookmark: epsilon |
4e0e9e25b03b
test-pull.t: add test for no-op pull
Siddharth Agarwal <sid0@fb.com>
parents:
704
diff
changeset
|
121 tag: default/epsilon |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
122 tag: t_alpha |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
123 user: test <test@example.org> |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
124 date: Mon Jan 01 00:00:10 2007 +0000 |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
125 summary: add alpha |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
126 |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
127 add a merge to the git repo |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
128 $ cd gitrepo |
569
92aa31a3a1dd
test-pull.t: normalize git-merge output
Augie Fackler <raf@durin42.com>
parents:
566
diff
changeset
|
129 $ git merge beta | sed 's/| */| /' |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
130 Merge made by the 'recursive' strategy. |
569
92aa31a3a1dd
test-pull.t: normalize git-merge output
Augie Fackler <raf@durin42.com>
parents:
566
diff
changeset
|
131 beta | 1 + |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
132 1 file changed, 1 insertion(+) |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
133 create mode 100644 beta |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
134 $ cd .. |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
135 |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
136 pull the merge |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
137 $ hg -R hgrepo pull |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
138 pulling from $TESTTMP/gitrepo |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
139 importing git objects into hg |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
140 (run 'hg update' to get a working copy) |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
141 $ hg -R hgrepo log --graph |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
142 o changeset: 4:a02330f767a4 |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
143 |\ bookmark: master |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
144 | | tag: default/master |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
145 | | tag: tip |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
146 | | parent: 3:6f898ad1f3e1 |
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
147 | | parent: 1:7fe02317c63d |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
148 | | user: test <test@example.org> |
704
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
149 | | date: Mon Jan 01 00:00:13 2007 +0000 |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
150 | | summary: Merge branch 'beta' |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
151 | | |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
152 | o changeset: 3:6f898ad1f3e1 |
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
153 | | parent: 0:ff7a2f2d8d70 |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
154 | | user: test <test@example.org> |
704
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
155 | | date: Mon Jan 01 00:00:13 2007 +0000 |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
156 | | summary: add gamma |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
157 | | |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
158 | | o changeset: 2:678ebee93e38 |
704
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
159 | |/ bookmark: delta |
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
160 | | tag: default/delta |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
161 | | parent: 0:ff7a2f2d8d70 |
704
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
162 | | user: test <test@example.org> |
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
163 | | date: Mon Jan 01 00:00:12 2007 +0000 |
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
164 | | summary: add delta |
373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Siddharth Agarwal <sid0@fb.com>
parents:
703
diff
changeset
|
165 | | |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
166 o | changeset: 1:7fe02317c63d |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
167 |/ bookmark: beta |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
168 | tag: default/beta |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
169 | tag: t_beta |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
170 | user: test <test@example.org> |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
171 | date: Mon Jan 01 00:00:11 2007 +0000 |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
172 | summary: add beta |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
173 | |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
174 @ changeset: 0:ff7a2f2d8d70 |
705
4e0e9e25b03b
test-pull.t: add test for no-op pull
Siddharth Agarwal <sid0@fb.com>
parents:
704
diff
changeset
|
175 bookmark: epsilon |
4e0e9e25b03b
test-pull.t: add test for no-op pull
Siddharth Agarwal <sid0@fb.com>
parents:
704
diff
changeset
|
176 tag: default/epsilon |
563
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
177 tag: t_alpha |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
178 user: test <test@example.org> |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
179 date: Mon Jan 01 00:00:10 2007 +0000 |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
180 summary: add alpha |
af4d66e2bc6e
pull: don't pull tags as bookmarks
David M. Carr <david@carrclan.us>
parents:
diff
changeset
|
181 |
820
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
182 pull with wildcards |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
183 $ cd gitrepo |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
184 $ git checkout -qb releases/v1 master |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
185 $ echo zeta > zeta |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
186 $ git add zeta |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
187 $ fn_git_commit -m 'add zeta' |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
188 $ git checkout -qb releases/v2 master |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
189 $ echo eta > eta |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
190 $ git add eta |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
191 $ fn_git_commit -m 'add eta' |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
192 $ git checkout -qb notreleases/v1 master |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
193 $ echo theta > theta |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
194 $ git add theta |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
195 $ fn_git_commit -m 'add theta' |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
196 |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
197 ensure that releases/v1 and releases/v2 are pulled but not notreleases/v1 |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
198 $ cd .. |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
199 $ hg -R hgrepo pull -r 'releases/*' |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
200 pulling from $TESTTMP/gitrepo |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
201 importing git objects into hg |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
202 (run 'hg heads .' to see heads, 'hg merge' to merge) |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
203 $ hg -R hgrepo log --graph |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
204 o changeset: 6:a3f95e150b0a |
820
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
205 | bookmark: releases/v2 |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
206 | tag: default/releases/v2 |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
207 | tag: tip |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
208 | parent: 4:a02330f767a4 |
820
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
209 | user: test <test@example.org> |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
210 | date: Mon Jan 01 00:00:15 2007 +0000 |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
211 | summary: add eta |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
212 | |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
213 | o changeset: 5:218b2d0660d3 |
820
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
214 |/ bookmark: releases/v1 |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
215 | tag: default/releases/v1 |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
216 | user: test <test@example.org> |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
217 | date: Mon Jan 01 00:00:14 2007 +0000 |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
218 | summary: add zeta |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
219 | |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
220 o changeset: 4:a02330f767a4 |
820
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
221 |\ bookmark: master |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
222 | | tag: default/master |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
223 | | parent: 3:6f898ad1f3e1 |
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
224 | | parent: 1:7fe02317c63d |
820
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
225 | | user: test <test@example.org> |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
226 | | date: Mon Jan 01 00:00:13 2007 +0000 |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
227 | | summary: Merge branch 'beta' |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
228 | | |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
229 | o changeset: 3:6f898ad1f3e1 |
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
230 | | parent: 0:ff7a2f2d8d70 |
820
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
231 | | user: test <test@example.org> |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
232 | | date: Mon Jan 01 00:00:13 2007 +0000 |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
233 | | summary: add gamma |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
234 | | |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
235 | | o changeset: 2:678ebee93e38 |
820
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
236 | |/ bookmark: delta |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
237 | | tag: default/delta |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
238 | | parent: 0:ff7a2f2d8d70 |
820
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
239 | | user: test <test@example.org> |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
240 | | date: Mon Jan 01 00:00:12 2007 +0000 |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
241 | | summary: add delta |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
242 | | |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
243 o | changeset: 1:7fe02317c63d |
820
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
244 |/ bookmark: beta |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
245 | tag: default/beta |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
246 | tag: t_beta |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
247 | user: test <test@example.org> |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
248 | date: Mon Jan 01 00:00:11 2007 +0000 |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
249 | summary: add beta |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
250 | |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
251 @ changeset: 0:ff7a2f2d8d70 |
820
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
252 bookmark: epsilon |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
253 tag: default/epsilon |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
254 tag: t_alpha |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
255 user: test <test@example.org> |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
256 date: Mon Jan 01 00:00:10 2007 +0000 |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
257 summary: add alpha |
0d6d2fcc62b6
git_handler: support wildcards for Git branch name matching
Siddharth Agarwal <sid0@fb.com>
parents:
706
diff
changeset
|
258 |
822 | 259 |
260 add old and new commits to the git repo -- make sure we're using the commit date | |
261 and not the author date | |
262 $ cat >> $HGRCPATH <<EOF | |
263 > [git] | |
264 > mindate = 2014-01-02 00:00:00 +0000 | |
265 > EOF | |
266 $ cd gitrepo | |
267 $ git checkout -q master | |
268 $ echo oldcommit > oldcommit | |
269 $ git add oldcommit | |
270 $ GIT_AUTHOR_DATE="2014-03-01 00:00:00 +0000" \ | |
271 > GIT_COMMITTER_DATE="2009-01-01 00:00:00 +0000" \ | |
272 > git commit -m oldcommit > /dev/null || echo "git commit error" | |
826
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
273 also add an annotated tag |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
274 $ git checkout -q master^ |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
275 $ echo oldtag > oldtag |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
276 $ git add oldtag |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
277 $ GIT_AUTHOR_DATE="2014-03-01 00:00:00 +0000" \ |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
278 > GIT_COMMITTER_DATE="2009-01-01 00:00:00 +0000" \ |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
279 > git commit -m oldtag > /dev/null || echo "git commit error" |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
280 $ GIT_COMMITTER_DATE="2009-02-01 00:00:00 +0000" \ |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
281 > git tag -a -m 'tagging oldtag' oldtag |
822 | 282 $ cd .. |
283 $ hg -R hgrepo pull | |
284 pulling from $TESTTMP/gitrepo | |
285 no changes found | |
286 $ hg -R hgrepo log -r master | |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
287 changeset: 4:a02330f767a4 |
822 | 288 bookmark: master |
929
1a1d90e38651
refs: use dulwich to read remote refs
Sean Farley <sean@farley.io>
parents:
844
diff
changeset
|
289 tag: default/master |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
290 parent: 3:6f898ad1f3e1 |
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
291 parent: 1:7fe02317c63d |
822 | 292 user: test <test@example.org> |
293 date: Mon Jan 01 00:00:13 2007 +0000 | |
294 summary: Merge branch 'beta' | |
295 | |
296 | |
297 $ cd gitrepo | |
826
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
298 $ git checkout -q master |
822 | 299 $ echo newcommit > newcommit |
300 $ git add newcommit | |
301 $ GIT_AUTHOR_DATE="2014-01-01 00:00:00 +0000" \ | |
302 > GIT_COMMITTER_DATE="2014-01-02 00:00:00 +0000" \ | |
303 > git commit -m newcommit > /dev/null || echo "git commit error" | |
826
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
304 $ git checkout -q refs/tags/oldtag |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
305 $ GIT_COMMITTER_DATE="2014-01-02 00:00:00 +0000" \ |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
306 > git tag -a -m 'tagging newtag' newtag |
822 | 307 $ cd .. |
308 $ hg -R hgrepo pull | |
309 pulling from $TESTTMP/gitrepo | |
310 importing git objects into hg | |
311 (run 'hg heads .' to see heads, 'hg merge' to merge) | |
826
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
312 $ hg -R hgrepo heads |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
313 changeset: 9:e103a73f33be |
822 | 314 bookmark: master |
315 tag: default/master | |
316 tag: tip | |
317 user: test <test@example.org> | |
318 date: Wed Jan 01 00:00:00 2014 +0000 | |
319 summary: newcommit | |
320 | |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
321 changeset: 7:49713da8f665 |
826
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
322 tag: newtag |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
323 tag: oldtag |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
324 parent: 4:a02330f767a4 |
826
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
325 user: test <test@example.org> |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
326 date: Sat Mar 01 00:00:00 2014 +0000 |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
327 summary: oldtag |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
328 |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
329 changeset: 6:a3f95e150b0a |
826
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
330 bookmark: releases/v2 |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
331 tag: default/releases/v2 |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
332 parent: 4:a02330f767a4 |
826
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
333 user: test <test@example.org> |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
334 date: Mon Jan 01 00:00:15 2007 +0000 |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
335 summary: add eta |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
336 |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
337 changeset: 5:218b2d0660d3 |
826
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
338 bookmark: releases/v1 |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
339 tag: default/releases/v1 |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
340 user: test <test@example.org> |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
341 date: Mon Jan 01 00:00:14 2007 +0000 |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
342 summary: add zeta |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
343 |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
344 changeset: 2:678ebee93e38 |
826
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
345 bookmark: delta |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
346 tag: default/delta |
844
fffe8883960b
git_handler: mark source for rename info as Git or Mercurial
Siddharth Agarwal <sid0@fb.com>
parents:
826
diff
changeset
|
347 parent: 0:ff7a2f2d8d70 |
826
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
348 user: test <test@example.org> |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
349 date: Mon Jan 01 00:00:12 2007 +0000 |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
350 summary: add delta |
7c1452551db1
git_handler.filter_min_date: support tag times for annotated tags
Siddharth Agarwal <sid0@fb.com>
parents:
822
diff
changeset
|
351 |
1043
9b09dd0a6308
ssh: expand test coverage for ssh vulnerability
Kevin Bullock <kbullock@ringworld.org>
parents:
929
diff
changeset
|
352 |
9b09dd0a6308
ssh: expand test coverage for ssh vulnerability
Kevin Bullock <kbullock@ringworld.org>
parents:
929
diff
changeset
|
353 test for ssh vulnerability |
9b09dd0a6308
ssh: expand test coverage for ssh vulnerability
Kevin Bullock <kbullock@ringworld.org>
parents:
929
diff
changeset
|
354 |
1044
c35751c248c3
ssh: unban the use of pipe character in hostname
Kevin Bullock <kbullock@ringworld.org>
parents:
1043
diff
changeset
|
355 $ cat >> $HGRCPATH << EOF |
c35751c248c3
ssh: unban the use of pipe character in hostname
Kevin Bullock <kbullock@ringworld.org>
parents:
1043
diff
changeset
|
356 > [ui] |
c35751c248c3
ssh: unban the use of pipe character in hostname
Kevin Bullock <kbullock@ringworld.org>
parents:
1043
diff
changeset
|
357 > ssh = ssh -o ConnectTimeout=1 |
c35751c248c3
ssh: unban the use of pipe character in hostname
Kevin Bullock <kbullock@ringworld.org>
parents:
1043
diff
changeset
|
358 > EOF |
c35751c248c3
ssh: unban the use of pipe character in hostname
Kevin Bullock <kbullock@ringworld.org>
parents:
1043
diff
changeset
|
359 |
1043
9b09dd0a6308
ssh: expand test coverage for ssh vulnerability
Kevin Bullock <kbullock@ringworld.org>
parents:
929
diff
changeset
|
360 $ hg init a |
9b09dd0a6308
ssh: expand test coverage for ssh vulnerability
Kevin Bullock <kbullock@ringworld.org>
parents:
929
diff
changeset
|
361 $ cd a |
1044
c35751c248c3
ssh: unban the use of pipe character in hostname
Kevin Bullock <kbullock@ringworld.org>
parents:
1043
diff
changeset
|
362 $ hg pull 'git+ssh://-oProxyCommand=rm${IFS}nonexistent/path' 2>&1 >/dev/null |
1043
9b09dd0a6308
ssh: expand test coverage for ssh vulnerability
Kevin Bullock <kbullock@ringworld.org>
parents:
929
diff
changeset
|
363 abort: potentially unsafe hostname: '-oProxyCommand=rm${IFS}nonexistent' |
1044
c35751c248c3
ssh: unban the use of pipe character in hostname
Kevin Bullock <kbullock@ringworld.org>
parents:
1043
diff
changeset
|
364 [255] |
c35751c248c3
ssh: unban the use of pipe character in hostname
Kevin Bullock <kbullock@ringworld.org>
parents:
1043
diff
changeset
|
365 $ hg pull 'git+ssh://-oProxyCommand=rm%20nonexistent/path' 2>&1 >/dev/null |
1043
9b09dd0a6308
ssh: expand test coverage for ssh vulnerability
Kevin Bullock <kbullock@ringworld.org>
parents:
929
diff
changeset
|
366 abort: potentially unsafe hostname: '-oProxyCommand=rm nonexistent' |
1044
c35751c248c3
ssh: unban the use of pipe character in hostname
Kevin Bullock <kbullock@ringworld.org>
parents:
1043
diff
changeset
|
367 [255] |
c35751c248c3
ssh: unban the use of pipe character in hostname
Kevin Bullock <kbullock@ringworld.org>
parents:
1043
diff
changeset
|
368 $ hg pull 'git+ssh://fakehost|shellcommand/path' 2>&1 >/dev/null | grep -v ^devel-warn: |
1056
312c4bb96e68
tests: update globs so ssh command injection tests pass on macOS
Kevin Bullock <kbullock@ringworld.org>
parents:
1044
diff
changeset
|
369 ssh: * fakehost%7cshellcommand* (glob) |
1044
c35751c248c3
ssh: unban the use of pipe character in hostname
Kevin Bullock <kbullock@ringworld.org>
parents:
1043
diff
changeset
|
370 abort: git remote error: The remote server unexpectedly closed the connection. |
c35751c248c3
ssh: unban the use of pipe character in hostname
Kevin Bullock <kbullock@ringworld.org>
parents:
1043
diff
changeset
|
371 $ hg pull 'git+ssh://fakehost%7Cshellcommand/path' 2>&1 >/dev/null | grep -v ^devel-warn: |
1056
312c4bb96e68
tests: update globs so ssh command injection tests pass on macOS
Kevin Bullock <kbullock@ringworld.org>
parents:
1044
diff
changeset
|
372 ssh: * fakehost%7cshellcommand* (glob) |
1044
c35751c248c3
ssh: unban the use of pipe character in hostname
Kevin Bullock <kbullock@ringworld.org>
parents:
1043
diff
changeset
|
373 abort: git remote error: The remote server unexpectedly closed the connection. |