Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1, 2.1.1, and 2.1.2

tag: improve tag commit message when moving a tag

The original tag commit message when moving a tag was:
'Added tag %s for changeset %s'

This was wrong because the tag was not added, but moved. Instead this had been
changed to:
'Moved tag %s to changeset %s (from changeset %s)'

This is more accurate and also records a mention of the original changeset,
which, when viewed in the revision history is clickable.

Changeset 1935054137d3

Parent 44e4072dd0d3

by Angel Ezquerra

Changes to one file · Browse files at 1935054137d3 Showing diff from parent 44e4072dd0d3 Diff from another changeset...

 
249
250
251
252
253
254
 
 
 
 
 
 
 
 
 
 
255
256
257
 
249
250
251
 
 
 
252
253
254
255
256
257
258
259
260
261
262
263
264
@@ -249,9 +249,16 @@
  return   if not message:   ctx = self.repo[self.rev] - msgset = keep._('Added tag %s for changeset %s') - message = (english and msgset['id'] or msgset['str']) \ - % (tagu, str(ctx)) + if exists: + origctx = self.repo[self.repo.tags()[tag]] + msgset = keep._('Moved tag %s to changeset %s' \ + ' (from changeset %s)') + message = (english and msgset['id'] or msgset['str']) \ + % (tagu, str(ctx), str(origctx)) + else: + msgset = keep._('Added tag %s for changeset %s') + message = (english and msgset['id'] or msgset['str']) \ + % (tagu, str(ctx))   message = hglib.fromunicode(message)     def finished():