Show More
@@ -306,6 +306,15 b' class GitRepository(BaseRepository):' | |||||
306 | url = ':///'.join(('file', url)) |
|
306 | url = ':///'.join(('file', url)) | |
307 | return url |
|
307 | return url | |
308 |
|
308 | |||
|
309 | def get_hook_location(self): | |||
|
310 | """ | |||
|
311 | returns absolute path to location where hooks are stored | |||
|
312 | """ | |||
|
313 | loc = os.path.join(self.path, 'hooks') | |||
|
314 | if not self.bare: | |||
|
315 | loc = os.path.join(self.path, '.git', 'hooks') | |||
|
316 | return loc | |||
|
317 | ||||
309 | @LazyProperty |
|
318 | @LazyProperty | |
310 | def name(self): |
|
319 | def name(self): | |
311 | return os.path.basename(self.path) |
|
320 | return os.path.basename(self.path) |
@@ -422,6 +422,12 b' class MercurialRepository(BaseRepository' | |||||
422 | url = "file:" + urllib.pathname2url(url) |
|
422 | url = "file:" + urllib.pathname2url(url) | |
423 | return url |
|
423 | return url | |
424 |
|
424 | |||
|
425 | def get_hook_location(self): | |||
|
426 | """ | |||
|
427 | returns absolute path to location where hooks are stored | |||
|
428 | """ | |||
|
429 | return os.path.join(self.path, '.hg', '.hgrc') | |||
|
430 | ||||
425 | def get_changeset(self, revision=None): |
|
431 | def get_changeset(self, revision=None): | |
426 | """ |
|
432 | """ | |
427 | Returns ``MercurialChangeset`` object representing repository's |
|
433 | Returns ``MercurialChangeset`` object representing repository's | |
@@ -492,7 +498,7 b' class MercurialRepository(BaseRepository' | |||||
492 | """ |
|
498 | """ | |
493 | return MercurialWorkdir(self) |
|
499 | return MercurialWorkdir(self) | |
494 |
|
500 | |||
495 | def get_config_value(self, section, name, config_file=None): |
|
501 | def get_config_value(self, section, name=None, config_file=None): | |
496 | """ |
|
502 | """ | |
497 | Returns configuration value for a given [``section``] and ``name``. |
|
503 | Returns configuration value for a given [``section``] and ``name``. | |
498 |
|
504 |
General Comments 0
You need to be logged in to leave comments.
Login now