/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: 2021-07-05 19:14:32 UTC
  • Revision ID: tim@ed.am-20210705191432-243ayb7s2nmussvi
python3ification

Show diffs side-by-side

added added

removed removed

19
19
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
20
 
21
21
 
22
 
import getopt
23
 
import re
24
 
import sys
25
 
 
 
22
import sys, re, getopt
 
23
from .command import Command
26
24
import stdhome.the as the
27
25
from stdhome.deployment import Deployment
28
26
 
29
 
from .command import Command
30
 
 
31
27
 
32
28
class ResolveCommand( Command ):
33
29
 
98
94
                # check for conflicts in repo
99
95
                files = the.repo.vcs.get_conflicts()
100
96
                if files:
101
 
                        message += 'conflicts in %s:\n  %s\n' % \
 
97
                        message += 'conflicts in %s:\n  %s' % \
102
98
                                           ( the.repo.name, '\n  '.join( files ) )
103
99
 
104
100
                # check for deployment conclicts
105
101
                conflicts = deployment.get_conflicts()
106
102
                if conflicts:
107
 
                        message += 'deployment conflicts:\n  %s\n' % \
 
103
                        message += 'deployment conflicts:\n  %s' % \
108
104
                                           '\n  '.join( conflicts )
109
105
 
110
106
                # stop if there are conflicts
111
107
                if message:
112
108
                        raise the.program.FatalError(
113
 
                                'there were conflicts...\n' + message.rstrip( '\n' ) )
 
109
                                'there were conflicts...\n' + message )
114
110
 
115
111
                # copy-out changes from repo
116
112
                deployment.copy_out( self.quiet )