##// END OF EJS Templates
Merge with stable
Patrick Mezard -
r13288:9c3bfba3 merge default
parent child Browse files
Show More
@@ -508,13 +508,23 b' class svnsubrepo(abstractsubrepo):'
508 raise util.Abort(stderr)
508 raise util.Abort(stderr)
509 return stdout
509 return stdout
510
510
511 def _wcrev(self):
511 def _wcrevs(self):
512 # Get the working directory revision as well as the last
513 # commit revision so we can compare the subrepo state with
514 # both. We used to store the working directory one.
512 output = self._svncommand(['info', '--xml'])
515 output = self._svncommand(['info', '--xml'])
513 doc = xml.dom.minidom.parseString(output)
516 doc = xml.dom.minidom.parseString(output)
514 entries = doc.getElementsByTagName('entry')
517 entries = doc.getElementsByTagName('entry')
515 if not entries:
518 lastrev, rev = '0', '0'
516 return '0'
519 if entries:
517 return str(entries[0].getAttribute('revision')) or '0'
520 rev = str(entries[0].getAttribute('revision')) or '0'
521 commits = entries[0].getElementsByTagName('commit')
522 if commits:
523 lastrev = str(commits[0].getAttribute('revision')) or '0'
524 return (lastrev, rev)
525
526 def _wcrev(self):
527 return self._wcrevs()[0]
518
528
519 def _wcchanged(self):
529 def _wcchanged(self):
520 """Return (changes, extchanges) where changes is True
530 """Return (changes, extchanges) where changes is True
@@ -544,7 +554,7 b' class svnsubrepo(abstractsubrepo):'
544
554
545 def dirty(self, ignoreupdate=False):
555 def dirty(self, ignoreupdate=False):
546 if not self._wcchanged()[0]:
556 if not self._wcchanged()[0]:
547 if self._wcrev() == self._state[1] or ignoreupdate:
557 if self._state[1] in self._wcrevs() or ignoreupdate:
548 return False
558 return False
549 return True
559 return True
550
560
@@ -123,6 +123,25 b' change file in svn and hg, commit'
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
@@ -139,14 +158,14 b' add a commit from svn'
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
General Comments 0
You need to be logged in to leave comments. Login now