Show More
@@ -4385,7 +4385,7 b' def log(ui, repo, *pats, **opts):' | |||
|
4385 | 4385 | |
|
4386 | 4386 | hg log -T list |
|
4387 | 4387 | |
|
4388 |
- check if a given changeset is included i |
|
|
4388 | - check if a given changeset is included in a tagged release:: | |
|
4389 | 4389 | |
|
4390 | 4390 | hg log -r "a21ccf and ancestor(1.9)" |
|
4391 | 4391 |
@@ -112,9 +112,9 b' def _statusmessage(code):' | |||
|
112 | 112 | def statusmessage(code, message=None): |
|
113 | 113 | return '%d %s' % (code, message or _statusmessage(code)) |
|
114 | 114 | |
|
115 | def get_stat(spath): | |
|
116 | """stat changelog if it exists, spath otherwise""" | |
|
117 |
cl_path = os.path.join(spath, |
|
|
115 | def get_stat(spath, fn="00changelog.i"): | |
|
116 | """stat fn (00changelog.i by default) if it exists, spath otherwise""" | |
|
117 | cl_path = os.path.join(spath, fn) | |
|
118 | 118 | if os.path.exists(cl_path): |
|
119 | 119 | return os.stat(cl_path) |
|
120 | 120 | else: |
@@ -71,8 +71,8 b' class hgweb(object):' | |||
|
71 | 71 | r.baseui.setconfig('ui', 'nontty', 'true', 'hgweb') |
|
72 | 72 | self.repo = r |
|
73 | 73 | hook.redirect(True) |
|
74 | self.repostate = ((-1, -1), (-1, -1)) | |
|
74 | 75 | self.mtime = -1 |
|
75 | self.size = -1 | |
|
76 | 76 | self.reponame = name |
|
77 | 77 | self.archives = 'zip', 'gz', 'bz2' |
|
78 | 78 | self.stripecount = 1 |
@@ -107,9 +107,12 b' class hgweb(object):' | |||
|
107 | 107 | |
|
108 | 108 | def refresh(self, request=None): |
|
109 | 109 | st = get_stat(self.repo.spath) |
|
110 | # compare changelog size in addition to mtime to catch | |
|
111 | # rollbacks made less than a second ago | |
|
112 | if st.st_mtime != self.mtime or st.st_size != self.size: | |
|
110 | pst = get_stat(self.repo.spath, 'phaseroots') | |
|
111 | # changelog mtime and size, phaseroots mtime and size | |
|
112 | repostate = ((st.st_mtime, st.st_size), (pst.st_mtime, pst.st_size)) | |
|
113 | # we need to compare file size in addition to mtime to catch | |
|
114 | # changes made less than a second ago | |
|
115 | if repostate != self.repostate: | |
|
113 | 116 | r = hg.repository(self.repo.baseui, self.repo.url()) |
|
114 | 117 | self.repo = self._getview(r) |
|
115 | 118 | self.maxchanges = int(self.config("web", "maxchanges", 10)) |
@@ -121,8 +124,9 b' class hgweb(object):' | |||
|
121 | 124 | encoding.encoding = self.config("web", "encoding", |
|
122 | 125 | encoding.encoding) |
|
123 | 126 | # update these last to avoid threads seeing empty settings |
|
127 | self.repostate = repostate | |
|
128 | # mtime is needed for ETag | |
|
124 | 129 | self.mtime = st.st_mtime |
|
125 | self.size = st.st_size | |
|
126 | 130 | if request: |
|
127 | 131 | self.repo.ui.environ = request.env |
|
128 | 132 |
@@ -531,6 +531,50 b' static file' | |||
|
531 | 531 | 304 Not Modified |
|
532 | 532 | |
|
533 | 533 | |
|
534 | phase changes are refreshed (issue4061) | |
|
535 | ||
|
536 | $ echo bar >> foo | |
|
537 | $ hg ci -msecret --secret | |
|
538 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log?style=raw' | |
|
539 | 200 Script output follows | |
|
540 | ||
|
541 | ||
|
542 | # HG changelog | |
|
543 | # Node ID 2ef0ac749a14e4f57a5a822464a0902c6f7f448f | |
|
544 | ||
|
545 | changeset: 2ef0ac749a14e4f57a5a822464a0902c6f7f448f | |
|
546 | revision: 0 | |
|
547 | user: test | |
|
548 | date: Thu, 01 Jan 1970 00:00:00 +0000 | |
|
549 | summary: base | |
|
550 | branch: default | |
|
551 | tag: tip | |
|
552 | ||
|
553 | ||
|
554 | $ hg phase --draft tip | |
|
555 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log?style=raw' | |
|
556 | 200 Script output follows | |
|
557 | ||
|
558 | ||
|
559 | # HG changelog | |
|
560 | # Node ID a084749e708a9c4c0a5b652a2a446322ce290e04 | |
|
561 | ||
|
562 | changeset: a084749e708a9c4c0a5b652a2a446322ce290e04 | |
|
563 | revision: 1 | |
|
564 | user: test | |
|
565 | date: Thu, 01 Jan 1970 00:00:00 +0000 | |
|
566 | summary: secret | |
|
567 | branch: default | |
|
568 | tag: tip | |
|
569 | ||
|
570 | changeset: 2ef0ac749a14e4f57a5a822464a0902c6f7f448f | |
|
571 | revision: 0 | |
|
572 | user: test | |
|
573 | date: Thu, 01 Jan 1970 00:00:00 +0000 | |
|
574 | summary: base | |
|
575 | ||
|
576 | ||
|
577 | ||
|
534 | 578 | errors |
|
535 | 579 | |
|
536 | 580 | $ cat errors.log |
General Comments 0
You need to be logged in to leave comments.
Login now