hgext/rebase.py
changeset 8702 3d44f1a68353
parent 8615 94ca38e63576
child 8706 25e9c71b89de
equal deleted inserted replaced
8701:02a12835b17e 8702:3d44f1a68353
   158 
   158 
   159     if skipped is None:
   159     if skipped is None:
   160         skipped = set()
   160         skipped = set()
   161 
   161 
   162     # Commit, record the old nodeid
   162     # Commit, record the old nodeid
   163     m, a, r = repo.status()[:3]
       
   164     newrev = nullrev
   163     newrev = nullrev
   165     try:
   164     try:
   166         if last:
   165         if last:
   167             commitmsg = 'Collapsed revision'
   166             commitmsg = 'Collapsed revision'
   168             for rebased in state:
   167             for rebased in state:
   173             commitmsg = repo[rev].description()
   172             commitmsg = repo[rev].description()
   174         # Commit might fail if unresolved files exist
   173         # Commit might fail if unresolved files exist
   175         extra = {'rebase_source': repo[rev].hex()}
   174         extra = {'rebase_source': repo[rev].hex()}
   176         if extrafn:
   175         if extrafn:
   177             extrafn(repo[rev], extra)
   176             extrafn(repo[rev], extra)
   178         newrev = repo.commit(m+a+r,
   177         newrev = repo.commit(None,
   179                             text=commitmsg,
   178                             text=commitmsg,
   180                             user=repo[rev].user(),
   179                             user=repo[rev].user(),
   181                             date=repo[rev].date(),
   180                             date=repo[rev].date(),
   182                             extra=extra)
   181                             extra=extra)
   183         repo.dirstate.setbranch(repo[newrev].branch())
   182         repo.dirstate.setbranch(repo[newrev].branch())