comparison mercurial/commands.py @ 2852:046a8b03ea59

Change remaining users of manifest flags
author Matt Mackall <mpm@selenic.com>
date Fri, 11 Aug 2006 10:57:42 -0500
parents e78cad1f6b1f
children cdbca3d59518
comparison
equal deleted inserted replaced
2851:b4f05ecf4ee8 2852:046a8b03ea59
1331 rev = repo.changelog.tip() 1331 rev = repo.changelog.tip()
1332 else: 1332 else:
1333 rev = repo.lookup(rev) 1333 rev = repo.lookup(rev)
1334 change = repo.changelog.read(rev) 1334 change = repo.changelog.read(rev)
1335 n = change[0] 1335 n = change[0]
1336 files = repo.manifest.readflags(n) 1336 files = repo.manifest.read(n)
1337 wlock = repo.wlock() 1337 wlock = repo.wlock()
1338 repo.dirstate.rebuild(rev, files.iteritems()) 1338 repo.dirstate.rebuild(rev, files)
1339 1339
1340 def debugcheckstate(ui, repo): 1340 def debugcheckstate(ui, repo):
1341 """validate the correctness of the current dirstate""" 1341 """validate the correctness of the current dirstate"""
1342 parent1, parent2 = repo.dirstate.parents() 1342 parent1, parent2 = repo.dirstate.parents()
1343 repo.dirstate.read() 1343 repo.dirstate.read()
2144 except hg.RepoError: 2144 except hg.RepoError:
2145 n = repo.manifest.lookup(rev) 2145 n = repo.manifest.lookup(rev)
2146 else: 2146 else:
2147 n = repo.manifest.tip() 2147 n = repo.manifest.tip()
2148 m = repo.manifest.read(n) 2148 m = repo.manifest.read(n)
2149 mf = repo.manifest.readflags(n)
2150 files = m.keys() 2149 files = m.keys()
2151 files.sort() 2150 files.sort()
2152 2151
2153 for f in files: 2152 for f in files:
2154 ui.write("%40s %3s %s\n" % (hex(m[f]), 2153 ui.write("%40s %3s %s\n" % (hex(m[f]),
2155 mf.execf(f) and "755" or "644", f)) 2154 m.execf(f) and "755" or "644", f))
2156 2155
2157 def merge(ui, repo, node=None, force=None, branch=None): 2156 def merge(ui, repo, node=None, force=None, branch=None):
2158 """Merge working directory with another revision 2157 """Merge working directory with another revision
2159 2158
2160 Merge the contents of the current working directory and the 2159 Merge the contents of the current working directory and the