Git mergetool使用腻子在窗户上融合 [英] Git mergetool meld on windows using putty

查看:198
本文介绍了Git mergetool使用腻子在窗户上融合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Ubuntu上运行时,我已经使用meld在git中合并冲突的文件很长一段时间。现在我需要合并文件,但我的环境已经改变。我现在在Windows 7上使用PC,并使用Putty连接到CentOS服务器。我在服务器上安装了meld:


套件meld-1.3.1-2.el6.noarch已经安装并且最新版本


我甚至试图在我的电脑上安装windows的meld ...这没有帮助。运行时:



git mergetool -t meld



以下是响应:

 合并文件: gagglon / v4 / www / includes / php / test.php 
'gagglon / v4 / www / includes / php / test.php'的正常合并冲突:
{local}:modified
{remote}:修改
打开返回以启动合并分辨率工具(meld):
Traceback(最近调用最后一个):
第61行的/ usr / bin / meld文件<模块>
导入gtk
文件/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py,第64行,位于< module>
_init()
文件/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py,第52行,在_init
中_gtk.init_check( )
RuntimeError:无法打开显示
gagglon / v4 / www / includes / php / test.php似乎没有变化。
合并成功了吗? [y / n] n
合并gagglon / v4 / www / includes / php / test.php失败

我能做些什么来获得融合,或者你能帮我找到另一个我可以使用的工具,它也可以像meld一样易于使用?任何简单的界面都可以做到...

感谢您的提醒!

解决方案

在CentOS上,,

  • 不要忘记字体: yum install xorg-x11-font *
  • code>。

    I have used meld to merge the conflicted files in git for a long time while running on Ubuntu. Now I need to merge files, but my environnement has changed. I now use a PC on Windows 7, and connects to a CentOS server using Putty. I installed meld on the server :

    Package meld-1.3.1-2.el6.noarch already installed and latest version

    I tried even to install meld for windows on my PC... it doesn't help. When running :

    git mergetool -t meld

    Here's the response :

    Merging the files: gagglon/v4/www/includes/php/test.php
    Normal merge conflict for 'gagglon/v4/www/includes/php/test.php':
    {local}: modified
    {remote}: modified
    Hit return to start merge resolution tool (meld):
    Traceback (most recent call last):
    File "/usr/bin/meld", line 61, in <module>
    import gtk
    File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line 64, in <module>
    _init()
    File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line 52, in _init
    _gtk.init_check()
    RuntimeError: could not open display
    gagglon/v4/www/includes/php/test.php seems unchanged.
    Was the merge successful? [y/n] n
    merge of gagglon/v4/www/includes/php/test.php failed
    

    What can I do to get meld back, or could you help me find another tool I could use that would be also easy to use like meld ? Any easy interface would do...

    Thanks ahead !

    解决方案

    On CentOS, most of the threads I found insist on the importance of setting properly the environment variable $DISPLAY.

    Noticed that there DISPLAY environment variable was gone in that terminal session.
    Opening new terminal session or use different terminal session solves the problem...

    export DISPLAY=":1.0"
    

    But on putty, is is harder, as explained in this thread:

    All the system-config commands are designed to be ran via X11 (a Linux GUI).
    From the error messages its trying to run gtk commands which means its trying to open a GUI window, which is not going to happen via putty.
    I would look for other commands to setup what your trying to do.

    Why wouldn't you use meld on Windows directly?

    With putty only, you can try this solution, based on X11 forwarding:

    That means:

    • installing an X11 server on Windows, like XMing,
    • don't forget the fonts: yum install xorg-x11-font*.

    这篇关于Git mergetool使用腻子在窗户上融合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆