comparison tests/test-subrepo-svn.t @ 13287:d0e0d3d43e14 stable

subrepo: compare svn subrepo state to last committed revision A subversion project revisions are a subset of the repository revisions, you can ask subversion to update a working directory from one revision to another without changing anything. Unfortunately, Mercurial will think the subrepository has changed and will commit it again. To avoid useless commits, we compare the subrepository state to its actual "parent" revision. To ensure ascending compatibility with existing subrepositories which might reference fake revisions, we also keep comparing with the subrepo working directory revision. NOTE: not sure if this should go in stable or not.
author Patrick Mezard <pmezard@gmail.com>
date Sat, 22 Jan 2011 16:15:40 +0100
parents 82ca0c43bc44
children c19b9282d3a7
comparison
equal deleted inserted replaced
13285:2ef915184ff2 13287:d0e0d3d43e14
121 revision 3 121 revision 3
122 path subdir/s 122 path subdir/s
123 source file://*/svn-repo/src (glob) 123 source file://*/svn-repo/src (glob)
124 revision 2 124 revision 2
125 125
126 add an unrelated revision in svn and update the subrepo to without
127 bringing any changes.
128
129 $ svn mkdir --parents "$SVNREPO/unrelated" -m 'create unrelated'
130
131 Committed revision 4.
132 $ svn up s
133
134 Fetching external item into 's/externals'
135 External at revision 1.
136
137 At revision 4.
138 $ hg sum
139 parent: 2:* tip (glob)
140 Message!
141 branch: default
142 commit: (clean)
143 update: (current)
144
126 $ echo a > s/a 145 $ echo a > s/a
127 146
128 should be empty despite change to s/a 147 should be empty despite change to s/a
129 148
130 $ hg st 149 $ hg st
137 156
138 Fetching external item into 'externals' 157 Fetching external item into 'externals'
139 A externals/other 158 A externals/other
140 Updated external to revision 1. 159 Updated external to revision 1.
141 160
142 Updated to revision 3. 161 Updated to revision 4.
143 $ echo xyz >> alpha 162 $ echo xyz >> alpha
144 $ svn propset svn:mime-type 'text/xml' alpha 163 $ svn propset svn:mime-type 'text/xml' alpha
145 property 'svn:mime-type' set on 'alpha' 164 property 'svn:mime-type' set on 'alpha'
146 $ svn ci -m 'amend a from svn' 165 $ svn ci -m 'amend a from svn'
147 Sending src/alpha 166 Sending src/alpha
148 Transmitting file data . 167 Transmitting file data .
149 Committed revision 4. 168 Committed revision 5.
150 $ cd ../../sub/t 169 $ cd ../../sub/t
151 170
152 this commit from hg will fail 171 this commit from hg will fail
153 172
154 $ echo zzz >> s/alpha 173 $ echo zzz >> s/alpha