Submitter | Pierre-Yves David |
---|---|
Date | Jan. 4, 2013, 1:04 a.m. |
Message ID | <ecb6c49286b1c1238f5d.1357261457@yamac.lan> |
Download | mbox | patch |
Permalink | /patch/383/ |
State | Accepted |
Commit | dd0b636b0b658546f9318d857a0f91e8f6587033 |
Headers | show |
Comments
Patch
diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py --- a/mercurial/branchmap.py +++ b/mercurial/branchmap.py @@ -115,10 +115,13 @@ class branchcache(dict): return ((self.tipnode == repo.changelog.node(self.tiprev)) and (self.filteredhash == self._hashfiltered(repo))) except IndexError: return False + def copy(self): + """return an deep copy of the branchcache object""" + return branchcache(self, self.tipnode, self.tiprev, self.filteredhash) def write(self, repo): try: f = repo.opener(_filename(repo), "w", atomictemp=True) except (IOError, OSError, util.Abort):