mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2025-10-26 06:06:06 +01:00
Support using shared marks files for all remotes
... which essentially track the shared bag of revisions that the shared proxy repo constitutes.
This commit is contained in:
@@ -128,7 +128,7 @@ class GitHgRepo:
|
||||
remotehg = import_sibling('remotehg', 'git-remote-hg')
|
||||
for r in self.get_hg_repos():
|
||||
try:
|
||||
hgpath = os.path.join(self.gitdir, 'hg', r)
|
||||
hgpath = remotehg.select_marks_dir(r, self.gitdir, False)
|
||||
m = remotehg.Marks(os.path.join(hgpath, 'marks-hg'), None)
|
||||
mark = m.from_rev(rev)
|
||||
m = GitMarks(os.path.join(hgpath, 'marks-git'))
|
||||
@@ -151,6 +151,9 @@ class GitHgRepo:
|
||||
# skip the shared repo
|
||||
if r == '.hg':
|
||||
continue
|
||||
# only dirs
|
||||
if not os.path.isdir(os.path.join(shared_path, r)):
|
||||
continue
|
||||
local_path = os.path.join(shared_path, r, 'clone')
|
||||
local_hg = os.path.join(local_path, '.hg')
|
||||
if not os.path.exists(local_hg):
|
||||
@@ -415,7 +418,7 @@ class GcCommand(SubCommand):
|
||||
for remote in args:
|
||||
if not remote in hg_repos:
|
||||
self.usage('%s is not a valid hg remote' % (remote))
|
||||
hgpath = os.path.join(self.githgrepo.gitdir, 'hg', remote)
|
||||
hgpath = remotehg.select_marks_dir(remote, self.githgrepo.gitdir, False)
|
||||
print "Loading hg marks ..."
|
||||
hgm = remotehg.Marks(os.path.join(hgpath, 'marks-hg'), None)
|
||||
print "Loading git marks ..."
|
||||
|
||||
Reference in New Issue
Block a user