##// END OF EJS Templates
revert: always display hunks reversed when reverting to parent...
Denis Laxalde -
r31196:3af9a962 default
parent child Browse files
Show More
@@ -3247,15 +3247,18 b' def _performrevert(repo, parents, ctx, a'
3247 diffopts = patch.difffeatureopts(repo.ui, whitespace=True)
3247 diffopts = patch.difffeatureopts(repo.ui, whitespace=True)
3248 diffopts.nodates = True
3248 diffopts.nodates = True
3249 diffopts.git = True
3249 diffopts.git = True
3250 reversehunks = repo.ui.configbool('experimental',
3250 operation = 'discard'
3251 'revertalternateinteractivemode',
3251 reversehunks = True
3252 True)
3252 if node != parent:
3253 operation = 'revert'
3254 reversehunks = repo.ui.configbool('experimental',
3255 'revertalternateinteractivemode',
3256 True)
3253 if reversehunks:
3257 if reversehunks:
3254 diff = patch.diff(repo, ctx.node(), None, m, opts=diffopts)
3258 diff = patch.diff(repo, ctx.node(), None, m, opts=diffopts)
3255 else:
3259 else:
3256 diff = patch.diff(repo, None, ctx.node(), m, opts=diffopts)
3260 diff = patch.diff(repo, None, ctx.node(), m, opts=diffopts)
3257 originalchunks = patch.parsepatch(diff)
3261 originalchunks = patch.parsepatch(diff)
3258 operation = 'discard' if node == parent else 'revert'
3259
3262
3260 try:
3263 try:
3261
3264
@@ -380,29 +380,29 b' Check the experimental config to invert '
380 3 hunks, 3 lines changed
380 3 hunks, 3 lines changed
381 examine changes to 'folder1/g'? [Ynesfdaq?] y
381 examine changes to 'folder1/g'? [Ynesfdaq?] y
382
382
383 @@ -1,5 +1,4 @@
383 @@ -1,4 +1,5 @@
384 -firstline
384 +firstline
385 c
385 c
386 1
386 1
387 2
387 2
388 3
388 3
389 discard change 1/3 to 'folder1/g'? [Ynesfdaq?] y
389 discard change 1/3 to 'folder1/g'? [Ynesfdaq?] y
390
390
391 @@ -2,7 +1,7 @@
391 @@ -1,7 +2,7 @@
392 c
392 c
393 1
393 1
394 2
394 2
395 3
395 3
396 - 3
396 -4
397 +4
397 + 3
398 5
398 5
399 d
399 d
400 discard change 2/3 to 'folder1/g'? [Ynesfdaq?] y
400 discard change 2/3 to 'folder1/g'? [Ynesfdaq?] y
401
401
402 @@ -7,3 +6,2 @@
402 @@ -6,2 +7,3 @@
403 5
403 5
404 d
404 d
405 -lastline
405 +lastline
406 discard change 3/3 to 'folder1/g'? [Ynesfdaq?] n
406 discard change 3/3 to 'folder1/g'? [Ynesfdaq?] n
407
407
408 $ hg diff --nodates
408 $ hg diff --nodates
General Comments 0
You need to be logged in to leave comments. Login now