Mercurial > hg
comparison mercurial/context.py @ 32610:bf728e72a219
context: move dirty() to committablectx
This is a pedantic move. It should be an error if dirty() is called on a
read-only context. Based on Mads Kiilerix's and my work at the sprint.
author | Sean Farley <sean@farley.io> |
---|---|
date | Thu, 11 May 2017 13:59:48 -0700 |
parents | c0b16b801687 |
children | e7eb7494e98d |
comparison
equal
deleted
inserted
replaced
32609:c0b16b801687 | 32610:bf728e72a219 |
---|---|
320 def dirs(self): | 320 def dirs(self): |
321 return self._manifest.dirs() | 321 return self._manifest.dirs() |
322 | 322 |
323 def hasdir(self, dir): | 323 def hasdir(self, dir): |
324 return self._manifest.hasdir(dir) | 324 return self._manifest.hasdir(dir) |
325 | |
326 def dirty(self, missing=False, merge=True, branch=True): | |
327 return False | |
328 | 325 |
329 def status(self, other=None, match=None, listignored=False, | 326 def status(self, other=None, match=None, listignored=False, |
330 listclean=False, listunknown=False, listsubrepos=False): | 327 listclean=False, listunknown=False, listsubrepos=False): |
331 """return status of files between two nodes or node and working | 328 """return status of files between two nodes or node and working |
332 directory. | 329 directory. |
1567 # write changes out explicitly, because nesting wlock at | 1564 # write changes out explicitly, because nesting wlock at |
1568 # runtime may prevent 'wlock.release()' in 'repo.commit()' | 1565 # runtime may prevent 'wlock.release()' in 'repo.commit()' |
1569 # from immediately doing so for subsequent changing files | 1566 # from immediately doing so for subsequent changing files |
1570 self._repo.dirstate.write(self._repo.currenttransaction()) | 1567 self._repo.dirstate.write(self._repo.currenttransaction()) |
1571 | 1568 |
1569 def dirty(self, missing=False, merge=True, branch=True): | |
1570 return False | |
1571 | |
1572 class workingctx(committablectx): | 1572 class workingctx(committablectx): |
1573 """A workingctx object makes access to data related to | 1573 """A workingctx object makes access to data related to |
1574 the current working directory convenient. | 1574 the current working directory convenient. |
1575 date - any valid date string or (unixtime, offset), or None. | 1575 date - any valid date string or (unixtime, offset), or None. |
1576 user - username string, or None. | 1576 user - username string, or None. |