mirror of
https://github.com/facebook/sapling.git
synced 2024-10-16 19:57:18 +03:00
e1e3cc79e7
Summary: This is a resend of https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-May/097693.html, with Yuya's comments addressed and some additional comments. The original commit message is: > The high-level idea is similar to metadataonlyctx. > If filelog parents and metadata match, then raw revision data (rawtext, > rawflags, hash) could be reused. This saves time calculating hash or going > through flag processors. Note in the original patch, the amend operation is not using the fast path. But it uses the fast path today. That's because singhsrb's D636 change (cmdutil: remove the redundant commit during amend): ``` # If the file being considered is not amongst the files # to be amended, we should return the file context from the # old changeset. This avoids issues when only some files in # the working copy are being amended but there are also # changes to other files from the old changeset. if path not in filestoamend: return old.filectx(path) ``` Reviewed By: DurhamG Differential Revision: D8986780 fbshipit-source-id: 7d18957a713f90eafb786446972020f7939c3671
80 lines
4.2 KiB
Plaintext
80 lines
4.2 KiB
Plaintext
workingfilectx.date = (1000, 0)
|
|
ASCII : Gr?ezi!
|
|
Latin-1 : Grüezi!
|
|
UTF-8 : Grüezi!
|
|
<status modified=['foo'], added=[], removed=[], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
diff --git a/foo b/foo
|
|
--- a/foo
|
|
+++ b/foo
|
|
@@ -1,1 +1,2 @@
|
|
foo
|
|
+bar
|
|
= checking context.status():
|
|
== checking workingctx.status:
|
|
wctx._status=<status modified=['bar-m'], added=['bar-a'], removed=['bar-r'], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
=== with "pattern match":
|
|
<status modified=['bar-m'], added=[], removed=[], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
wctx._status=<status modified=['bar-m'], added=['bar-a'], removed=['bar-r'], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
<status modified=[], added=['bar-m'], removed=[], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
wctx._status=<status modified=['bar-m'], added=['bar-a'], removed=['bar-r'], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
=== with "always match" and "listclean=True":
|
|
<status modified=['bar-m'], added=['bar-a'], removed=['bar-r'], deleted=[], unknown=[], ignored=[], clean=['foo']>
|
|
wctx._status=<status modified=['bar-m'], added=['bar-a'], removed=['bar-r'], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
<status modified=[], added=['bar-a', 'bar-m'], removed=[], deleted=[], unknown=[], ignored=[], clean=['foo']>
|
|
wctx._status=<status modified=['bar-m'], added=['bar-a'], removed=['bar-r'], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
== checking workingcommitctx.status:
|
|
wcctx._status=<status modified=['bar-m'], added=['bar-a'], removed=[], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
=== with "always match":
|
|
<status modified=['bar-m'], added=['bar-a'], removed=[], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
wcctx._status=<status modified=['bar-m'], added=['bar-a'], removed=[], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
<status modified=[], added=['bar-a', 'bar-m', 'bar-r'], removed=[], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
wcctx._status=<status modified=['bar-m'], added=['bar-a'], removed=[], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
=== with "always match" and "listclean=True":
|
|
<status modified=['bar-m'], added=['bar-a'], removed=[], deleted=[], unknown=[], ignored=[], clean=['bar-r', 'foo']>
|
|
wcctx._status=<status modified=['bar-m'], added=['bar-a'], removed=[], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
<status modified=[], added=['bar-a', 'bar-m', 'bar-r'], removed=[], deleted=[], unknown=[], ignored=[], clean=['foo']>
|
|
wcctx._status=<status modified=['bar-m'], added=['bar-a'], removed=[], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
=== with "pattern match":
|
|
<status modified=['bar-m'], added=[], removed=[], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
wcctx._status=<status modified=['bar-m'], added=['bar-a'], removed=[], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
<status modified=[], added=['bar-m'], removed=[], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
wcctx._status=<status modified=['bar-m'], added=['bar-a'], removed=[], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
=== with "pattern match" and "listclean=True":
|
|
<status modified=[], added=[], removed=[], deleted=[], unknown=[], ignored=[], clean=['bar-r', 'foo']>
|
|
wcctx._status=<status modified=['bar-m'], added=['bar-a'], removed=[], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
<status modified=[], added=['bar-r'], removed=[], deleted=[], unknown=[], ignored=[], clean=['foo']>
|
|
wcctx._status=<status modified=['bar-m'], added=['bar-a'], removed=[], deleted=[], unknown=[], ignored=[], clean=[]>
|
|
== commit with manifestlog invalidated
|
|
commit 1: 2efe531a913fa648867ab8824360371679d05a65
|
|
commit 2: 2caca91f6362020334384ebe27bae67315298abf
|
|
commit 3: abd6b0f49f338be22b094ef2b7425e8048f8337b
|
|
=== filelog rawdata reuse ===
|
|
copying rev 0 from test1 to test3
|
|
committing files:
|
|
1
|
|
reusing 1 filelog rawdata
|
|
committing manifest
|
|
committing changelog
|
|
updating the branch cache
|
|
copying rev 1 from test1 to test3
|
|
committing files:
|
|
2
|
|
reusing 2 filelog rawdata
|
|
committing manifest
|
|
committing changelog
|
|
updating the branch cache
|
|
copying rev 2 from test1 to test3
|
|
committing files:
|
|
3
|
|
reusing 3 filelog rawdata
|
|
committing manifest
|
|
committing changelog
|
|
updating the branch cache
|
|
copying rev 3 from test1 to test3
|
|
committing files:
|
|
4
|
|
reusing 4 filelog rawdata
|
|
committing manifest
|
|
committing changelog
|
|
updating the branch cache
|