##// END OF EJS Templates
shelve: some docstring cleanups
Augie Fackler -
r19911:1c58e368 default
parent child Browse files
Show More
@@ -77,10 +77,11 b' class shelvedfile(object):'
77 77 self.name)
78 78
79 79 class shelvedstate(object):
80 """Handle persistences during unshelving operation.
80 """Handle persistence during unshelving operations.
81 81
82 82 Handles saving and restoring a shelved state. Ensures that different
83 versions of a shelved state are possible and handles them appropriate"""
83 versions of a shelved state are possible and handles them appropriately.
84 """
84 85 _version = 1
85 86 _filename = 'shelvedstate'
86 87
@@ -120,7 +121,7 b' class shelvedstate(object):'
120 121 util.unlinkpath(repo.join(cls._filename), ignoremissing=True)
121 122
122 123 def createcmd(ui, repo, pats, opts):
123 """subcommand that create a new shelve"""
124 """subcommand that creates a new shelve"""
124 125
125 126 def publicancestors(ctx):
126 127 """Compute the heads of the public ancestors of a commit.
@@ -251,7 +252,7 b' def createcmd(ui, repo, pats, opts):'
251 252 lockmod.release(lock, wlock)
252 253
253 254 def cleanupcmd(ui, repo):
254 """subcommand that delete all shelves"""
255 """subcommand that deletes all shelves"""
255 256
256 257 wlock = None
257 258 try:
@@ -264,7 +265,7 b' def cleanupcmd(ui, repo):'
264 265 lockmod.release(wlock)
265 266
266 267 def deletecmd(ui, repo, pats):
267 """subcommand that delete a specific shelve"""
268 """subcommand that deletes a specific shelve"""
268 269 if not pats:
269 270 raise util.Abort(_('no shelved changes specified!'))
270 271 wlock = None
@@ -282,7 +283,7 b' def deletecmd(ui, repo, pats):'
282 283 lockmod.release(wlock)
283 284
284 285 def listshelves(repo):
285 """return all shelves in repo as list of (time, filename)"""
286 """return all shelves in repo as list of (time, filename)"""
286 287 try:
287 288 names = repo.vfs.readdir('shelved')
288 289 except OSError, err:
@@ -299,7 +300,7 b' def listshelves(repo):'
299 300 return sorted(info, reverse=True)
300 301
301 302 def listcmd(ui, repo, pats, opts):
302 """subcommand that display the list of shelve"""
303 """subcommand that displays the list of shelves"""
303 304 pats = set(pats)
304 305 width = 80
305 306 if not ui.plain():
@@ -347,7 +348,7 b' def listcmd(ui, repo, pats, opts):'
347 348 fp.close()
348 349
349 350 def readshelvedfiles(repo, basename):
350 """return the list of file touched in a shelve"""
351 """return the list of files touched in a shelve"""
351 352 fp = shelvedfile(repo, basename, 'files').opener()
352 353 return fp.read().split('\0')
353 354
@@ -389,7 +390,7 b' def unshelveabort(ui, repo, state, opts)'
389 390 lockmod.release(lock, wlock)
390 391
391 392 def unshelvecleanup(ui, repo, name, opts):
392 """remove related file after an unshelve"""
393 """remove related files after an unshelve"""
393 394 if not opts['keep']:
394 395 for filetype in 'hg files patch'.split():
395 396 shelvedfile(repo, name, filetype).unlink()
General Comments 0
You need to be logged in to leave comments. Login now