/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/walker/status.py

  • Committer: Tim Marston
  • Date: 2014-03-08 00:47:23 UTC
  • Revision ID: tim@ed.am-20140308004723-hkl3s2hobsblf72o
added diff command; moved all command to commands subdir; made stage-revert
handle ongoing deployment automatically (now that initial revno is known); made
verbose level incremental; detect obstructing conflicts in ConflictWalker;
handle files deleted from repo during copy-out (update)

Show diffs side-by-side

added added

removed removed

1
 
# status_walker.py
 
1
# status.py
2
2
#
3
3
# Copyright (C) 2013 to 2014 Tim Marston <tim@edm.am>
4
4
#
19
19
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
20
 
21
21
 
22
 
import filecmp
 
22
import filecmp, os
23
23
from walker import Walker
24
24
import stdhome.the as the
25
25
 
31
31
 
32
32
        Walker source:       home dir
33
33
        Walker destination:  repo
34
 
        Walker traversing:   repo
 
34
        Walker traversing:   repo (unless a walk list is provided)
35
35
        """
36
36
 
37
 
        def __init__( self ):
38
 
                self.src_dir = the.full_fsdir
 
37
        def __init__( self, walk_list = None ):
 
38
                self.src_dir = the.full_home_dir
39
39
                self.dst_dir = the.repo.full_dir
40
 
                self.walk_list = self.generate_walk_list( the.repo.full_dir )
 
40
                self.walk_list = walk_list if walk_list is not None else \
 
41
                                                 self.generate_walk_list( the.repo.full_dir )
41
42
 
42
43
                self.modified = list()
43
44
                self.missing = list()