comparison tests/test-subrepo-git.t @ 12994:845c602b8635

subrepo: allow git subrepos to push and merge (master branch only) gitsubrepo based on patch from David Soria Parra: http://bitbucket.org/segv/davids-poor-git-subrepo-attempt/
author Eric Eisner <ede@mit.edu>
date Sun, 14 Nov 2010 18:22:33 -0500
parents a91334380699
children d90fc91c8377
comparison
equal deleted inserted replaced
12993:a91334380699 12994:845c602b8635
79 g 79 g
80 $ hg debugsub 80 $ hg debugsub
81 path s 81 path s
82 source ../gitroot 82 source ../gitroot
83 revision da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 83 revision da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
84
85 make $GITROOT pushable, by replacing it with a clone with nothing checked out
86
87 $ cd ..
88 $ git clone gitroot gitrootbare --bare -q
89 $ rm -rf gitroot
90 $ mv gitrootbare gitroot
91
92 clone root, make local change
93
94 $ cd t
95 $ hg clone . ../ta
96 updating to branch default
97 cloning subrepo s
98 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
99
100 $ cd ../ta
101 $ echo ggg >> s/g
102 $ hg commit -m ggg
103 committing subrepository $TESTTMP/ta/s
104 $ hg debugsub
105 path s
106 source ../gitroot
107 revision 79695940086840c99328513acbe35f90fcd55e57
108
109 clone root separately, make different local change
110
111 $ cd ../t
112 $ hg clone . ../tb
113 updating to branch default
114 cloning subrepo s
115 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
116
117 $ cd ../tb/s
118 $ echo f > f
119 $ git add f
120 $ cd ..
121
122 $ hg commit -m f
123 committing subrepository $TESTTMP/tb/s
124 $ hg debugsub
125 path s
126 source ../gitroot
127 revision aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
128
129 user b push changes
130
131 $ hg push
132 pushing to $TESTTMP/t
133 searching for changes
134 adding changesets
135 adding manifests
136 adding file changes
137 added 1 changesets with 1 changes to 1 files
138
139 user a pulls, merges, commits
140
141 $ cd ../ta
142 $ hg pull
143 pulling from $TESTTMP/t
144 searching for changes
145 adding changesets
146 adding manifests
147 adding file changes
148 added 1 changesets with 1 changes to 1 files (+1 heads)
149 (run 'hg heads' to see heads, 'hg merge' to merge)
150 $ hg merge
151 Automatic merge went well; stopped before committing as requested
152 pulling subrepo s
153 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
154 (branch merge, don't forget to commit)
155 $ cat s/f
156 f
157 $ cat s/g
158 g
159 gg
160 ggg
161 $ hg commit -m 'merge'
162 committing subrepository $TESTTMP/ta/s
163 $ hg debugsub
164 path s
165 source ../gitroot
166 revision f47b465e1bce645dbf37232a00574aa1546ca8d3
167 $ hg push
168 pushing to $TESTTMP/t
169 searching for changes
170 adding changesets
171 adding manifests
172 adding file changes
173 added 2 changesets with 2 changes to 1 files