Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 8103 Details for
Bug 14079
Python replacement for etc-update
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Improve handling of merges; tweak command chars.
dispatch-conf.patch (text/plain), 4.53 KB, created by
Wayne Davison
on 2003-02-09 18:45:56 UTC
(
hide
)
Description:
Improve handling of merges; tweak command chars.
Filename:
MIME Type:
Creator:
Wayne Davison
Created:
2003-02-09 18:45:56 UTC
Size:
4.53 KB
patch
obsolete
>--- dispatch-conf.orig 2003-02-09 14:45:04.000000000 -0800 >+++ dispatch-conf 2003-02-09 15:35:37.000000000 -0800 >@@ -58,11 +58,16 @@ > same_cvs = same_cvs and self.options ['replace-cvs'] == 'yes' > same_wsc = same_wsc and self.options ['replace-wscomments'] == 'yes' > >+ mrg = re.sub (r'\._cfg', '._mrg', conf ['new']) > if same_file: > os.unlink (conf ['new']) >+ if os.path.exists (mrg): >+ os.unlink (mrg) > return False > elif same_cvs or same_wsc or conf ['dir'] in portage.settings ['CONFIG_PROTECT_MASK'].split (): > self.replace (conf ['new'], conf ['current']) >+ if os.path.exists (mrg): >+ os.unlink (mrg) > return False > else: > return True >@@ -76,33 +81,59 @@ > for conf in confs: > count = count + 1 > >+ new = conf ['new'] >+ mrg = re.sub (r'\._cfg', '._mrg', new) >+ if os.path.exists (mrg): >+ new = mrg >+ show_new_diff = 0 >+ > while 1: >- os.system ((self.options ['diff'] + '| %s') % (conf ['current'], conf ['new'], self.options ['pager'])) >+ if show_new_diff: >+ os.system ((self.options ['diff'] + '| %s') % (conf ['current'], mrg, self.options ['pager'])) >+ show_new_diff = 0 >+ else: >+ os.system ((self.options ['diff'] + '| %s') % (conf ['current'], new, self.options ['pager'])) > > print > print '>> (%i of %i) -- %s' % (count, len(confs), conf ['current']) >- print '>> q quit, h help, n skip, f fuse/merge, k kill new, s supercede w/new', >+ print '>> q quit, h help, n next, m merge, t toggle-merge, d del-new, u use-new: ', > > c = getch () > > if c == 'q': > sys.exit (0) > if c == 'h': >- do_help () >+ self.do_help () >+ continue >+ elif c == 't': >+ if new == mrg: >+ new = conf ['new'] >+ elif os.path.exists (mrg): >+ new = mrg > continue > elif c == 'n': > break >- elif c == 'f': >+ elif c == 'm': > merged = '/tmp/dispatch-conf.merged.%i' % (os.getpid (),) > print >- os.system (MERGE % (merged, conf ['current'], conf ['new'])) >- os.rename (merged, conf ['new']) >+ os.system (MERGE % (merged, conf ['current'], new)) >+ os.rename (merged, mrg) >+ new = mrg > continue >- elif c == 'k': >+ elif c == 'l': >+ show_new_diff = 1 >+ continue >+ elif c == 'd': > os.remove (conf ['new']) >+ if os.path.exists (mrg): >+ os.remove (mrg) > break >- elif c == 's': >- self.replace (conf ['new'], conf ['current']) >+ elif c == 'u': >+ self.replace (new, conf ['current']) >+ if os.path.exists (conf ['new']): >+ os.remove (conf ['new']) >+ if os.path.exists (mrg): >+ os.remove (mrg) > break > else: > continue >@@ -172,12 +203,14 @@ > def do_help (self): > print; print > >- print ' q -- quit' >+ print ' u -- update current config with new config and continue' >+ print ' d -- delete new config and continue' >+ print ' n -- skip to next config, leave all intact' >+ print ' m -- interactively merge current and new configs' >+ print ' l -- look at diff between _new_ and merged configs (not current and merged)' >+ print ' t -- toggle new config between merged and pre-merged state' > print ' h -- this screen' >- print ' n -- next/skip to next config, leave all intact' >- print ' f -- interactively fuse/merge current and new configs' >- print ' k -- kill/remove new config and continue' >- print ' s -- supercede current config with new and continue' >+ print ' q -- quit' > > print; print 'press any key to return to diff...', >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 14079
:
7390
|
7391
|
8103
|
8364
|
8575
|
8589
|
8593
|
8602
|
8624
|
8625
|
8633
|
15984
|
16059
|
17243
|
17602
|
17603
|
21970