self.fileops = [] # blob and file operation list
self.properties = {} # commit properties (extension)
self.taglist = [] # Tags that point at this commit
+ self.branchlist = [] # Branches that point at this commit
def children(self):
"Get a list of this commit's children."
return filter(lambda e:self.mark in e.parent_marks,self.repo.commits())
dp = read_data(cStringIO.StringIO())
tag = Tag(tagname, referent, tagger, dp.getvalue())
self.events.append(tag)
- for commit in self.commits():
- if commit.mark == referent:
- commit.taglist.append(tag)
baton.twirl()
else:
# Simply pass through any line we don't understand.
self.events.append(line)
self.import_line = 0
self.readtime = time.time()
+ # Resolve tags and branches
+ for event in self.events:
+ if isinstance(event, Tag):
+ for commit in self.commits():
+ if commit.mark == event.committish:
+ commit.taglist.append(tag)
+ break
+ else:
+ raise FatalException("tag points at nonexistent %s"
+ % event.committish)
+ elif isinstance(event, Reset) and event.committish is not None:
+ for commit in self.commits():
+ if commit.mark == event.committish:
+ commit.branchlist.append(tag)
+ break
+ else:
+ raise FatalException("reset points at nonexistent %s"
+ % event.committish)
+
except KeyboardInterrupt:
nuke(self.subdir(), "rcs-fast-import: import interrupted, removing %s" % self.subdir())
raise KeyboardInterrupt