##// END OF EJS Templates
merge with stable
Matt Mackall -
r26014:a5f62af2 merge default
parent child Browse files
Show More
@@ -394,7 +394,8 b' class icasefsmatcher(match):'
394 def __init__(self, root, cwd, patterns, include, exclude, default, auditor,
394 def __init__(self, root, cwd, patterns, include, exclude, default, auditor,
395 ctx, listsubrepos=False, badfn=None):
395 ctx, listsubrepos=False, badfn=None):
396 init = super(icasefsmatcher, self).__init__
396 init = super(icasefsmatcher, self).__init__
397 self._dsnormalize = ctx.repo().dirstate.normalize
397 self._dirstate = ctx.repo().dirstate
398 self._dsnormalize = self._dirstate.normalize
398
399
399 init(root, cwd, patterns, include, exclude, default, auditor=auditor,
400 init(root, cwd, patterns, include, exclude, default, auditor=auditor,
400 ctx=ctx, listsubrepos=listsubrepos, badfn=badfn)
401 ctx=ctx, listsubrepos=listsubrepos, badfn=badfn)
@@ -410,7 +411,13 b' class icasefsmatcher(match):'
410 kindpats = []
411 kindpats = []
411 for kind, pats, source in self._kp:
412 for kind, pats, source in self._kp:
412 if kind not in ('re', 'relre'): # regex can't be normalized
413 if kind not in ('re', 'relre'): # regex can't be normalized
414 p = pats
413 pats = self._dsnormalize(pats)
415 pats = self._dsnormalize(pats)
416
417 # Preserve the original to handle a case only rename.
418 if p != pats and p in self._dirstate:
419 kindpats.append((kind, p, source))
420
414 kindpats.append((kind, pats, source))
421 kindpats.append((kind, pats, source))
415 return kindpats
422 return kindpats
416
423
@@ -181,9 +181,8 b' def strip(ui, repo, nodelist, backup=Tru'
181 if troffset == 0:
181 if troffset == 0:
182 repo.store.markremoved(file)
182 repo.store.markremoved(file)
183 tr.close()
183 tr.close()
184 except: # re-raises
184 finally:
185 tr.abort()
185 tr.release()
186 raise
187
186
188 if saveheads or savebases:
187 if saveheads or savebases:
189 ui.note(_("adding branch\n"))
188 ui.note(_("adding branch\n"))
@@ -232,9 +232,17 b' and OS X'
232 -xyz
232 -xyz
233 +def
233 +def
234
234
235 $ hg mv CapsDir1/CapsDir/abc.txt CapsDir1/CapsDir/ABC.txt
236 moving CapsDir1/CapsDir/AbC.txt to CapsDir1/CapsDir/ABC.txt (glob)
237 $ hg ci -m "case changing rename" CapsDir1/CapsDir/AbC.txt CapsDir1/CapsDir/ABC.txt
238
239 $ hg status -A capsdir1/capsdir
240 M CapsDir1/CapsDir/SubDir/Def.txt
241 C CapsDir1/CapsDir/ABC.txt
242
235 $ hg remove -f 'glob:**.txt' -X capsdir1/capsdir
243 $ hg remove -f 'glob:**.txt' -X capsdir1/capsdir
236 $ hg remove -f 'glob:**.txt' -I capsdir1/capsdir
244 $ hg remove -f 'glob:**.txt' -I capsdir1/capsdir
237 removing CapsDir1/CapsDir/AbC.txt (glob)
245 removing CapsDir1/CapsDir/ABC.txt (glob)
238 removing CapsDir1/CapsDir/SubDir/Def.txt (glob)
246 removing CapsDir1/CapsDir/SubDir/Def.txt (glob)
239 #endif
247 #endif
240
248
@@ -826,3 +826,26 b' strip backup content'
826 date: Thu Jan 01 00:00:00 1970 +0000
826 date: Thu Jan 01 00:00:00 1970 +0000
827 summary: mergeCD
827 summary: mergeCD
828
828
829
830 Error during post-close callback of the strip transaction
831 (They should be gracefully handled and reported)
832
833 $ cat > ../crashstrip.py << EOF
834 > from mercurial import error
835 > def reposetup(ui, repo):
836 > class crashstriprepo(repo.__class__):
837 > def transaction(self, desc, *args, **kwargs):
838 > tr = super(crashstriprepo, self).transaction(self, desc, *args, **kwargs)
839 > if desc == 'strip':
840 > def crash(tra): raise error.Abort('boom')
841 > tr.addpostclose('crash', crash)
842 > return tr
843 > repo.__class__ = crashstriprepo
844 > EOF
845 $ hg strip tip --config extensions.crash=$TESTTMP/crashstrip.py
846 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg (glob)
847 strip failed, full bundle stored in '$TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg'
848 abort: boom
849 [255]
850
851
General Comments 0
You need to be logged in to leave comments. Login now