/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/add.py

  • Committer: Tim Marston
  • Date: 2016-02-23 22:37:03 UTC
  • Revision ID: tim@ed.am-20160223223703-sx94svvstwt8xvrb
determine and instantiate repo vcs dynamically; for new repos, added default vcs
configuration option and allow override in init command arguments; re-added
handling of -v/--verbose arguments to commands and removed from program (since
there may be problems parsing all arguments here)

Show diffs side-by-side

added added

removed removed

109
109
        def expand_home_dir_files( files ):
110
110
                """Returns a unique, sorted list of relative filenames, calculated from the list
111
111
                provided, which is made up from individual files and directories
112
 
                relative to the CWD.  Directories are not recursed in to, and leading
113
 
                path components are not returned.  Specified filenames must exist in the
114
 
                home directory (although they may not exist in the repo).
 
112
                relative to the CWD.  Directories and are not recursed in to, but
 
113
                leading path components are also returned.  Specified filenames must
 
114
                exist in the home directory (although they may not exist in the repo).
115
115
 
116
116
                """
117
117
 
137
137
                                raise the.program.FatalError(
138
138
                                        'not found in home directory: %s' % rel_file )
139
139
 
140
 
                        # # append path parts
141
 
                        # path = rel_file
142
 
                        # while True:
143
 
                        #       path, dummy = os.path.split( path )
144
 
                        #       if len( path ): ret.add( path )
145
 
                        #       else: break
 
140
                        # append path parts
 
141
                        path = rel_file
 
142
                        while True:
 
143
                                path, dummy = os.path.split( path )
 
144
                                if len( path ): ret.add( path )
 
145
                                else: break
146
146
 
147
147
                        # append the file or directory
148
148
                        ret.add( rel_file )