Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 24934:5abd0a76bc8f
requires: move requires file writing func from localrepo to scmutil
The logic to read a requires file resides in scmutil, so it's only logical that
the logic to write the file should be there too.
And now I've typed logic too many times it no longer looks like a word.
Logically.
author | Drew Gottlieb <drgott@google.com> |
---|---|
date | Mon, 13 Apr 2015 18:11:47 -0400 |
parents | 2eac3ae0d088 |
children | c44534209a0a |
comparison
equal
deleted
inserted
replaced
24932:022282152632 | 24934:5abd0a76bc8f |
---|---|
351 usetreemanifest = self.ui.configbool('experimental', 'treemanifest') | 351 usetreemanifest = self.ui.configbool('experimental', 'treemanifest') |
352 if usetreemanifest is not None: | 352 if usetreemanifest is not None: |
353 self.svfs.options['usetreemanifest'] = usetreemanifest | 353 self.svfs.options['usetreemanifest'] = usetreemanifest |
354 | 354 |
355 def _writerequirements(self): | 355 def _writerequirements(self): |
356 reqfile = self.vfs("requires", "w") | 356 scmutil.writerequires(self.vfs, self.requirements) |
357 for r in sorted(self.requirements): | |
358 reqfile.write("%s\n" % r) | |
359 reqfile.close() | |
360 | 357 |
361 def _checknested(self, path): | 358 def _checknested(self, path): |
362 """Determine if path is a legal nested repository.""" | 359 """Determine if path is a legal nested repository.""" |
363 if not path.startswith(self.root): | 360 if not path.startswith(self.root): |
364 return False | 361 return False |