##// END OF EJS Templates
rebase: correctly check for empty commit in in-memory mode...
Manuel Jacob -
r46035:0ecb3b11 default
parent child Browse files
Show More
@@ -1427,12 +1427,6 b' def externalparent(repo, state, destance'
1427 def commitmemorynode(repo, wctx, editor, extra, user, date, commitmsg):
1427 def commitmemorynode(repo, wctx, editor, extra, user, date, commitmsg):
1428 '''Commit the memory changes with parents p1 and p2.
1428 '''Commit the memory changes with parents p1 and p2.
1429 Return node of committed revision.'''
1429 Return node of committed revision.'''
1430 # FIXME: make empty commit check consistent with ``repo.commit``
1431 if wctx.nofilechanges() and not repo.ui.configbool(
1432 b'ui', b'allowemptycommit'
1433 ):
1434 return None
1435
1436 # By convention, ``extra['branch']`` (set by extrafn) clobbers
1430 # By convention, ``extra['branch']`` (set by extrafn) clobbers
1437 # ``branch`` (used when passing ``--keepbranches``).
1431 # ``branch`` (used when passing ``--keepbranches``).
1438 branch = None
1432 branch = None
@@ -1447,6 +1441,8 b' def commitmemorynode(repo, wctx, editor,'
1447 branch=branch,
1441 branch=branch,
1448 editor=editor,
1442 editor=editor,
1449 )
1443 )
1444 if memctx.isempty() and not repo.ui.configbool(b'ui', b'allowemptycommit'):
1445 return None
1450 commitres = repo.commitctx(memctx)
1446 commitres = repo.commitctx(memctx)
1451 wctx.clean() # Might be reused
1447 wctx.clean() # Might be reused
1452 return commitres
1448 return commitres
@@ -949,14 +949,11 b' definition.'
949 |/
949 |/
950 o 0: d20a80d4def3 'base'
950 o 0: d20a80d4def3 'base'
951
951
952 FIXME: It's broken for inmemory merges.
953 $ hg rebase -s 2 -d 3
952 $ hg rebase -s 2 -d 3
954 rebasing 2:0194f1db184a "b"
953 rebasing 2:0194f1db184a "b"
955 note: not rebasing 2:0194f1db184a "b", its destination already has all its changes
954 note: not rebasing 2:0194f1db184a "b", its destination already has all its changes
956 rebasing 4:59c8292117b1 "merge" (tip)
955 rebasing 4:59c8292117b1 "merge" (tip)
957 note: not rebasing 4:59c8292117b1 "merge" (tip), its destination already has all its changes (true !)
958 saved backup bundle to $TESTTMP/keep_merge/.hg/strip-backup/0194f1db184a-aee31d03-rebase.hg
956 saved backup bundle to $TESTTMP/keep_merge/.hg/strip-backup/0194f1db184a-aee31d03-rebase.hg
959 #if false
960 $ hg tglog
957 $ hg tglog
961 o 3: 506e2454484b 'merge'
958 o 3: 506e2454484b 'merge'
962 |\
959 |\
@@ -966,4 +963,3 b" FIXME: It's broken for inmemory merges."
966 |/
963 |/
967 o 0: d20a80d4def3 'base'
964 o 0: d20a80d4def3 'base'
968
965
969 #endif
General Comments 0
You need to be logged in to leave comments. Login now