Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.1, 1.1.1, and 1.1.2

commit: improve branch dialog messages

Closes #1084

Changeset f5aebd808adb

Parent 84124f23248a

by Steve Borho

Changes to one file · Browse files at f5aebd808adb Showing diff from parent 84124f23248a Diff from another changeset...

 
1110
1111
1112
1113
1114
 
 
 
1115
1116
1117
1118
 
 
 
 
 
 
 
 
1119
1120
1121
1122
 
 
 
1123
1124
 
1125
1126
 
1127
1128
1129
 
1110
1111
1112
 
 
1113
1114
1115
1116
 
 
 
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
 
 
1127
1128
1129
1130
 
1131
1132
 
1133
1134
1135
1136
@@ -1110,20 +1110,27 @@
  if self.nextbranch:   # response: 0=Yes, 1=No, 2=Cancel   if self.nextbranch in self.repo.branchtags(): - if self.nextbranch in [p.branch() for p in self.repo.parents()]: - response = 0 + pb = [p.branch() for p in self.repo.parents()] + if self.nextbranch in pb: + resp = 0   else: - response = gdialog.CustomPrompt(_('Confirm Override Branch'), - _('A branch named "%s" already exists,\n' - 'override?') % self.nextbranch, self, + rev = self.repo[self.nextbranch].rev() + resp = gdialog.CustomPrompt(_('Confirm Branch Change'), + _('Named branch "%s" already exists, ' + 'last used in revision %d\n' + 'Yes\t- Make commit restarting this named branch\n' + 'No\t- Make commit without changing branch\n' + 'Cancel - Cancel this commit') % (self.nextbranch, + rev), self,   (_('&Yes'), _('&No'), _('&Cancel')), 2, 2).run()   else: - response = gdialog.CustomPrompt(_('Confirm New Branch'), - _('Create new named branch "%s"?') % self.nextbranch, + resp = gdialog.CustomPrompt(_('Confirm New Branch'), + _('Create new named branch "%s" with this commit?') % + self.nextbranch,   self, (_('&Yes'), _('&No'), _('&Cancel')), 2, 2).run() - if response == 0: + if resp == 0:   self.repo.dirstate.setbranch(self.nextbranch) - elif response == 2: + elif resp == 2:   return   elif self.closebranch:   cmdline.append('--close-branch')