Skip to content

Commit

Permalink
git rename: renaming lock file (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
tdegeus committed Nov 29, 2023
1 parent 1ea65aa commit c6fef3b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions shelephant/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1250,6 +1250,10 @@ def rename(args: list[str]):
yaml.overwrite(sdir / "storage.yaml", storage)
os.rename(sdir / "storage" / f"{args.old}.yaml", sdir / "storage" / f"{args.new}.yaml")
os.rename(sdir / "data" / args.old, sdir / "data" / args.new)
if (sdir / "lock.txt").exists():
myname = (sdir / "lock.txt").read_text().strip()
if myname == args.old:
(sdir / "lock.txt").write_text(args.new)
update([])


Expand Down

0 comments on commit c6fef3b

Please sign in to comment.