comparison tests/test-graft.t @ 44725:16c361152133

graft: exit 1 on conflicts, like merge It's more consistent, and makes it nicer to script around hg if you don't have to ignore exit code 255, which is the error code for basically everything in hg. Differential Revision: https://phab.mercurial-scm.org/D8423
author Valentin Gatien-Baron <vgatien-baron@janestreet.com>
date Tue, 14 Apr 2020 19:09:56 -0400
parents 6306baa7d19a
children e5043679bfcc
comparison
equal deleted inserted replaced
44724:5c2a4f37eace 44725:16c361152133
258 picked tool ':merge' for e (binary False symlink False changedelete False) 258 picked tool ':merge' for e (binary False symlink False changedelete False)
259 my e@1905859650ec+ other e@9c233e8e184d ancestor e@4c60f11aa304 259 my e@1905859650ec+ other e@9c233e8e184d ancestor e@4c60f11aa304
260 warning: conflicts while merging e! (edit, then use 'hg resolve --mark') 260 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
261 abort: unresolved conflicts, can't continue 261 abort: unresolved conflicts, can't continue
262 (use 'hg resolve' and 'hg graft --continue') 262 (use 'hg resolve' and 'hg graft --continue')
263 [255] 263 [1]
264 264
265 Summary should mention graft: 265 Summary should mention graft:
266 266
267 $ hg summary |grep graft 267 $ hg summary |grep graft
268 commit: 2 modified, 2 unknown, 1 unresolved (graft in progress) 268 commit: 2 modified, 2 unknown, 1 unresolved (graft in progress)
315 grafting 4:9c233e8e184d "4" 315 grafting 4:9c233e8e184d "4"
316 merging e 316 merging e
317 warning: conflicts while merging e! (edit, then use 'hg resolve --mark') 317 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
318 abort: unresolved conflicts, can't continue 318 abort: unresolved conflicts, can't continue
319 (use 'hg resolve' and 'hg graft --continue') 319 (use 'hg resolve' and 'hg graft --continue')
320 [255] 320 [1]
321 321
322 Continue without resolve should fail: 322 Continue without resolve should fail:
323 323
324 $ hg graft -c 324 $ hg graft -c
325 grafting 4:9c233e8e184d "4" 325 grafting 4:9c233e8e184d "4"
509 $ hg ci -m 9 509 $ hg ci -m 9
510 $ hg graft 1 --tool internal:fail 510 $ hg graft 1 --tool internal:fail
511 grafting 1:5d205f8b35b6 "1" 511 grafting 1:5d205f8b35b6 "1"
512 abort: unresolved conflicts, can't continue 512 abort: unresolved conflicts, can't continue
513 (use 'hg resolve' and 'hg graft --continue') 513 (use 'hg resolve' and 'hg graft --continue')
514 [255] 514 [1]
515 $ hg resolve --all 515 $ hg resolve --all
516 merging a 516 merging a
517 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') 517 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
518 [1] 518 [1]
519 $ cat a 519 $ cat a
549 $ hg ci -m 10 549 $ hg ci -m 10
550 $ hg graft 2 --tool internal:fail 550 $ hg graft 2 --tool internal:fail
551 grafting 2:5c095ad7e90f "2" 551 grafting 2:5c095ad7e90f "2"
552 abort: unresolved conflicts, can't continue 552 abort: unresolved conflicts, can't continue
553 (use 'hg resolve' and 'hg graft --continue') 553 (use 'hg resolve' and 'hg graft --continue')
554 [255] 554 [1]
555 $ hg resolve --all 555 $ hg resolve --all
556 merging a and b to b 556 merging a and b to b
557 (no more unresolved files) 557 (no more unresolved files)
558 continue: hg graft --continue 558 continue: hg graft --continue
559 $ hg graft -c 559 $ hg graft -c
837 $ hg ci -m 27 837 $ hg ci -m 27
838 $ hg graft 24 --force --tool internal:fail 838 $ hg graft 24 --force --tool internal:fail
839 grafting 24:2e7ea477be26 "24" 839 grafting 24:2e7ea477be26 "24"
840 abort: unresolved conflicts, can't continue 840 abort: unresolved conflicts, can't continue
841 (use 'hg resolve' and 'hg graft --continue') 841 (use 'hg resolve' and 'hg graft --continue')
842 [255] 842 [1]
843 $ hg resolve --all 843 $ hg resolve --all
844 merging a 844 merging a
845 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') 845 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
846 [1] 846 [1]
847 $ echo abc > a 847 $ echo abc > a