##// END OF EJS Templates
rewriteutil: fix crash when a rewritten message references f{6,64}...
Augie Fackler -
r48591:48da5c32 stable
parent child Browse files
Show More
@@ -207,7 +207,12 b' def update_hash_refs(repo, commitmsg, pe'
207 hashes = re.findall(NODE_RE, commitmsg)
207 hashes = re.findall(NODE_RE, commitmsg)
208 unfi = repo.unfiltered()
208 unfi = repo.unfiltered()
209 for h in hashes:
209 for h in hashes:
210 fullnode = scmutil.resolvehexnodeidprefix(unfi, h)
210 try:
211 fullnode = scmutil.resolvehexnodeidprefix(unfi, h)
212 except error.WdirUnsupported:
213 # Someone has an fffff... in a commit message we're
214 # rewriting. Don't try rewriting that.
215 continue
211 if fullnode is None:
216 if fullnode is None:
212 continue
217 continue
213 ctx = unfi[fullnode]
218 ctx = unfi[fullnode]
@@ -971,9 +971,9 b' Test that update_hash_refs works.'
971 $ hg ci -m 'this will change hash'
971 $ hg ci -m 'this will change hash'
972 created new head
972 created new head
973 $ echo changed >> update_hash_refs
973 $ echo changed >> update_hash_refs
974 $ hg ci -m "this starts as the child of `hg log -r . -T'{node|short}'` but not 506e2454484b"
974 $ hg ci -m "this starts as the child of `hg log -r . -T'{node|short}'` but not 506e2454484b. Also, ffffffffffffffff"
975 $ hg tglog
975 $ hg tglog
976 @ 5: becd28036887 'this starts as the child of 98789aa60148 but not 506e2454484b'
976 @ 5: a8b42cbbde83 'this starts as the child of 98789aa60148 but not 506e2454484b. Also, ffffffffffffffff'
977 |
977 |
978 o 4: 98789aa60148 'this will change hash'
978 o 4: 98789aa60148 'this will change hash'
979 |
979 |
@@ -987,10 +987,10 b' Test that update_hash_refs works.'
987
987
988 $ hg rebase -r '.^::' -d 3
988 $ hg rebase -r '.^::' -d 3
989 rebasing 4:98789aa60148 "this will change hash"
989 rebasing 4:98789aa60148 "this will change hash"
990 rebasing 5:becd28036887 tip "this starts as the child of 98789aa60148 but not 506e2454484b"
990 rebasing 5:a8b42cbbde83 tip "this starts as the child of 98789aa60148 but not 506e2454484b. Also, ffffffffffffffff"
991 saved backup bundle to $TESTTMP/keep_merge/.hg/strip-backup/98789aa60148-72ec40bd-rebase.hg
991 saved backup bundle to $TESTTMP/keep_merge/.hg/strip-backup/98789aa60148-da3f4c2c-rebase.hg
992 $ hg tglog
992 $ hg tglog
993 @ 5: a445b8426f4b 'this starts as the child of c16c25696fe7 but not 506e2454484b'
993 @ 5: 0fd2912e6cc1 'this starts as the child of c16c25696fe7 but not 506e2454484b. Also, ffffffffffffffff'
994 |
994 |
995 o 4: c16c25696fe7 'this will change hash'
995 o 4: c16c25696fe7 'this will change hash'
996 |
996 |
General Comments 0
You need to be logged in to leave comments. Login now