-X and -I for addremove and others
Thomas Arendsen Hein
thomas at intevation.de
Sat Jul 23 12:23:59 CDT 2005
* Matt Mackall <mpm at selenic.com> [20050723 17:18]:
> On Sat, Jul 23, 2005 at 07:58:35AM +0200, Thomas Arendsen Hein wrote:
> > Without Matt's last change (eea96285cbf9) this is still there ...
>
> Thanks for catching this. Fixed.
This case yes, but what should have been fixed by your change broke
again. Please pull from me to get some test fixes, tests etc.
Attached is a dirty fix for the problem, I currently have no time to
clean this up.
Thomas
--
Email: thomas at intevation.de
http://intevation.de/~thomas/
-------------- next part --------------
diff -r 49ec802b4a16 mercurial/hg.py
--- a/mercurial/hg.py Sat Jul 23 16:14:05 2005
+++ b/mercurial/hg.py Sat Jul 23 19:23:45 2005
@@ -378,7 +378,7 @@
def copied(self, file):
return self.copies.get(file, None)
- def update(self, files, state):
+ def update(self, files, state, lookup=False):
''' current states:
n normal
m needs merging
@@ -393,7 +393,10 @@
self.map[f] = ('r', 0, 0, 0)
else:
s = os.stat(os.path.join(self.root, f))
- self.map[f] = (state, s.st_mode, s.st_size, s.st_mtime)
+ if lookup:
+ self.map[f] = (state, -1, -1, -1)
+ else:
+ self.map[f] = (state, s.st_mode, s.st_size, s.st_mtime)
def forget(self, files):
if not files: return
@@ -478,6 +481,8 @@
added.append(fn)
elif c[0] == 'r':
unknown.append(fn)
+ elif c == ('n', -1, -1, -1):
+ lookup.append(fn)
elif c[2] != s.st_size or (c[1] ^ s.st_mode) & 0100:
changed.append(fn)
elif c[1] != s.st_mode or c[3] != s.st_mtime:
@@ -1506,10 +1511,10 @@
m, o, flag = merge[f]
self.merge3(f, m, o)
util.set_exec(self.wjoin(f), flag)
- if moddirstate and mode == 'm':
+ if moddirstate:
# only update dirstate on branch merge, otherwise we
# could mark files with changes as unchanged
- self.dirstate.update([f], mode)
+ self.dirstate.update([f], mode, lookup=(mode != 'm'))
remove.sort()
for f in remove:
More information about the Mercurial
mailing list