1+ # coding=UTF-8
2+
13# Copyright (C) 2002-2006 Stephen Kennedy <stevek@gnome.org>
24# Copyright (C) 2010-2013 Kai Willadsen <kai.willadsen@gmail.com>
35#
@@ -484,6 +486,11 @@ def run_diff(self, path):
484486 return
485487
486488 left_is_local = self .props .left_is_local
489+ basename = os .path .basename (path )
490+ meta = {
491+ 'parent' : self ,
492+ 'prompt_resolve' : False ,
493+ }
487494
488495 if self .vc .get_entry (path ).state == tree .STATE_CONFLICT and \
489496 hasattr (self .vc , 'get_path_for_conflict' ):
@@ -499,20 +506,23 @@ def run_diff(self, path):
499506 for c in conflicts ]
500507 temps = [p for p , is_temp in diffs if is_temp ]
501508 diffs = [p for p , is_temp in diffs ]
502- meta = {
503- 'parent' : self ,
504- 'prompt_resolve' : True ,
505- }
506509 kwargs = {
507510 'auto_merge' : False ,
508511 'merge_output' : path ,
509- 'meta' : meta ,
510512 }
513+ meta ['prompt_resolve' ] = True
514+ meta ['labels' ] = (
515+ _ (u"%s — local" ) % basename , None ,
516+ _ (u"%s — remote" ) % basename
517+ )
511518 else :
512519 comp_path = self .vc .get_path_for_repo_file (path )
513520 temps = [comp_path ]
514521 diffs = [path , comp_path ] if left_is_local else [comp_path , path ]
515522 kwargs = {}
523+ meta ['labels' ] = (
524+ _ (u"%s — local" ) % basename , None )
525+ kwargs ['meta' ] = meta
516526
517527 for temp_file in temps :
518528 os .chmod (temp_file , 0o444 )
0 commit comments