22
22
import sys, re, getopt
 
23
 
from .command import Command
 
 
23
from command import Command
 
24
24
import stdhome.the as the
 
25
25
from stdhome.deployment import Deployment
 
26
26
from stdhome.walker.copy_out import CopyOutWalker
 
 
37
37
        def print_help( self ):
 
38
 
                print("Usage: " + the.program.name + " revert [--repo=REPO] [--all] [FILE]...")
 
 
38
                print "Usage: " + the.program.name + " revert [--repo=REPO] [--all] [FILE]..."
 
40
40
                #      01234567890123456789012345678901234567890123456789012345678901234567890123456789
 
41
 
                print("Revert any local changes to a file in the home directory.")
 
43
 
                print("This reverts the content of the named files, in the local filesystem, specified")
 
44
 
                print("relative to the home directory, to its state in the repo.  Specifying individual")
 
45
 
                print("files and directories will revert them (recursively, in the case of")
 
46
 
                print("directories).  Or you can revert all files in your home directory by specifying")
 
47
 
                print("no files and explicitly using the --all option.")
 
49
 
                print("To see a list files that can be reverted, type:")
 
50
 
                print("    " + the.program.name + " status")
 
53
 
                print("      --all        confirm that you want to revert all files")
 
54
 
                print("      --quiet      do not report changes to the home directory")
 
55
 
                print("  -r, --repo=REPO  select the repo to check-out or create (defaults to 'home')")
 
56
 
                print("  -v, --verbose    display information about what is being done")
 
57
 
                print("      --help       display help and exit")
 
 
41
                print "Revert any local changes to a file in the home directory."
 
 
43
                print "This reverts the content of the named files, in the local filesystem, specified"
 
 
44
                print "relative to the home directory, to its state in the repo.  Specifying individual"
 
 
45
                print "files and directories will revert them (recursively, in the case of"
 
 
46
                print "directories).  Or you can revert all files in your home directory by specifying"
 
 
47
                print "no files and explicitly using the --all option."
 
 
49
                print "To see a list files that can be reverted, type:"
 
 
50
                print "    " + the.program.name + " status"
 
 
53
                print "      --all        confirm that you want to revert all files"
 
 
54
                print "      --quiet      do not report changes to the home directory"
 
 
55
                print "  -r, --repo=REPO  select the repo to check-out or create (defaults to 'home')"
 
 
56
                print "  -v, --verbose    display information about what is being done"
 
 
57
                print "      --help       display help and exit"
 
 
112
112
                                ( the.repo.name, the.program.name ) )
 
115
 
                walker = CopyOutWalker( files if files else None, not self.quiet )
 
 
115
                walker = CopyOutWalker( files if files else None, self.quiet )