Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'can't add a new key into hash during iteration' error #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions rcs-fast-export.rb
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,11 @@ def RCS.parse(fname, rcsfile, opts={})
rcs.revision.each do |key, rev|
if rev.date.nil? and not rev.symbols.empty?
top = keys.select { |k| k.match(/^#{key}\./) }.sort.last
# assume it's all good if we can't find anything
if top == nil
branches << key
next
end
tr = rcs.revision[top]
raise "unhandled complex branch structure met: #{rev.inspect} refers #{tr.inspect}" if tr.date.nil?
tr.branches |= rev.symbols
Expand Down Expand Up @@ -998,8 +1003,8 @@ def steal_username
filename = File.basename(rcsfile, SFX)
path = File.dirname(rcsfile)
# strip trailing "/RCS" if present, or "RCS" if that's
# the full path
path.sub!(/(^|#{File::SEPARATOR})RCS$/, '')
# the full path (case insensitive)
path.sub!(/(^|#{File::SEPARATOR})RCS$/i, '')
# strip off the portion of the path specified
# on the command line from the front of the path
# (or delete the path completely if it is the same
Expand Down