Lines 23-29
Link Here
|
23 |
DIFF_WSCOMMENTS = 'diff -Nau %s %s | grep "^[+-][^+-]" | grep -v "^[-+]#" | grep -v "^[-+][:space:]*$"' |
23 |
DIFF_WSCOMMENTS = 'diff -Nau %s %s | grep "^[+-][^+-]" | grep -v "^[-+]#" | grep -v "^[-+][:space:]*$"' |
24 |
MERGE = 'sdiff --suppress-common-lines --output=%s %s %s' |
24 |
MERGE = 'sdiff --suppress-common-lines --output=%s %s %s' |
25 |
|
25 |
|
26 |
LOG_CHANGES_TO = '/tmp/dispatch-conf.changes' |
26 |
LOG_CHANGES_TO = '/var/log/dispatch-conf.changes' |
27 |
|
27 |
|
28 |
MANDATORY_OPTS = [ 'archive-dir', 'diff', 'pager', 'replace-cvs', 'replace-wscomments' ] |
28 |
MANDATORY_OPTS = [ 'archive-dir', 'diff', 'pager', 'replace-cvs', 'replace-wscomments' ] |
29 |
|
29 |
|
Lines 145-151
Link Here
|
145 |
elif c == 'n': |
145 |
elif c == 'n': |
146 |
break |
146 |
break |
147 |
elif c == 'm': |
147 |
elif c == 'm': |
148 |
merged = '/tmp/dispatch-conf.merged.%i' % (os.getpid (),) |
148 |
merged = re.sub(r'\._mrg', '._tmp', mrgconf) |
149 |
print |
149 |
print |
150 |
os.system (MERGE % (merged, conf ['current'], newconf)) |
150 |
os.system (MERGE % (merged, conf ['current'], newconf)) |
151 |
os.rename (merged, mrgconf) |
151 |
os.rename (merged, mrgconf) |
Lines 161-166
Link Here
|
161 |
os.system(os.environ['EDITOR'] + ' ' + newconf) |
161 |
os.system(os.environ['EDITOR'] + ' ' + newconf) |
162 |
continue |
162 |
continue |
163 |
elif c == 'z': |
163 |
elif c == 'z': |
|
|
164 |
self.post_process(conf['current']) |
164 |
os.unlink(conf['new']) |
165 |
os.unlink(conf['new']) |
165 |
if os.path.exists(mrgconf): |
166 |
if os.path.exists(mrgconf): |
166 |
os.unlink(mrgconf) |
167 |
os.unlink(mrgconf) |