/stdhome

To get this branch, use:
bzr branch http://bzr.ed.am/stdhome

« back to all changes in this revision

Viewing changes to lib/stdhome/command/command.py

  • Committer: Tim Marston
  • Date: 2022-06-27 15:43:15 UTC
  • Revision ID: tim@ed.am-20220627154315-jkxty19bjqpbsqk9
reverted brz->bzr

Show diffs side-by-side

added added

removed removed

20
20
 
21
21
 
22
22
import os
 
23
 
23
24
import stdhome.the as the
24
25
from stdhome.walker.walker import Walker
25
26
 
62
63
                return ( rel_file, abs_file )
63
64
 
64
65
 
65
 
        @staticmethod
66
 
        def expand_files( files, recurse = True ):
 
66
        @classmethod
 
67
        def expand_files( cls, files, recurse = True ):
67
68
                """Returns a unique, sorted list of relative files, calculated from the list
68
69
                provided, which is made up from individual files and directories
69
70
                relative to the CWD (and which must be contained within the home
77
78
 
78
79
                # iterate through file list
79
80
                for file in files:
80
 
                        ( rel_file, abs_file ) = self.resolve_homedir_file( file )
 
81
                        ( rel_file, abs_file ) = cls.resolve_homedir_file( file )
81
82
 
82
83
                        # check that file exists in repository
83
84
                        repo_file = os.path.join( the.repo.full_dir, rel_file )
90
91
                                the.repo.full_dir, rel_file, recurse ) )
91
92
 
92
93
                return sorted( set ( ret ) )
 
94
 
 
95
 
 
96
        @staticmethod
 
97
        def print_stage_commands_notice():
 
98
                #      01234567890123456789012345678901234567890123456789012345678901234567890123456789
 
99
                print("In addition to using the primary commands (such as add and remove) to modify a")
 
100
                print("remote repository, you can also set up changes in the local repository and")
 
101
                print("manually commit them in one go to a remote repository when you're ready.  This")
 
102
                print("is done with the staging commands.  Note, some primary commands will not work")
 
103
                print("when there are staged changes.  You can revert all staged changes with the")
 
104
                print("stage-revert command.")