There are some logic issues with this bit of code that I'm sorting out:
if push: commit_db.start_commit() push_branches_back(package, temp_dir, bstore, possible_transports, local_branches) icommon.generate_debian_diffs(lp, temp_dir, package, bstore, possible_transports=possible_transports) icommon.generate_ubuntu_merges(lp, temp_dir, package, bstore, possible_transports=possible_transports)
if not keep_temp: shutil.rmtree(temp_dir) revid_db.commit()
Specifically:
1) commit_db.start_commit() is called, which inserts a record into the 'commits' table, indicating that a given branch needs to be updated.
However, commit_db.finish_commit() is never called afterword. It seems to only be called in the earlier code that noticed there was data that needed to be "push_back"ed.
I'm thinking we want to add a commit_db.finish_commit() after the revid_db.commit() state.
2) Focusing on this part:
if not keep_temp: shutil.rmtree(temp_dir) revid_db.commit()
This says to delete the temporary tree, before you finish copying the data in the 'revids_working' table over to the 'revids' table. That, coupled with no .finish_commit(), means that you can end up thinking that there is stuff that needs to be pushed back up to launchpad and finalized, but you've already deleted all your local work.
There are some logic issues with this bit of code that I'm sorting out:
if push:
commit_ db.start_ commit( )
push_ branches_ back(package, temp_dir, bstore, possible_ transports, local_branches)
icommon. generate_ debian_ diffs(lp, temp_dir, package, bstore,
possible_ transports= possible_ transports)
icommon. generate_ ubuntu_ merges( lp, temp_dir, package, bstore,
possible_ transports= possible_ transports)
shutil. rmtree( temp_dir)
revid_ db.commit( )
if not keep_temp:
Specifically:
1) commit_ db.start_ commit( ) is called, which inserts a record into the 'commits' table, indicating that a given branch needs to be updated.
However, commit_ db.finish_ commit( ) is never called afterword. It seems to only be called in the earlier code that noticed there was data that needed to be "push_back"ed.
I'm thinking we want to add a commit_ db.finish_ commit( ) after the revid_db.commit() state.
2) Focusing on this part:
if not keep_temp:
shutil. rmtree( temp_dir)
revid_ db.commit( )
This says to delete the temporary tree, before you finish copying the data in the 'revids_working' table over to the 'revids' table. That, coupled with no .finish_commit(), means that you can end up thinking that there is stuff that needs to be pushed back up to launchpad and finalized, but you've already deleted all your local work.