equal
deleted
inserted
replaced
36 registrar, |
36 registrar, |
37 util, |
37 util, |
38 ) |
38 ) |
39 from mercurial.utils import ( |
39 from mercurial.utils import ( |
40 dateutil, |
40 dateutil, |
|
41 procutil, |
41 stringutil, |
42 stringutil, |
42 ) |
43 ) |
43 |
44 |
44 cmdtable = {} |
45 cmdtable = {} |
45 command = registrar.command(cmdtable) |
46 command = registrar.command(cmdtable) |
253 """ |
254 """ |
254 _currentcommand = () |
255 _currentcommand = () |
255 _lockref = None |
256 _lockref = None |
256 |
257 |
257 def __init__(self, repo): |
258 def __init__(self, repo): |
258 self.user = util.getuser() |
259 self.user = procutil.getuser() |
259 self.ui = repo.ui |
260 self.ui = repo.ui |
260 self.vfs = repo.vfs |
261 self.vfs = repo.vfs |
261 |
262 |
262 # is this working copy using a shared storage? |
263 # is this working copy using a shared storage? |
263 self.sharedfeatures = self.sharedvfs = None |
264 self.sharedfeatures = self.sharedvfs = None |
270 |
271 |
271 # track the current command for recording in journal entries |
272 # track the current command for recording in journal entries |
272 @property |
273 @property |
273 def command(self): |
274 def command(self): |
274 commandstr = ' '.join( |
275 commandstr = ' '.join( |
275 map(util.shellquote, journalstorage._currentcommand)) |
276 map(procutil.shellquote, journalstorage._currentcommand)) |
276 if '\n' in commandstr: |
277 if '\n' in commandstr: |
277 # truncate multi-line commands |
278 # truncate multi-line commands |
278 commandstr = commandstr.partition('\n')[0] + ' ...' |
279 commandstr = commandstr.partition('\n')[0] + ' ...' |
279 return commandstr |
280 return commandstr |
280 |
281 |