[issue3278] Commandserver: Changes to .hgignore not detected

Jan Sorensen bugs at mercurial.selenic.com
Mon Feb 20 19:38:44 UTC 2012


New submission from Jan Sorensen <sorensenjan at gmail.com>:

The command server does not always detect changes made to .hgignore file. So 
files that should be ignored could for example in status show up as unknown. 

This bug is reproduced with a local build based on current tip of stable: 
changeset:   16130:0e0060bf2f44
branch:      stable
user:        Patrick Mezard <patrick at mezard.eu>
date:        Mon Feb 13 17:22:35 2012 +0100
summary:     patch: fuzz more aggressively to match patch(1) behaviour

This includes recently fixes to some commandserver related bugs (issue 
3261, 3263, and 3271).

The following patch demonstrate the bug:

diff -r 0e0060bf2f44 tests/test-commandserver.py
--- a/tests/test-commandserver.py	Mon Feb 13 17:22:35 2012 +0100
+++ b/tests/test-commandserver.py	Mon Feb 20 20:32:45 2012 +0100
@@ -212,6 +212,21 @@
     runcommand(server, ['rollback'])
     runcommand(server, ['phase', '-r', '.'])
 
+def hgignore(server):
+    readchannel(server)
+    f = open('.hgignore', 'ab')
+    f.write('')
+    f.close()
+    runcommand(server, ['commit', '-Am.'])
+    f = open('ignored-file', 'ab')
+    f.write('')
+    f.close()
+    f = open('.hgignore', 'ab')
+    f.write('ignored-file')
+    f.close()
+    # Status shows ignored-file as unknown, it should be ignored
+    runcommand(server, ['status', '-i', '-u'])
+    
 if __name__ == '__main__':
     os.system('hg init')
 
@@ -232,3 +247,4 @@
     check(tagscache)
     check(setphase)
     check(rollback)
+    check(hgignore)

----------
messages: 19146
nosy: idank, mg, nesneros
priority: bug
status: unread
title: Commandserver: Changes to .hgignore not detected

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3278>
____________________________________________________



More information about the Mercurial-devel mailing list