sapling/hgext/largefiles
FUJIWARA Katsunori c24b717f3e largefiles: use "normallookup", if "mtime" of standin is unset
Before this patch, largefiles gotten from "other" revision (without
conflict) at "hg merge" become "clean" unexpectedly in steps below:

    1. "merge.update()" is invoked
      1-1 standinfile SF is updated in the working directory
      1-2 "dirstate" entry for SF is "normallookup"-ed

    2. "lfcommands.updatelfiles()" is invoked (by "overrides.hgmerge()")
      2-1 largefile LF (for SF) is updated in the working directory
      2-2 "dirstate" returns "n" for SF (by 1-2)
      2-3 "lfdirstate" entry for LF is "normal"-ed
      2-4 "lfdirstate" is written into ".hg/largefiles/dirstate", and
          timestamp of LF is stored into "lfdirstate" file
          (ASSUMPTION: timestamp of LF differs from one of "lfdirstate" file)

Then, "hs status" treats LF as "clean", even though LF is updated by
"other" revision (by 2-1), because "lfilesrepo.status()" always treats
"normal"-ed files (by 2-3 and 2-4) as "clean".

When timestamp is not set (= negative value) for standinfile in
"dirstate", largefile should be "normallookup"-ed regardless of
rebasing or not, because "n" state in "dirstate" doesn't ensure
"clean"-ness of a standinfile at that time.

This patch uses "normallookup" instead of "normal", if "mtime" of
standin is unset

This is a temporary way to fix with less changes. For fundamental
resolution of this kind of problems in the future, "lfdirstate" should
be updated with "dirstate" simultaneously while "merge.update"
execution: maybe by hooking "recordupdates"

It is also why this patch (temporarily) uses internal field "_map" of
"dirstate" directly.

This patch uses "[debug] dirstate.delaywrite" feature in the test, to
ensure that timestamp of the largefile gotten from "other" revision is
stored into ".hg/largefiles/dirstate". (for ASSUMPTION at 2-4)

This patch newly adds "test-largefiles-update.t", to avoid increasing
cost to run other tests for largefiles by subsequent patches
(especially, "[debug] dirstate.delaywrite" causes so).
2014-07-22 23:59:34 +09:00
..
__init__.py largefiles: define norepo in command decorator 2014-05-04 21:11:15 -07:00
basestore.py largefiles: hide passwords in URLs in ui messages 2013-10-17 16:13:15 +08:00
CONTRIBUTORS hgext: add largefiles extension 2011-09-24 17:35:45 +02:00
lfcommands.py largefiles: use "normallookup", if "mtime" of standin is unset 2014-07-22 23:59:34 +09:00
lfutil.py largefiles: avoid unnecessary creation of .hg/largefiles when opening lfdirstate 2014-07-17 20:17:17 -04:00
localstore.py largefiles: don't close the fd passed to store._getfile 2013-04-15 23:47:04 +02:00
overrides.py largefiles: confirm existence of outgoing largefile entities in remote store 2014-07-07 18:45:46 +09:00
proto.py largefiles: import whole modules instead of importing parts of them 2014-04-08 00:48:36 +02:00
remotestore.py largefiles: import whole modules instead of importing parts of them 2014-04-08 00:48:36 +02:00
reposetup.py largefiles: reuse "findcommonoutgoing()" result at "hg push" 2014-04-16 00:37:24 +09:00
uisetup.py largefiles: import whole modules instead of importing parts of them 2014-04-08 00:48:36 +02:00
wirestore.py largefiles: stat all largefiles in one batch before downloading 2013-04-15 23:37:43 +02:00