##// END OF EJS Templates
Make mq camelcase consistent with the rest of hg.
Brendan Cully -
r2818:bdc067ff default
parent child Browse files
Show More
@@ -39,7 +39,7 b' versionstr = "0.45"'
39 39
40 40 commands.norepo += " qclone qversion"
41 41
42 class StatusEntry:
42 class statusentry:
43 43 def __init__(self, rev, name=None):
44 44 if not name:
45 45 fields = rev.split(':')
@@ -74,7 +74,7 b' class queue:'
74 74 self.parse_series()
75 75
76 76 if os.path.exists(os.path.join(self.path, self.status_path)):
77 self.applied = [StatusEntry(l)
77 self.applied = [statusentry(l)
78 78 for l in self.opener(self.status_path).read().splitlines()]
79 79
80 80 def find_series(self, patch):
@@ -247,7 +247,7 b' class queue:'
247 247 pname = ".hg.patches.merge.marker"
248 248 n = repo.commit(None, '[mq]: merge marker', user=None, force=1,
249 249 wlock=wlock)
250 self.applied.append(StatusEntry(revlog.hex(n), pname))
250 self.applied.append(statusentry(revlog.hex(n), pname))
251 251 self.applied_dirty = 1
252 252
253 253 head = self.qparents(repo)
@@ -265,7 +265,7 b' class queue:'
265 265 rev = revlog.bin(info[1])
266 266 (err, head) = self.mergeone(repo, mergeq, head, patch, rev, wlock)
267 267 if head:
268 self.applied.append(StatusEntry(revlog.hex(head), patch))
268 self.applied.append(statusentry(revlog.hex(head), patch))
269 269 self.applied_dirty = 1
270 270 if err:
271 271 return (err, head)
@@ -360,7 +360,7 b' class queue:'
360 360 raise util.Abort(_("repo commit failed"))
361 361
362 362 if update_status:
363 self.applied.append(StatusEntry(revlog.hex(n), patch))
363 self.applied.append(statusentry(revlog.hex(n), patch))
364 364
365 365 if patcherr:
366 366 if not patchfound:
@@ -429,7 +429,7 b' class queue:'
429 429 if n == None:
430 430 raise util.Abort(_("repo commit failed"))
431 431 self.full_series[insert:insert] = [patch]
432 self.applied.append(StatusEntry(revlog.hex(n), patch))
432 self.applied.append(statusentry(revlog.hex(n), patch))
433 433 self.parse_series()
434 434 self.series_dirty = 1
435 435 self.applied_dirty = 1
@@ -904,7 +904,7 b' class queue:'
904 904
905 905 self.strip(repo, top, update=False, backup='strip', wlock=wlock)
906 906 n = repo.commit(filelist, message, changes[1], force=1, wlock=wlock)
907 self.applied[-1] = StatusEntry(revlog.hex(n), patch)
907 self.applied[-1] = statusentry(revlog.hex(n), patch)
908 908 self.applied_dirty = 1
909 909 else:
910 910 commands.dodiff(patchf, self.ui, repo, patchparent, None)
@@ -987,7 +987,7 b' class queue:'
987 987 qpp = [ hg.bin(x) for x in l ]
988 988 elif datastart != None:
989 989 l = lines[i].rstrip()
990 se = StatusEntry(l)
990 se = statusentry(l)
991 991 file_ = se.name
992 992 if se.rev:
993 993 applied.append(se)
@@ -1048,7 +1048,7 b' class queue:'
1048 1048 if not n:
1049 1049 self.ui.warn("repo commit failed\n")
1050 1050 return 1
1051 self.applied.append(StatusEntry(revlog.hex(n),'.hg.patches.save.line'))
1051 self.applied.append(statusentry(revlog.hex(n),'.hg.patches.save.line'))
1052 1052 self.applied_dirty = 1
1053 1053
1054 1054 def full_series_end(self):
@@ -1482,7 +1482,7 b' def rename(ui, repo, patch, name=None, *'
1482 1482
1483 1483 info = q.isapplied(patch)
1484 1484 if info:
1485 q.applied[info[0]] = StatusEntry(info[1], name)
1485 q.applied[info[0]] = statusentry(info[1], name)
1486 1486 q.applied_dirty = 1
1487 1487
1488 1488 util.rename(os.path.join(q.path, patch), absdest)
@@ -1552,12 +1552,12 b' def version(ui, q=None):'
1552 1552 return 0
1553 1553
1554 1554 def reposetup(ui, repo):
1555 class MqRepo(repo.__class__):
1555 class mqrepo(repo.__class__):
1556 1556 def tags(self):
1557 1557 if self.tagscache:
1558 1558 return self.tagscache
1559 1559
1560 tagscache = super(MqRepo, self).tags()
1560 tagscache = super(mqrepo, self).tags()
1561 1561
1562 1562 q = self.mq
1563 1563 if not q.applied:
@@ -1574,7 +1574,7 b' def reposetup(ui, repo):'
1574 1574
1575 1575 return tagscache
1576 1576
1577 repo.__class__ = MqRepo
1577 repo.__class__ = mqrepo
1578 1578 repo.mq = queue(ui, repo.join(""))
1579 1579
1580 1580 cmdtable = {
General Comments 0
You need to be logged in to leave comments. Login now