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

  • Committer: Tim Marston
  • Date: 2014-04-04 22:28:49 UTC
  • Revision ID: tim@ed.am-20140404222849-32apy1i949qaq2na
walker now passes Walker.File objects to process(), which includes file name,
type and the type of file it points to when it's a symlink

Show diffs side-by-side

added added

removed removed

1
 
# command_resolve.py
 
1
# resolve.py
2
2
#
3
3
# Copyright (C) 2014 Tim Marston <tim@edm.am>
4
4
#
20
20
 
21
21
 
22
22
import sys, re, getopt
23
 
import the
24
 
from deployment import Deployment
25
 
 
26
 
 
27
 
class CommandResolve:
 
23
from command import Command
 
24
import stdhome.the as the
 
25
from stdhome.deployment import Deployment
 
26
 
 
27
 
 
28
class ResolveCommand( Command ):
28
29
 
29
30
 
30
31
        def __init__( self ):
64
65
                                                'invalid repository name: ' + optarg )
65
66
                                self.repo = optarg
66
67
                        elif opt in [ '--verbose', '-v' ]:
67
 
                                the.verbose = True
 
68
                                the.verbose += 1
68
69
                        elif opt == "--help":
69
70
                                self.print_help()
70
71
                
91
92
                # check for conflicts in repo
92
93
                files = the.repo.vcs.get_conflicts()
93
94
                if files:
94
 
                        message += 'Conflicts in %s:\n  %s' % \
 
95
                        message += 'conflicts in %s:\n  %s' % \
95
96
                                           ( the.repo.name, '\n  '.join( files ) )
96
97
 
97
98
                # check for deployment conclicts
98
99
                conflicts = deployment.get_conflicts()
99
100
                if conflicts:
100
 
                        message += 'Deployment conflicts:\n  %s' % \
 
101
                        message += 'deployment conflicts:\n  %s' % \
101
102
                                           '\n  '.join( conflicts )
102
103
 
103
104
                # stop if there are conflicts