Kiln » Dependencies » Dulwich Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in master

Support MemoryRepo.get_config.

Changeset ccf60d4442dd

Parent 25250c1694da

by Jelmer Vernooij

Changes to 2 files · Browse files at ccf60d4442dd Showing diff from parent 25250c1694da Diff from another changeset...

Change 1 of 1 Show Entire File NEWS Stacked
 
32
33
34
 
 
35
36
37
 
32
33
34
35
36
37
38
39
@@ -32,6 +32,8 @@
    * Support cloning repositories without HEAD set.   (D-Key, Jelmer Vernooij, issue #69) + + * Support ``MemoryRepo.get_config``. (Jelmer Vernooij)    0.8.5 2012-03-29  
Change 1 of 3 Show Entire File dulwich/​repo.py Stacked
 
967
968
969
970
971
972
973
974
975
976
977
978
979
 
980
981
982
 
1395
1396
1397
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1398
1399
1400
 
1479
1480
1481
 
 
 
 
 
 
 
 
1482
1483
1484
 
967
968
969
 
 
 
 
 
 
 
 
 
 
970
971
972
973
 
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
 
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
@@ -967,16 +967,7 @@
    :return: `ConfigFile` object for the ``.git/config`` file.   """ - from dulwich.config import ConfigFile - path = os.path.join(self._controldir, 'config') - try: - return ConfigFile.from_path(path) - except (IOError, OSError), e: - if e.errno != errno.ENOENT: - raise - ret = ConfigFile() - ret.path = path - return ret + raise NotImplementedError(self.get_config)     def get_config_stack(self):   """Return a config stack for this repository. @@ -1395,6 +1386,22 @@
    return target   + def get_config(self): + """Retrieve the config object. + + :return: `ConfigFile` object for the ``.git/config`` file. + """ + from dulwich.config import ConfigFile + path = os.path.join(self._controldir, 'config') + try: + return ConfigFile.from_path(path) + except (IOError, OSError), e: + if e.errno != errno.ENOENT: + raise + ret = ConfigFile() + ret.path = path + return ret +   def __repr__(self):   return "<Repo at %r>" % self.path   @@ -1479,6 +1486,14 @@
  """   raise NoIndexPresent()   + def get_config(self): + """Retrieve the config object. + + :return: `ConfigFile` object. + """ + from dulwich.config import ConfigFile + return ConfigFile() +   @classmethod   def init_bare(cls, objects, refs):   """Create a new bare repository in memory.