equal
deleted
inserted
replaced
320 |
320 |
321 # real transaction start |
321 # real transaction start |
322 ct = self.currenttopic |
322 ct = self.currenttopic |
323 if not ct: |
323 if not ct: |
324 return tr |
324 return tr |
325 ctwasempty = stack.stackdata(self, topic=ct)['changesetcount'] == 0 |
325 ctwasempty = stack.stack(self, topic=ct).changesetcount == 0 |
326 |
326 |
327 reporef = weakref.ref(self) |
327 reporef = weakref.ref(self) |
328 |
328 |
329 def currenttopicempty(tr): |
329 def currenttopicempty(tr): |
330 # check active topic emptyness |
330 # check active topic emptyness |
331 repo = reporef() |
331 repo = reporef() |
332 csetcount = stack.stackdata(repo, topic=ct)['changesetcount'] |
332 csetcount = stack.stack(repo, topic=ct).changesetcount |
333 empty = csetcount == 0 |
333 empty = csetcount == 0 |
334 if empty and not ctwasempty: |
334 if empty and not ctwasempty: |
335 ui.status('active topic %r is now empty\n' % ct) |
335 ui.status('active topic %r is now empty\n' % ct) |
336 if ctwasempty and not empty: |
336 if ctwasempty and not empty: |
337 if csetcount == 1: |
337 if csetcount == 1: |
478 repo.invalidate() |
478 repo.invalidate() |
479 return |
479 return |
480 |
480 |
481 ct = repo.currenttopic |
481 ct = repo.currenttopic |
482 if clear: |
482 if clear: |
483 empty = stack.stackdata(repo, topic=ct)['changesetcount'] == 0 |
483 empty = stack.stack(repo, topic=ct).changesetcount == 0 |
484 if empty: |
484 if empty: |
485 if ct: |
485 if ct: |
486 ui.status(_('clearing empty topic "%s"\n') % ct) |
486 ui.status(_('clearing empty topic "%s"\n') % ct) |
487 return _changecurrenttopic(repo, None) |
487 return _changecurrenttopic(repo, None) |
488 |
488 |
915 # current topic. This is right for merge but wrong for rebase. We check |
915 # current topic. This is right for merge but wrong for rebase. We check |
916 # if rebase is running and update the currenttopic to topic of new |
916 # if rebase is running and update the currenttopic to topic of new |
917 # rebased commit. We have explicitly stored in config if rebase is |
917 # rebased commit. We have explicitly stored in config if rebase is |
918 # running. |
918 # running. |
919 ot = repo.currenttopic |
919 ot = repo.currenttopic |
920 empty = stack.stackdata(repo, topic=ot)['changesetcount'] == 0 |
920 empty = stack.stack(repo, topic=ot).changesetcount == 0 |
921 if repo.ui.hasconfig('experimental', 'topicrebase'): |
921 if repo.ui.hasconfig('experimental', 'topicrebase'): |
922 isrebase = True |
922 isrebase = True |
923 if repo.ui.configbool('_internal', 'keep-topic'): |
923 if repo.ui.configbool('_internal', 'keep-topic'): |
924 ist0 = True |
924 ist0 = True |
925 if ((not partial and not branchmerge) or isrebase) and not ist0: |
925 if ((not partial and not branchmerge) or isrebase) and not ist0: |