reproduce-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Reproduce-devel] [task #15363] Better solution to restoring file dates


From: Mohammad Akhlaghi
Subject: [Reproduce-devel] [task #15363] Better solution to restoring file dates after Git checkout
Date: Sat, 10 Aug 2019 15:19:03 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

URL:
  <https://savannah.nongnu.org/task/?15363>

                 Summary: Better solution to restoring file dates after Git
checkout
                 Project: Reproducible paper template
            Submitted by: makhlaghi
            Submitted on: Sat 10 Aug 2019 08:19:01 PM BST
         Should Start On: Sat 10 Aug 2019 12:00:00 AM BST
   Should be Finished on: Sat 10 Aug 2019 12:00:00 AM BST
                Category: Analysis
                Priority: 6
                  Status: Postponed
                 Privacy: Public
        Percent Complete: 0%
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
                  Effort: 0.00

    _______________________________________________________

Details:

One major problem with Git is that it doesn't keep the file meta data after a
checkout (in particular the date). Git just copies a new file during checkout,
so all files that have changed between branches get the current time stamp.

In most scenarios this is no problem, but for our template its a major problem
because Make looks at timestamps, and we want our analysis outputs to depend
on configuration files (in `reproduce/analysis/config/XXXXXX.mk'), so for
example when I change the configuration settings for one step, I want Make to
find out and re-do the analysis of that step is done.

The problem comes up when you checkout to the `template' branch to update your
infra-structure, and then check back into your project's `master' branch, all
your project-specific configuration files will be newer than your existing
project outputs and Make will try to re-do the whole thing again!!!!

As a solution to this problem, we are currently using Metastore
<https://github.com/przemoc/metastore> (actually my fork
<https://github.com/mohammad-akhlaghi/metastore> of it, because it is
apparently not maintained for a long time). Metastore keeps this extra file
info in a binary file (which we call `.file-metadata', and has `pre-commit'
and `post-checkout' hooks to apply it for fixing the files. 

But the fact that the file is binary is very bad, also since it keeps all file
information, occasionally, it has problems, with directories and prints many
warnings after a checkout, and sometimes it doesn't work on some files(!). 

I think we can implement a more simple/elegant solution to this problem for
this template.

Here is one suggestion: using Git `pre-commit' and `post-checkout' hooks
(inspired from Metastore), but to only parse the contents of the
`reproduce/analysis/config/*.mk' files and keep their dates (before committing
them) as a specially formatted comment (line) in the same file. Then after a
checkout we can look at all the checked-out files, read that special line and
set its date based on that line.




    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/task/?15363>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]