Skip to content
Snippets Groups Projects
  1. Oct 09, 2023
  2. Sep 26, 2022
    • Joey Hess's avatar
      handle upgrading repositories initialized with --version=9 · e05dd705
      Joey Hess authored
      As was attempted earlier in the buggy commit 0d2e3058
      
      Avoided the bug that had by making the upgrade log be updated after each
      upgrade step. So, after upgrade from v8 to v9, the log is updated, and
      so Upgrade.V9's timeOfUpgrade check will find that it was upgraded
      recently and so won't let it skip ahead to v10.
      
      Sponsored-by: k0ld on Patreon
      e05dd705
  3. Jul 25, 2022
    • Joey Hess's avatar
      v8 repositories automatically upgrade to v9 · 63cef2ae
      Joey Hess authored
      (And v9 later on to v10.)
      
      When v9/v10 were added, making v8 automatically upgrade was deferred
      "for a few months" to prevent interoperability problems if users also
      have an old version of git-annex. Of course that could still be the
      case, but there has been a good amount of time and this can't be put off
      forever.
      
      Allow setting annex.autoupgraderepository to false to avoid this upgrade.
      Previously, that only prevented upgrades from no longer supported git-annex
      versions, but v8 is still supported, and users may want to keep on v8 to
      interoperate with an old git-annex version.
      
      Sponsored-by: Boyd Stephen Smith Jr. on Patreon
      63cef2ae
    • Joey Hess's avatar
      avoid writing new line to upgrade.log when upgrade is deferred · df3020fb
      Joey Hess authored
      With automatic upgrades to v10 enabled, this could have led to each
      run of git-annex adding a line to upgrade.log for v9. However,
      they're not yet, so it only happened when running git-annex upgrade
      in a v9 repository.
      
      Sponsored-by: Brock Spratlen on Patreon
      df3020fb
  4. Jan 19, 2022
    • Joey Hess's avatar
      add upgrade.log · 9d5db6a0
      Joey Hess authored
      The upgrade from V9 uses this to avoid an automatic upgrade until 1 year
      after the V9 update. It can also be used in future such situations.
      
      Sponsored-by: Dartmouth College's Datalad project
      9d5db6a0
    • Joey Hess's avatar
      split upgrade into v9 and v10 · 856ce5cf
      Joey Hess authored
      v10 will run 1 year after the upgrade to v9, to give time for any v8
      processes to die. Until that point, the v10 upgrade will be tried by
      every process but deferred, so added support for deferring upgrades.
      
      The upgrade prevention lock file that will be used by v10 is not yet
      implemented, so it does not yet defer.
      
      Sponsored-by: Dartmouth College's Datalad project
      856ce5cf
    • Joey Hess's avatar
      fix spelling of upgradeable · 4f7b8ce0
      Joey Hess authored
      4f7b8ce0
  5. Jan 11, 2022
    • Joey Hess's avatar
      add v9 annex.version, not yet the default · ff570ad3
      Joey Hess authored
      This is the start of v9, but it's currently identical to v8, and v8 is
      not upgraded to it. git-annex upgrade will upgrade to v9 with this
      change.
      
      Sponsored-by: Dartmouth College's Datalad project
      ff570ad3
  6. Dec 15, 2020
    • Joey Hess's avatar
      propagate git-annex -c on to transferrer child process · 74c1e066
      Joey Hess authored
      git -c was already propagated via environment, but need this for
      consistency.
      
      Also, notice it does not use gitAnnexChildProcess to run the
      transferrer. So nothing is done about avoid it taking the
      pid lock. It's possible that the caller is already doing something that
      took the pid lock, and if so, the transferrer will certianly fail,
      since it needs to take the pid lock too. This may prevent combining
      annex.stalldetection with annex.pidlock, but I have not verified it's
      really a problem. If it was, it seems git-annex would have to take
      the pid lock when starting a transferrer, and hold it until shutdown,
      or would need to take pid lock when starting to use a transferrer,
      and hold it until done with a transfer and then drop it. The latter
      would require starting the transferrer with pid locking disabled for the
      child process, so assumes that the transferrer does not do anyting that
      needs locking when not running a transfer.
      74c1e066
    • Joey Hess's avatar
      00526a67
  7. Oct 30, 2020
  8. Aug 25, 2020
    • Joey Hess's avatar
      add gitAnnexChildProcess and use instead of incorrect use of runsGitAnnexChildProcess · 7bdb0cdc
      Joey Hess authored
      Fixes reversion in 8.20200617 that made annex.pidlock being enabled result
      in some commands stalling, particularly those needing to autoinit.
      
      Renamed runsGitAnnexChildProcess to make clearer where it should be
      used.
      
      Arguably, it would be better to have a way to make any process git-annex
      runs have the env var set. But then it would need to take the pid lock
      when running any and all processes, and that would be a problem when
      git-annex runs two processes concurrently. So, I'm left doing it ad-hoc
      in places where git-annex really does run a child process, directly
      or indirectly via a particular git command.
      7bdb0cdc
  9. Jun 17, 2020
    • Joey Hess's avatar
      add runsGitAnnexChildProcess calls · 96f6aa39
      Joey Hess authored
      This is all the calls to git-annex that seem capable of possibly locking
      the same pidlock as their parent. Except possibly for some in the
      assistant.
      96f6aa39
  10. Mar 30, 2020
    • Joey Hess's avatar
      use programPath consistently, not readProgramFile · 87d5583a
      Joey Hess authored
      Improve git-annex's ability to find the path to its program, especially
      when it needs to run itself in another repo to upgrade it.
      
      Some parts of the code used readProgramFile, probably because I forgot that
      programPath exists.
      
      I noticed this when a git-annex auto-upgrade failed because it was running
      git-annex upgrade --autoonly, but the code to run git-annex used
      readProgramFile, which happened to point to an older build of git-annex.
      87d5583a
  11. Mar 09, 2020
    • Joey Hess's avatar
      fix problems with upgrade of local remotes · afe72d04
      Joey Hess authored
      Upgrade other repos than the current one by running git-annex upgrade
      inside them, which avoids problems with upgrade code making assumptions
      that the cwd will be inside the repo being upgraded.
      
      In particular, this fixes a problem where upgrading a v7 repo to v8 caused
      an ugly git error message.
      
      I actually could not find a way to make Upgrade.V7 work properly
      without changing directory to the remote. Once I got git ls-files to work,
      the git cat-file failed because :path can only be used in the current git
      repo.
      afe72d04
  12. Dec 09, 2019
    • Joey Hess's avatar
      convert TopFilePath to use RawFilePath · bdec7fed
      Joey Hess authored
      Adds a dependency on filepath-bytestring, an as yet unreleased fork of
      filepath that operates on RawFilePath.
      
      Git.Repo also changed to use RawFilePath for the path to the repo.
      
      This does eliminate some RawFilePath -> FilePath -> RawFilePath
      conversions. And filepath-bytestring's </> is probably faster.
      But I don't expect a major performance improvement from this.
      This is mostly groundwork for making Annex.Location use RawFilePath,
      which will allow for a conversion-free pipleline.
      bdec7fed
  13. Dec 02, 2019
    • Joey Hess's avatar
      include upgrade code back in · 1100e0d3
      Joey Hess authored
      Remaining things that need to be fixed up to get this branch into a
      basically mergeable state: remotes, commands, and the assistant
      1100e0d3
  14. Nov 26, 2019
    • Joey Hess's avatar
      wip RawFilePath 2x git-annex find speedup · 067aabdd
      Joey Hess authored
      Finally builds (oh the agoncy of making it build), but still very
      unmergable, only Command.Find is included and lots of stuff is badly
      hacked to make it compile.
      
      Benchmarking vs master, this git-annex find is significantly faster!
      Specifically:
      
      	num files	old	new	speedup
      	48500		4.77	3.73	28%
      	12500		1.36	1.02	66%
      	20		0.075	0.074	0% (so startup time is unchanged)
      
      That's without really finishing the optimization. Things still to do:
      
      * Eliminate all the fromRawFilePath, toRawFilePath, encodeBS,
        decodeBS conversions.
      * Use versions of IO actions like getFileStatus that take a RawFilePath.
      * Eliminate some Data.ByteString.Lazy.toStrict, which is a slow copy.
      * Use ByteString for parsing git config to speed up startup.
      
      It's likely several of those will speed up git-annex find further.
      And other commands will certianly benefit even more.
      067aabdd
  15. Nov 06, 2019
    • Joey Hess's avatar
      v8 upgrade of keys db · dc929501
      Joey Hess authored
      Renamed the database to .git/annex/keysdb;
      the old .git/annex/keys gets deleted during the upgrade.
      
      It is possible that an old git-annex process is running during the
      upgrade. If so, it will be able to continue using the old keys db until the
      upgrade is complete, and then will presumably fail in some ugly way. Or
      perhaps the upgrade will be unable to delete the open files on some
      systems, and so fail with an ugly error message.
      
      It's also possible for multiple processes to be running the upgrade
      concurrently. That should be fine; they will both write the same
      information into the keys db.
      
      Other databases still need to be upgraded.
      dc929501
  16. Sep 01, 2019
    • Joey Hess's avatar
      fix build · 47a2a9b6
      Joey Hess authored
      47a2a9b6
    • Joey Hess's avatar
      Added annex.autoupgraderepository configuration · f8451953
      Joey Hess authored
      Can be set to false to prevent any automatic repository upgrades.
      
      Also, removed direct mode specific upgrade code in Annex.Init, and made
      needsUpgrade always include the name/path of the repo, so if
      there's a problem it's clear what repo has the problem.
      
      And, made needsUpgrade catch any exceptions that might occur during the
      upgrade, so it can display a more useful error message than just the
      exception.
      f8451953
  17. Mar 13, 2019
    • Joey Hess's avatar
      update licenses from GPL to AGPL · 40ecf58d
      Joey Hess authored
      This does not change the overall license of the git-annex program, which
      was already AGPL due to a number of sources files being AGPL already.
      
      Legally speaking, I'm adding a new license under which these files are
      now available; I already released their current contents under the GPL
      license. Now they're dual licensed GPL and AGPL. However, I intend
      for all my future changes to these files to only be released under the
      AGPL license, and I won't be tracking the dual licensing status, so I'm
      simply changing the license statement to say it's AGPL.
      
      (In some cases, others wrote parts of the code of a file and released it
      under the GPL; but in all cases I have contributed a significant portion
      of the code in each file and it's that code that is getting the AGPL
      license; the GPL license of other contributors allows combining with
      AGPL code.)
      40ecf58d
  18. Oct 26, 2018
  19. Oct 25, 2018
    • Joey Hess's avatar
      fix autoupgrade from v6 to go to v7, not v5 · b996b38b
      Joey Hess authored
      v3 and v4 still autoupgrade to v5
      
      And a few more upgrade doc updates.
      b996b38b
    • Joey Hess's avatar
      v7 · 234842a3
      Joey Hess authored
      Install new git hooks in this version.
      
      This does beg the question of what to do if git later gets eg a
      post-smudge hook, that could run git-annex smudge --update. I think the
      thing to do in that case would be to make git-annex smudge --update
      install the new hooks. That way, as the user uses git-annex, the hook
      would be created pretty quickly and without needing any extra syscalls
      except for when git-annex smudge --update is called.
      
      I considered doing something like that for installation of the
      post-checkout and post-merge hooks, which would have avoided the need
      for v7. But the only place it was cheap to do it would be in git-annex smudge
      which could cheaply notice that smudge.log didn't exist yet and so know
      the hooks needed to be installed. But since smudge used to populate pointer
      files, it would be quite surprising if a single git checkout/merge failed
      to update the work tree, and so that idea didn't work out.
      
      The other reason for v7 is psychological -- users don't need to worry
      about whether they might be running an old version of git-annex that
      doesn't support their v7 repository very well. And bug reports about
      "v6" have gotten a bit of a bad association in my head since they often
      hit one of the known limitations and didn't realize it was experimental.
      
      newtyped RepoVersion Int to avoid needing 2 comparisons in
      versionSupportsUnlockedPointers etc. Also it's just nicer.
      
      This commit was sponsored by John Pellman on Patreon.
      234842a3
  20. Nov 16, 2016
    • Joey Hess's avatar
      Avoid backtraces on expected failures when built with ghc 8; only use... · 0a4479b8
      Joey Hess authored
      Avoid backtraces on expected failures when built with ghc 8; only use backtraces for unexpected errors.
      
      ghc 8 added backtraces on uncaught errors. This is great, but git-annex was
      using error in many places for a error message targeted at the user, in
      some known problem case. A backtrace only confuses such a message, so omit it.
      
      Notably, commands like git annex drop that failed due to eg, numcopies,
      used to use error, so had a backtrace.
      
      This commit was sponsored by Ethan Aubin.
      0a4479b8
  21. Oct 05, 2016
  22. Jan 20, 2016
  23. Dec 15, 2015
  24. Dec 04, 2015
    • Joey Hess's avatar
      add v6; keep v5 working for now and manual upgrade · ccc49861
      Joey Hess authored
      Since all places where a repo is used in direct mode need to have git-annex
      upgraded before the repo can safely be converted to v6, the upgrade needs
      to be manual for now.
      
      I suppose that at some point I'll want to drop all the direct mode support
      code. At that point, will stop supporting v5, and will need to auto-upgrade
      any remaining v5 repos. If possible, I'd like to carry the direct mode
      support for say, a year or so, to give people plenty of time to upgrade and
      avoid disruption.
      ccc49861
  25. Jan 21, 2015
  26. Jul 17, 2014
    • Joey Hess's avatar
      · e213ef31
      Joey Hess authored
      git-annex (5.20140717) unstable; urgency=high
      
        * Fix minor FD leak in journal code. Closes: #754608
        * direct: Fix handling of case where a work tree subdirectory cannot
          be written to due to permissions.
        * migrate: Avoid re-checksumming when migrating from hashE to hash backend.
        * uninit: Avoid failing final removal in some direct mode repositories
          due to file modes.
        * S3: Deal with AWS ACL configurations that do not allow creating or
          checking the location of a bucket, but only reading and writing content to
          it.
        * resolvemerge: New plumbing command that runs the automatic merge conflict
          resolver.
        * Deal with change in git 2.0 that made indirect mode merge conflict
          resolution leave behind old files.
        * sync: Fix git sync with local git remotes even when they don't have an
          annex.uuid set. (The assistant already did so.)
        * Set gcrypt-publish-participants when setting up a gcrypt repository,
          to avoid unncessary passphrase prompts.
          This is a security/usability tradeoff. To avoid exposing the gpg key
          ids who can decrypt the repository, users can unset
          gcrypt-publish-participants.
        * Install nautilus hooks even when ~/.local/share/nautilus/ does not yet
          exist, since it is not automatically created for Gnome 3 users.
        * Windows: Move .vbs files out of git\bin, to avoid that being in the
          PATH, which caused some weird breakage. (Thanks, divB)
        * Windows: Fix locking issue that prevented the webapp starting
          (since 5.20140707).
      
      # imported from the archive
      e213ef31
  27. Apr 11, 2014
    • Joey Hess's avatar
      · 2a82adc4
      Joey Hess authored
      git-annex (5.20140412) unstable; urgency=high
      
        * Last release didn't quite fix the high cpu issue in all cases, this should.
      
      # imported from the archive
      2a82adc4
  28. Apr 02, 2014
    • Joey Hess's avatar
      · b6d46c21
      Joey Hess authored
      git-annex (5.20140402) unstable; urgency=medium
      
        * unannex, uninit: Avoid committing after every file is unannexed,
          for massive speedup.
        * --notify-finish switch will cause desktop notifications after each
          file upload/download/drop completes
          (using the dbus Desktop Notifications Specification)
        * --notify-start switch will show desktop notifications when each
          file upload/download starts.
        * webapp: Automatically install Nautilus integration scripts
          to get and drop files.
        * tahoe: Pass -d parameter before subcommand; putting it after
          the subcommand no longer works with tahoe-lafs version 1.10.
          (Thanks, Alberto Berti)
        * forget --drop-dead: Avoid removing the dead remote from the trust.log,
          so that if git remotes for it still exist anywhere, git annex info
          will still know it's dead and not show it.
        * git-annex-shell: Make configlist automatically initialize
          a remote git repository, as long as a git-annex branch has
          been pushed to it, to simplify setup of remote git repositories,
          including via gitolite.
        * add --include-dotfiles: New option, perhaps useful for backups.
        * Version 5.20140227 broke creation of glacier repositories,
          not including the datacenter and vault in their configuration.
          This bug is fixed, but glacier repositories set up with the broken
          version of git-annex need to have the datacenter and vault set
          in order to be usable. This can be done using git annex enableremote
          to add the missing settings. For details, see
          http://git-annex.branchable.com/bugs/problems_with_glacier/
        * Added required content configuration.
        * assistant: Improve ssh authorized keys line generated in local pairing
          or for a remote ssh server to set environment variables in an
          alternative way that works with the non-POSIX fish shell, as well
          as POSIX shells.
      
      # imported from the archive
      b6d46c21
  29. Mar 26, 2014
    • Joey Hess's avatar
      · f4a98d2d
      Joey Hess authored
      git-annex (5.20140320~bpo70+1) wheezy-backports; urgency=medium
      
        * Updating backport to newest release.
        * Note that this backport does not feature constant time webapp auth token
          comparisons. It's not recommended to use the webapp on multiuser systems,
          since another use may be able to use a timing attack to guess its auth
          token. If you need that, it should not be hard to backport
          haskell-securemem.
      
      # imported from the archive
      f4a98d2d
  30. Feb 20, 2014
    • Joey Hess's avatar
      · 9c426c0d
      Joey Hess authored
      git-annex (5.20140210~bpo70+2) wheezy-backports; urgency=medium
      
        * Updating backport to newest release.
        * Remaining differences in this backport:
          - No webdav special remote support.
          - Test suite is not built into git-annex as it now uses haskell-tasty,
            which is not yet backported.
          - No skein hash support.
      
      # imported from the archive
      9c426c0d
  31. Dec 29, 2013
  32. Nov 27, 2013
    • Joey Hess's avatar
      · 7189dfd7
      Joey Hess authored
      git-annex (5.20131127) unstable; urgency=low
      
        * webapp: Detect when upgrades are available, and upgrade if the user
          desires.
          (Only when git-annex is installed using the prebuilt binaries
          from git-annex upstream, not from eg Debian.)
        * assistant: Detect when the git-annex binary is modified or replaced,
          and either prompt the user to restart the program, or automatically
          restart it.
        * annex.autoupgrade configures both the above upgrade behaviors.
        * Added support for quvi 0.9. Slightly suboptimal due to limitations in its
          interface compared with the old version.
        * Bug fix: annex.version did not get set on automatic upgrade to v5 direct
          mode repo, so the upgrade was performed repeatedly, slowing commands down.
        * webapp: Fix bug that broke switching between local repositories
          that use the new guarded direct mode.
        * Android: Fix stripping of the git-annex binary.
        * Android: Make terminal app show git-annex version number.
        * Android: Re-enable XMPP support.
        * reinject: Allow to be used in direct mode.
        * Futher improvements to git repo repair. Has now been tested in tens
          of thousands of intentionally damaged repos, and successfully
          repaired them all.
        * Allow use of --unused in bare repository.
      
      # imported from the archive
      7189dfd7
  33. Nov 26, 2013
  34. Nov 17, 2013