[PATCH] Add removed files in the changelog data

Benoit Boissinot benoit.boissinot at ens-lyon.org
Sat Jan 28 18:01:09 UTC 2006


# HG changeset patch
# User Benoit Boissinot <benoit.boissinot at ens-lyon.org>
# Node ID 08204c9af591d688a5253bf62a0211d25d986ccd
# Parent  e7e6504c4989a19e957b92338e2357270f5dae1d
add removed files to the changelog file list

- this should allow better detection of removed file
  when walking in the history (like hg log)
  it doesn't help for the fast path of hg log where
  we only look at the filelog
- users of the changelog file list shouldn't assume
  anymore that the file still exist (anyway it won't
  be found in the manifest like in 5ecf05541e11)

- fix the tests (some hashes changed)

diff -r e7e6504c4989 -r 08204c9af591 mercurial/localrepo.py
--- a/mercurial/localrepo.py	Sat Jan 28 17:16:15 2006 +1300
+++ b/mercurial/localrepo.py	Sat Jan 28 18:58:49 2006 +0100
@@ -451,7 +451,7 @@ class localrepository(object):
             text = edittext
 
         user = user or self.ui.username()
-        n = self.changelog.add(mn, changed, text, tr, p1, p2, user, date)
+        n = self.changelog.add(mn, changed + remove, text, tr, p1, p2, user, date)
         tr.close()
 
         self.dirstate.setparents(n)
diff -r e7e6504c4989 -r 08204c9af591 tests/test-cat.out
--- a/tests/test-cat.out	Sat Jan 28 17:16:15 2006 +1300
+++ b/tests/test-cat.out	Sat Jan 28 18:58:49 2006 +0100
@@ -3,5 +3,5 @@ 0
 0
 0
 0
-a: No such file in rev 551e7cb14b32
+a: No such file in rev 7040230c159c
 1
diff -r e7e6504c4989 -r 08204c9af591 tests/test-remove.out
--- a/tests/test-remove.out	Sat Jan 28 17:16:15 2006 +1300
+++ b/tests/test-remove.out	Sat Jan 28 18:58:49 2006 +0100
@@ -11,11 +11,11 @@ diff -r 000000000000 -r b51ca55c2035 foo
 +a
 # HG changeset patch
 # User test
-# Node ID 1e555b9b85c52e1e9e8175446f1ede507b2d1ebb
+# Node ID 451c12a24e5a7336921b8d93e280837d7c2b4fc1
 # Parent  b51ca55c20354097ca299529d18b5cd356976ba2
 2
 
-diff -r b51ca55c2035 -r 1e555b9b85c5 foo
+diff -r b51ca55c2035 -r 451c12a24e5a foo
 --- a/foo	Thu Jan  1 00:00:00 1970 +0000
 +++ /dev/null	Thu Jan  1 00:00:00 1970 +0000
 @@ -1,1 +0,0 @@
@@ -32,13 +32,13 @@ diff -r 000000000000 -r b51ca55c2035 foo
 +a
 
 
-changeset:   1:1e555b9b85c5
+changeset:   1:451c12a24e5a
 tag:         tip
 user:        test
 date:        Thu Jan  1 00:00:00 1970 +0000
 summary:     2
 
-diff -r b51ca55c2035 -r 1e555b9b85c5 foo
+diff -r b51ca55c2035 -r 451c12a24e5a foo
 --- a/foo	Thu Jan  1 00:00:00 1970 +0000
 +++ /dev/null	Thu Jan  1 00:00:00 1970 +0000
 @@ -1,1 +0,0 @@



More information about the Mercurial mailing list