Commit 5c3ed7c2 authored by Eric S. Raymond's avatar Eric S. Raymond

Restore correctness of blob test.

parent 2af5a2d2
...@@ -6010,10 +6010,10 @@ def remark(m, e): ...@@ -6010,10 +6010,10 @@ def remark(m, e):
markmap[event.mark] = origin + newcount markmap[event.mark] = origin + newcount
newcount += 1 newcount += 1
for event in self.events: for event in self.events:
for fld in (b"mark", b"committish"): for fld in (b"mark", b"committish", b"ref"):
try: try:
old = getattr(event, fld) old = getattr(event, fld)
if old is not None: if old is not None and old.startswith(":"):
new = remark(old, event) new = remark(old, event)
if debug_enable(DEBUG_UNITE): if debug_enable(DEBUG_UNITE):
announce(b"renumbering %s -> %s in %s.%s" % (old, new, announce(b"renumbering %s -> %s in %s.%s" % (old, new,
...@@ -6022,13 +6022,6 @@ def remark(m, e): ...@@ -6022,13 +6022,6 @@ def remark(m, e):
setattr(event, fld, new) setattr(event, fld, new)
except AttributeError: except AttributeError:
pass pass
for commit in self.commits():
for fileop in commit.operations():
if fileop.op == b"M" and fileop.ref.startswith(b":"):
new = remark(fileop.ref, fileop)
if debug_enable(DEBUG_UNITE):
announce(b"renumbering %s -> %s in fileop" % (fileop.ref, new))
fileop.ref = new
if baton: if baton:
baton.bumpcounter() baton.bumpcounter()
self.invalidate_object_map() self.invalidate_object_map()
...@@ -9443,7 +9436,7 @@ def do_add(self, line): ...@@ -9443,7 +9436,7 @@ def do_add(self, line):
except ValueError: except ValueError:
raise Recoverable(b"non-numeric mark %s in add command" % mark) raise Recoverable(b"non-numeric mark %s in add command" % mark)
if not isinstance(repo.objfind(mark), Blob): if not isinstance(repo.objfind(mark), Blob):
raise Recoverable(b"mark %s in add command does not refer to a blob") raise Recoverable(b"mark %s in add command does not refer to a blob" % mark)
elif markval >= min(self.selection): elif markval >= min(self.selection):
raise Recoverable(b"mark %s in add command is after add location" % mark) raise Recoverable(b"mark %s in add command is after add location" % mark)
path = fields[3] path = fields[3]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment