comparison hglib/client.py @ 22:297df22d6091

client: add backout command
author Idan Kamara <idankk86@gmail.com>
date Thu, 11 Aug 2011 16:09:21 +0300
parents ffef7df076e8
children 223e463c25e0
comparison
equal deleted inserted replaced
21:ffef7df076e8 22:297df22d6091
138 self.server.wait() 138 self.server.wait()
139 ret = self.server.returncode 139 ret = self.server.returncode
140 self.server = None 140 self.server = None
141 return ret 141 return ret
142 142
143 def backout(self, rev, merge=False, parent=None, tool=None, message=None,
144 logfile=None, date=None, user=None):
145 if message and logfile:
146 raise ValueError("cannot specify both a message and a logfile")
147
148 args = cmdbuilder('backout', r=rev, merge=merge, parent=parent, t=tool,
149 m=message, l=logfile, d=date, u=user)
150
151 self.rawcommand(args)
152
143 def branch(self, name=None, clean=False, force=False): 153 def branch(self, name=None, clean=False, force=False):
144 if name and clean: 154 if name and clean:
145 raise ValueError('cannot use both name and clean') 155 raise ValueError('cannot use both name and clean')
146 156
147 args = cmdbuilder('branch', name, f=force, C=clean) 157 args = cmdbuilder('branch', name, f=force, C=clean)