Bug 15420

Summary: svn resolve not working in meld
Product: Mageia Reporter: Marc Krämer <mageia>
Component: RPM PackagesAssignee: Philippe Makowski <makowski.mageia>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: Normal CC: mageia
Version: Cauldron   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
URL: https://bugzilla.gnome.org/show_bug.cgi?id=745781
Whiteboard:
Source RPM: meld-3.12.1-1.mga5.src.rpm CVE:
Status comment:

Description Marc Krämer 2015-03-04 11:36:12 CET
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/meld/meldwindow.py", line 299, in on_delete_event
    response = self.try_remove_page(page, appquit=1)
  File "/usr/lib/python2.7/site-packages/meld/meldwindow.py", line 567, in try_remove_page
    response = page.on_delete_event(appquit)
  File "/usr/lib/python2.7/site-packages/meld/filediff.py", line 908, in on_delete_event
    response = self.check_save_modified()
  File "/usr/lib/python2.7/site-packages/meld/filediff.py", line 903, in check_save_modified
    parent.command('resolve', [conflict_file])
  File "/usr/lib/python2.7/site-packages/meld/vcview.py", line 702, in command
    command(self._command, files)
  File "/usr/lib/python2.7/site-packages/meld/vc/_vc.py", line 177, in resolve
    raise NotImplementedError()
NotImplementedError


Reproducible: 

Steps to Reproduce:
Sander Lepik 2015-03-04 12:46:23 CET

CC: (none) => mageia
Assignee: bugsquad => makowski.mageia

Comment 1 Philippe Makowski 2015-03-05 21:01:25 CET
that's like that upstream, see : https://git.gnome.org/browse/meld/tree/meld/vc/_vc.py

what did you expect ?
there are other ways it seems : http://codingundertheinfluence.blogspot.fr/2010/01/using-meld-as-your-external-diff3.html
Comment 2 Marc Krämer 2015-03-06 16:28:57 CET
can you file a bug upstream, since it's a bug. 

I'm no python programmer. But vc is the base class, where the class svn (in my case) is derrived. It is correct for the base class to show that message, but the derrived class (svn) should implement that feature.

As far as I can see only git and bzr implement this. The commandline of svn to mark it as resolved would be

svn resolved FILE

so this is defined in resolved_command - but I don't see any of them use this definition as a generalized solution. I would say it should be similiar to the bzr one:
def resolve(self, runner, files):
        runner(
            [self.CMD] + self.CMDARGS + ["resolved"] + files, [], refresh=True,
            working_dir=self.root)
Comment 3 David Walser 2015-03-07 03:38:43 CET
(In reply to M K from comment #2)
> can you file a bug upstream, since it's a bug.

As you're the reporter of the issue and the one with an interest in it, it would be most helpful if you would file the upstream bug.  Thanks.
Comment 4 Marc Krämer 2015-03-07 11:34:35 CET
cross-ref bug

URL: (none) => https://bugzilla.gnome.org/show_bug.cgi?id=745781

Comment 5 Philippe Makowski 2015-03-21 00:07:14 CET
the correct svn command would be :
svn resolve --accept working PATH 

cf http://svnbook.red-bean.com/nightly/en/svn.ref.svn.c.resolved.html


do you agree ?

if yes I can try to make a patch that could be submitted upstream.
Comment 6 Marc Krämer 2015-03-21 12:21:00 CET
Yes, I do agree. This would be great!
Hadn't noticed, svn resolved is marked deprecated.
Comment 7 Philippe Makowski 2015-04-01 20:48:40 CEST
how did you get the output error ?
Comment 8 Marc Krämer 2015-04-01 22:39:38 CEST
preparation:
#create arch & add file, modify,...
mkdir arch
svnadmin create arch/
svn co file:///tmp/arch co1
echo "test">co1/test.txt
svn add co1/test.txt
svn ci -m "ci" co1
svn co file:///tmp/arch/ co2

#make concurrent modification
echo "x"> co1/test.txt
echo "xxy"> co2/test.txt 
svn ci co1/ -m "ci"
upate version
cd co2/
svn up --non-interactive 
#=>we have a conflict, start meld from cmd line, so we get the output
meld .

=>just make some change, no need to really resolve the problem, save
meld asks, if it should mark the conflict resolved. Answer "yes", get the posted stacktrace.
Comment 9 Philippe Makowski 2015-04-04 14:55:25 CEST
ok I see
if you use button to resolve and commit under meld, all is ok, just reply "cancel" when the pop up ask when you quit Meld.
in that case you only get 
"Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
/usr/lib/python2.7/site-packages/meld/meldapp.py:124: TypeError: Passing arguments to gi.types.Boxed.__init__() is deprecated. All arguments passed will be ignored.
  Gdk.Event(Gdk.EventType.DELETE))
"
but that's another issue, I'm afraid that we need to wait for upstream reply
Comment 10 Philippe Makowski 2015-04-04 15:20:54 CEST
for information it is ok if you put in _vc.py :
    def resolve(self, runner, files):
        runner(
            ["svn"] + ["resolve","--accept","mine-full"] + files, [], refresh=True,
            working_dir=self.root)


but it is not very clean, and implementing only resolve and no other action seems strange. And it would be too much work for me.
Ping me if upstream have a full implementation.
Comment 11 Marc Krämer 2015-04-04 16:41:37 CEST
thanks for your work.
Thought it would be a small fix, since it seems to work in git & others. I can live with that, even if it would be easier to keep track of already resolved issues.
Comment 12 Philippe Makowski 2015-04-04 19:06:35 CEST
I close it then, but feel free to reopen if you have some news from upstream

Status: NEW => RESOLVED
Resolution: (none) => WONTFIX