diff --git a/hgext/journal.py b/hgext/journal.py index 0a9cd6e324cd895ebfd1943dce065bcbc8ee6b12_aGdleHQvam91cm5hbC5weQ==..6d11ae3c4c4b450bb08cc462b8c403e7b1c6771e_aGdleHQvam91cm5hbC5weQ== 100644 --- a/hgext/journal.py +++ b/hgext/journal.py @@ -162,8 +162,8 @@ # there is a shared repository and there are shared journal entries # to copy. move shared date over from source to destination but # move the local file first - if repo.vfs.exists('journal'): - journalpath = repo.join('journal') + if repo.vfs.exists('namejournal'): + journalpath = repo.join('namejournal') util.rename(journalpath, journalpath + '.bak') storage = repo.journal local = storage._open( @@ -167,7 +167,7 @@ util.rename(journalpath, journalpath + '.bak') storage = repo.journal local = storage._open( - repo.vfs, filename='journal.bak', _newestfirst=False) + repo.vfs, filename='namejournal.bak', _newestfirst=False) shared = ( e for e in storage._open(sharedrepo.vfs, _newestfirst=False) if sharednamespaces.get(e.namespace) in sharedfeatures) @@ -273,9 +273,9 @@ raise error.Abort(_('journal lock does not support nesting')) desc = _('journal of %s') % vfs.base try: - l = lock.lock(vfs, 'journal.lock', 0, desc=desc) + l = lock.lock(vfs, 'namejournal.lock', 0, desc=desc) except error.LockHeld as inst: self.ui.warn( _("waiting for lock on %s held by %r\n") % (desc, inst.locker)) # default to 600 seconds timeout l = lock.lock( @@ -277,9 +277,9 @@ except error.LockHeld as inst: self.ui.warn( _("waiting for lock on %s held by %r\n") % (desc, inst.locker)) # default to 600 seconds timeout l = lock.lock( - vfs, 'journal.lock', + vfs, 'namejournal.lock', int(self.ui.config("ui", "timeout", "600")), desc=desc) self.ui.warn(_("got lock after %s seconds\n") % l.delay) self._lockref = weakref.ref(l) @@ -319,7 +319,7 @@ with self.jlock(vfs): version = None # open file in amend mode to ensure it is created if missing - with vfs('journal', mode='a+b', atomictemp=True) as f: + with vfs('namejournal', mode='a+b', atomictemp=True) as f: f.seek(0, os.SEEK_SET) # Read just enough bytes to get a version number (up to 2 # digits plus separator) @@ -377,7 +377,7 @@ if sharednamespaces.get(e.namespace) in self.sharedfeatures) return _mergeentriesiter(local, shared) - def _open(self, vfs, filename='journal', _newestfirst=True): + def _open(self, vfs, filename='namejournal', _newestfirst=True): if not vfs.exists(filename): return diff --git a/tests/test-journal.t b/tests/test-journal.t index 0a9cd6e324cd895ebfd1943dce065bcbc8ee6b12_dGVzdHMvdGVzdC1qb3VybmFsLnQ=..6d11ae3c4c4b450bb08cc462b8c403e7b1c6771e_dGVzdHMvdGVzdC1qb3VybmFsLnQ= 100644 --- a/tests/test-journal.t +++ b/tests/test-journal.t @@ -232,7 +232,7 @@ Test for behaviour on unexpected storage version information - $ printf '42\0' > .hg/journal + $ printf '42\0' > .hg/namejournal $ hg journal previous locations of '.': abort: unknown journal file version '42'