@@ -314,6 +314,7 @@ def __init__(self, interp, config):
314314 # to repl.pastebin
315315 self .prev_pastebin_content = ''
316316 self .prev_pastebin_url = ''
317+ self .prev_removal_url = ''
317318 # Necessary to fix mercurial.ui.ui expecting sys.stderr to have this
318319 # attribute
319320 self .closed = False
@@ -677,8 +678,8 @@ def pastebin(self, s=None):
677678 def do_pastebin (self , s ):
678679 """Actually perform the upload."""
679680 if s == self .prev_pastebin_content :
680- self .interact .notify (_ ('Duplicate pastebin. Previous URL: %s' ) %
681- (self .prev_pastebin_url , ))
681+ self .interact .notify (_ ('Duplicate pastebin. Previous URL: %s. Removal URL: %s ' ) %
682+ (self .prev_pastebin_url , self . prev_removal_url ))
682683 return self .prev_pastebin_url
683684
684685 if self .config .pastebin_helper :
@@ -716,6 +717,7 @@ def do_pastebin_json(self, s):
716717 removal_url = removal_url_template .safe_substitute (removal_id = removal_id )
717718
718719 self .prev_pastebin_url = paste_url
720+ self .prev_removal_url = removal_url
719721 self .interact .notify (_ ('Pastebin URL: %s - Removal URL: %s' ) %
720722 (paste_url , removal_url ))
721723
0 commit comments