r850745 | cmpilato | 2004-08-17 20:13:42 +0000 (Tue, 17 Aug 2004) Teach scramble-tree.py to use Subversion, give it a dry-run mode, and clean up a bunch of stuff. Suggested by: Elchan Aliev <aelchan@collab.net> * tools/dev/scramble-tree.py (hashDir.walker_callback, walker_callback): Whitespace mods only. (Scrambler.__init__): Add 'use_svn' and 'dry_run' parameters. (Scrambler._mod_append_to_file): Was append_to_file, and now takes an explicit path (instead of expecting self.path). Do nothing in dry_run mode. (Scrambler._mod_delete_file): Was delete_file, and now takes an explicit path (instead of expecting self.path). Also, if use_svn, use svn. But do nothing in dry_run mode. (Scrambler.shrink_list): Moved into... (Scrambler._mod_remove_from_file): ...here. Which was remove_from_file. And which now takes an explicit path (instead of expecting self.path). But which does nothing in dry_run mode. (Scrambler.munge_file): Pass path to the mod function. (Scrambler.maybe_add_file): If use_svn, use svn. Unless in dry_run mode, in which case, do nothing. (usage): Update usage message. (main): Parse new options and stuff.
r851114 | cmpilato | 2004-09-18 00:58:01 +0000 (Sat, 18 Sep 2004) Teach scramble-tree.py to work on CVS working copies, too. Patch by: Elchan Aliev <aelchan@collab.net> me * tools/dev/scramble-tree.py (main): Was __main__ (kinda). Now accepts --use-cvs. (usage): Update usage message. (VCActions, CVSActions, SVNActions): New. (Scrambler.__init__): Take vc_actions object instead of use_svn flag. (Scrambler._mod_delete_file, Scrambler.maybe_add_file): Use the vc_actions object if it exists, instead of just doing Subversion stuff.