Permalink
Switch branches/tags
Nothing to show
Commits on Jan 19, 2016
  1. Merge pull request #8 from rlaboiss/do-not-skip-dangling-symlinks

    Do not skip dangling symbolic links
    committed Jan 19, 2016
  2. Do not skip dangling symbolic links

    It may happen that a symbolic link under Git control points to
    nowhere.  In this case, the information about the symbolic link
    must still be stored in the database.  Since os.path.isfile follows
    symlinks, the test for the existence of symlink entries failed and
    those entries were skipped in function git_get_files_attributes.
    This commit fixes this problem.
    rlaboiss committed Jan 19, 2016
Commits on Jan 7, 2016
  1. Merge pull request #7 from rlaboiss/no-dereference-python2

    Do not follow symlinks in getting/setting file attributes
    committed Jan 7, 2016
Commits on Jan 6, 2016
  1. Only check fot -h option of the touch command if the OS is Linux

    In OSX (darwin), always use the -h option.  If it is not Linux neither
    OSX, then the use of the touch command is disabled.
    rlaboiss committed Jan 6, 2016
Commits on Jan 4, 2016
  1. Do not follow symlinks in getting/setting file attributes

    This is achieved in a quite convoluted way, but which works in Python2.
    Note that an equivalent in Python3 would be much simpler, because all
    the involved os.* functions accept the argument 'follow_symlink=False'.
    
    Here is the description of the changes in this commit:
    
    1) Call os.lstat() for getting the file attributes.
    
    2) Use os.lchown() for changing the gid and uid of the file.
    
    3) If the file is a symbolic link, then does not call os.chmod() on it,
    since it is not possible to change permissions of symbolic links (at
    least in Linux).
    
    4) Since there is no "os.lutime()" in the Python os module, the setting
    of mtime is done done by calling of the touch system utility, with the
    appropriate option "-t".  This function is widely available, so there
    should be no problem in introducing this call.  However, in order to not
    follow symlinks when touching, option "-h" must be used.  This option
    appeared in version 8.1 of GNU coreutils.  In order to avoid errors, the
    version of touch in the system is tested and he symbolic link's mtime is
    adjusted only if GNU coureutils' touch is used AND if its version is >=
    8.1. (Note that, for this to work, the distutils.version module is
    imported).  Furthermore, the format of the date accepted by option -t of
    the touch command is "YYYYmmddHHMM.SS".  Functions time.strftime() and
    time.gmtime() are used for converting from the format returned by
    os.lstat().  Note that the mtime is converted to GMT.
    rlaboiss committed Jan 4, 2016
  2. Merge pull request #6 from rlaboiss/sort-metadata

    Sort entries in the JSON metadata file
    committed Jan 4, 2016
  3. Merge pull request #4 from rlaboiss/fix-spelling-of-function-names

    Fix spelling of function names
    committed Jan 4, 2016
  4. Merge pull request #3 from rlaboiss/fix-logic-perms-mtime

    Fix logic for setting perms and mtime in git_set_file_attributs
    committed Jan 4, 2016
  5. Update man page according change made in #2.

    Signed-off-by: Sébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>
    Sébastien Gross committed Jan 4, 2016
  6. Merge pull request #2 from rlaboiss/allow-skip-mtime-in-store

    Allow skipping of mtime in database store
    committed Jan 4, 2016
Commits on Jan 3, 2016
  1. Sort entries in the JSON metadata file

    Add the argument 'sort_keys=True' to the json.dump call, such that the
    entries are sorted in the metadata file.  This seems to be necessary in
    order to avoid gratuitous ordering changes in the metadata file, which
    happen in successive calls "git meta get".
    
    Also, this commits removes a useless statement "files.sort()".
    rlaboiss committed Jan 3, 2016
Commits on Jan 2, 2016
  1. Allow skipping of mtime in database store

    The user may wish to completely disable mtime setting during the restore
    of the database.  For doing that, she can use "git-meta set -M".
    However, since the mtime key is always stored in the database, the
    .gitmeta file may indicate, in some cases (for instance, when moving
    files around without modifying them), modification times that are not
    relevant.  This is annoying, because irrelevant changes keep getting
    tracked uselessly by Git.
    
    This commit avoids this, by preventing the mtime key to be stored when
    option -M is used with "git-meta get".  The documentation string has
    also been changed accordingly.
    
    Note that it would also be interesting to have the same behavior for the
    -U and -G options, but, in the current state of the code if neither -o
    or -O options are given, the get_file_stats does not store uid and gid
    information in the database, which amounts to skipping owner information
    storage in "git-meta get".
    rlaboiss committed Jan 2, 2016
  2. Fix logic for setting perms and mtime in git_set_file_attributs

    The modification file of a file must be set only if the argument
    skip_perms (viz skipt_mtime) is false AND the the data dictionary for
    that file has the 'mode' (viz. 'mtime') key.
    rlaboiss committed Jan 2, 2016
  3. Fix spelling of function names

    Since the code uses the English language for its identifiers and
    comments, it is better to get the correct spelling of the word
    "attributes" in the names of the functions.
    rlaboiss committed Jan 2, 2016
Commits on Jan 2, 2015
  1. Fix typo (closes #1)

    Sébastien Gross committed Jan 2, 2015
Commits on Jul 22, 2014
  1. Add post-commit hook

    Sébastien Gross committed Jul 22, 2014
  2. Store mtime in seconds instead of microseconds

    Sébastien Gross committed Jul 22, 2014
Commits on Apr 24, 2014
  1. Add ignore option to ignore branch when getting file metadata

    Sébastien Gross committed Apr 24, 2014
Commits on Mar 4, 2014
  1. Add post-checkout hook.

    Sébastien Gross committed Mar 4, 2014
  2. Fix hooks perms.

    Sébastien Gross committed Mar 4, 2014
Commits on Mar 3, 2014
  1. Fix hooks perms

    Sébastien Gross committed Mar 3, 2014
  2. Fix uid/gid checks.

    Sébastien Gross committed Mar 3, 2014
  3. Change hooks perms

    Sébastien Gross committed Mar 3, 2014
  4. Add -a option

    Sébastien Gross committed Mar 3, 2014
  5. Remove python extension.

    Sébastien Gross committed Mar 3, 2014
  6. Revert "Rename python script."

    This reverts commit b9b6b98.
    Sébastien Gross committed Mar 3, 2014
  7. Rename python script.

    Sébastien Gross committed Mar 3, 2014
  8. Remove old sh script

    Sébastien Gross committed Mar 3, 2014
  9. Update gitmeta file name.

    Sébastien Gross committed Mar 3, 2014
  10. Update man page

    Sébastien Gross committed Mar 3, 2014
  11. Add init command

    Sébastien Gross committed Mar 3, 2014
  12. Fix typos.

    Sébastien Gross committed Mar 3, 2014
Commits on Feb 28, 2014
  1. Use hash instead of array.

    Sébastien Gross committed Feb 28, 2014
  2. First implementation in Python.

    Sébastien Gross committed Feb 28, 2014
Commits on Sep 11, 2011
  1. Update man page.

    Signed-off-by: Sébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>
    Sébastien Gross committed Sep 11, 2011