Compare multiple file pairs (from the command line)
- From: Campbell Barton <ideasman42 gmail com>
- To: meld-list gnome org
- Subject: Compare multiple file pairs (from the command line)
- Date: Thu, 23 Dec 2010 03:37:53 +0000
Hi, I use meld for checking edits before committing with this script (below).
The annoying thing is for every file pair it opens a new window.
It would be really nice if there was some way to open multiple pairs
of files as tabs one window.
This is already supported when doing a directory diff, its just there
is no way to access this from the command line.
--- snip
#!/usr/bin/env python
import sys, os
def svnpair(f):
f_other = os.path.join(os.path.dirname(f), ".svn", "text-base",
os.path.basename(f) + ".svn-base" )
return f_other, f
def svndiff(f):
if os.path.exists(f):
# release/scripts/ui/.svn/text-base/space_text.py.svn-base
os.system("meld \"%s\" \"%s\" &" % svnpair(f))
files = sys.argv[1:]
if not files:
files = os.popen('svn st | grep "^M" | cut -f4-8 -d" "').read().split()
for f in files:
svndiff(f)
---
- Campbell
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]