Submitter | Gregory Szorc |
---|---|
Date | June 26, 2016, 2:52 a.m. |
Message ID | <d649fe29fefb6827b3f4.1466909577@ubuntu-vm-main> |
Download | mbox | patch |
Permalink | /patch/15630/ |
State | Accepted |
Headers | show |
Comments
Queued, thanks > On Jun 25, 2016, at 10:52 PM, Gregory Szorc <gregory.szorc@gmail.com> wrote: > > # HG changeset patch > # User Gregory Szorc <gregory.szorc@gmail.com> > # Date 1457827699 28800 > # Sat Mar 12 16:08:19 2016 -0800 > # Node ID d649fe29fefb6827b3f47b8cad05d1188ea4e325 > # Parent fbe380dc227a0240939aa5a4941eda70d958ea40 > branchmap: remove unused exception variable > > diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py > --- a/mercurial/branchmap.py > +++ b/mercurial/branchmap.py > @@ -358,17 +358,17 @@ class revbranchcache(object): > self._repo = repo > self._names = [] # branch names in local encoding with static index > self._rbcrevs = array('c') # structs of type _rbcrecfmt > self._rbcsnameslen = 0 > try: > bndata = repo.vfs.read(_rbcnames) > self._rbcsnameslen = len(bndata) # for verification before writing > self._names = [encoding.tolocal(bn) for bn in bndata.split('\0')] > - except (IOError, OSError) as inst: > + except (IOError, OSError): > if readonly: > # don't try to use cache - fall back to the slow path > self.branchinfo = self._branchinfo > > if self._names: > try: > data = repo.vfs.read(_rbcrevs) > self._rbcrevs.fromstring(data) > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Patch
diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py --- a/mercurial/branchmap.py +++ b/mercurial/branchmap.py @@ -358,17 +358,17 @@ class revbranchcache(object): self._repo = repo self._names = [] # branch names in local encoding with static index self._rbcrevs = array('c') # structs of type _rbcrecfmt self._rbcsnameslen = 0 try: bndata = repo.vfs.read(_rbcnames) self._rbcsnameslen = len(bndata) # for verification before writing self._names = [encoding.tolocal(bn) for bn in bndata.split('\0')] - except (IOError, OSError) as inst: + except (IOError, OSError): if readonly: # don't try to use cache - fall back to the slow path self.branchinfo = self._branchinfo if self._names: try: data = repo.vfs.read(_rbcrevs) self._rbcrevs.fromstring(data)