/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: 2021-07-05 19:11:53 UTC
  • Revision ID: tim@ed.am-20210705191153-5jcbb6lxv5i15ypx
fix debian dist-package installation

Show diffs side-by-side

added added

removed removed

20
20
 
21
21
 
22
22
import os
23
 
 
24
23
import stdhome.the as the
25
24
from stdhome.walker.walker import Walker
26
25
 
63
62
                return ( rel_file, abs_file )
64
63
 
65
64
 
66
 
        @classmethod
67
 
        def expand_files( cls, files, recurse = True ):
 
65
        @staticmethod
 
66
        def expand_files( files, recurse = True ):
68
67
                """Returns a unique, sorted list of relative files, calculated from the list
69
68
                provided, which is made up from individual files and directories
70
69
                relative to the CWD (and which must be contained within the home
78
77
 
79
78
                # iterate through file list
80
79
                for file in files:
81
 
                        ( rel_file, abs_file ) = cls.resolve_homedir_file( file )
 
80
                        ( rel_file, abs_file ) = self.resolve_homedir_file( file )
82
81
 
83
82
                        # check that file exists in repository
84
83
                        repo_file = os.path.join( the.repo.full_dir, rel_file )
91
90
                                the.repo.full_dir, rel_file, recurse ) )
92
91
 
93
92
                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.")