163 # this iterable is empty, remove it from consideration |
163 # this iterable is empty, remove it from consideration |
164 del iterable_map[key] |
164 del iterable_map[key] |
165 |
165 |
166 def wrappostshare(orig, sourcerepo, destrepo, **kwargs): |
166 def wrappostshare(orig, sourcerepo, destrepo, **kwargs): |
167 """Mark this shared working copy as sharing journal information""" |
167 """Mark this shared working copy as sharing journal information""" |
168 orig(sourcerepo, destrepo, **kwargs) |
168 with destrepo.wlock(): |
169 with destrepo.vfs('shared', 'a') as fp: |
169 orig(sourcerepo, destrepo, **kwargs) |
170 fp.write('journal\n') |
170 with destrepo.vfs('shared', 'a') as fp: |
|
171 fp.write('journal\n') |
171 |
172 |
172 def unsharejournal(orig, ui, repo, repopath): |
173 def unsharejournal(orig, ui, repo, repopath): |
173 """Copy shared journal entries into this repo when unsharing""" |
174 """Copy shared journal entries into this repo when unsharing""" |
174 if (repo.path == repopath and repo.shared() and |
175 if (repo.path == repopath and repo.shared() and |
175 util.safehasattr(repo, 'journal')): |
176 util.safehasattr(repo, 'journal')): |