Browse Source

trying new merge

julien colomb 2 years ago
parent
commit
86ce83dd89
3 changed files with 12 additions and 3 deletions
  1. 3 2
      .scripts/datalad_sync.py
  2. 1 1
      Sync_unix
  3. 8 0
      sync.bat

+ 3 - 2
.scripts/datalad_sync.py

@@ -8,13 +8,14 @@ import datalad.api as dl
 loc = os.path.dirname(os.path.abspath(__file__))
 print(loc)
 os.chdir(loc)
+os.chdir('../')
 #projectdir = dl.Repo(loc, create=False).get_toppath()
 
 # initialise
 if not os.path.isfile("06_dissemination/README_DISSEMINATION.md"):
     print("running project repository initiation (first run)")
     dl.get(".", recursive=True, get_data=False)
-    dl.update(merge=True, recursive=True)
+    dl.update(how='merge', recursive=True)
 
 # Set commit message
 commitmessage = input("Optionally enter a commit message, and hit return: ")
@@ -23,7 +24,7 @@ if not commitmessage:
     commitmessage = "commit on" + {datetime.now().strftime('%Y-%m-%d')}
 
 # sync
-dl.update(merge=True, recursive=True)
+dl.update(how='merge', recursive=True)
 dl.save(".", message=commitmessage, recursive=True)
 dl.push(".", to="origin", recursive=True)
 

+ 1 - 1
pythontest → Sync_unix

@@ -4,4 +4,4 @@ projectdir=$(git -C ${loc} rev-parse --show-toplevel)
 
 pushd ${loc} > /dev/null
 
-python3 datalad_sync.py
+python3 .scripts/datalad_sync.py

+ 8 - 0
sync.bat

@@ -0,0 +1,8 @@
+:: this script should run the sync bash script on windows, once cygwin has been installed
+
+set curdir=%~dp0
+
+python .scripts/datalad_sync.py
+
+
+pause