Show More
@@ -12,4 +12,5 b' recursive-include contrib *' | |||||
12 | include README |
|
12 | include README | |
13 | include CONTRIBUTORS |
|
13 | include CONTRIBUTORS | |
14 | include COPYING |
|
14 | include COPYING | |
|
15 | include Makefile | |||
15 | include MANIFEST.in |
|
16 | include MANIFEST.in |
@@ -2,6 +2,9 b'' | |||||
2 | PYTHON=python |
|
2 | PYTHON=python | |
3 |
|
3 | |||
4 | all: |
|
4 | all: | |
|
5 | $(PYTHON) setup.py build_ext -i | |||
|
6 | ||||
|
7 | install: | |||
5 | @echo "Read the file README for install instructions." |
|
8 | @echo "Read the file README for install instructions." | |
6 |
|
9 | |||
7 | clean: |
|
10 | clean: |
@@ -103,7 +103,7 b'' | |||||
103 | export|manifest|update|checkout|up|co) |
|
103 | export|manifest|update|checkout|up|co) | |
104 | _hg_tags |
|
104 | _hg_tags | |
105 | ;; |
|
105 | ;; | |
106 | pull|push|outgoing|incoming) |
|
106 | pull|push|outgoing|incoming|out|in) | |
107 | _hg_paths |
|
107 | _hg_paths | |
108 | COMPREPLY=(${COMPREPLY[@]:-} $( compgen -d -- "$cur" )) |
|
108 | COMPREPLY=(${COMPREPLY[@]:-} $( compgen -d -- "$cur" )) | |
109 | ;; |
|
109 | ;; | |
@@ -113,7 +113,7 b'' | |||||
113 | add) |
|
113 | add) | |
114 | _hg_status "u" |
|
114 | _hg_status "u" | |
115 | ;; |
|
115 | ;; | |
116 | commit) |
|
116 | commit|ci) | |
117 | _hg_status "mra" |
|
117 | _hg_status "mra" | |
118 | ;; |
|
118 | ;; | |
119 | remove) |
|
119 | remove) |
@@ -773,6 +773,14 b' class localrepository:' | |||||
773 | def wfile(self, f, mode='r'): |
|
773 | def wfile(self, f, mode='r'): | |
774 | return self.wopener(f, mode) |
|
774 | return self.wopener(f, mode) | |
775 |
|
775 | |||
|
776 | def wread(self, filename): | |||
|
777 | return self.wopener(filename, 'r').read() | |||
|
778 | ||||
|
779 | def wwrite(self, filename, data, fd=None): | |||
|
780 | if fd: | |||
|
781 | return fd.write(data) | |||
|
782 | return self.wopener(filename, 'w').write(data) | |||
|
783 | ||||
776 | def transaction(self): |
|
784 | def transaction(self): | |
777 | # save dirstate for undo |
|
785 | # save dirstate for undo | |
778 | try: |
|
786 | try: | |
@@ -839,7 +847,7 b' class localrepository:' | |||||
839 | linkrev = self.changelog.count() |
|
847 | linkrev = self.changelog.count() | |
840 | for f in files: |
|
848 | for f in files: | |
841 | try: |
|
849 | try: | |
842 |
t = self.w |
|
850 | t = self.wread(f) | |
843 | tm = util.is_exec(self.wjoin(f), mfm.get(f, False)) |
|
851 | tm = util.is_exec(self.wjoin(f), mfm.get(f, False)) | |
844 | r = self.file(f) |
|
852 | r = self.file(f) | |
845 | mfm[f] = tm |
|
853 | mfm[f] = tm | |
@@ -932,7 +940,7 b' class localrepository:' | |||||
932 | self.ui.note(f + "\n") |
|
940 | self.ui.note(f + "\n") | |
933 | try: |
|
941 | try: | |
934 | mf1[f] = util.is_exec(self.wjoin(f), mf1.get(f, False)) |
|
942 | mf1[f] = util.is_exec(self.wjoin(f), mf1.get(f, False)) | |
935 |
t = self.w |
|
943 | t = self.wread(f) | |
936 | except IOError: |
|
944 | except IOError: | |
937 | self.ui.warn("trouble committing %s!\n" % f) |
|
945 | self.ui.warn("trouble committing %s!\n" % f) | |
938 | raise |
|
946 | raise | |
@@ -1023,7 +1031,7 b' class localrepository:' | |||||
1023 | mf2, u = None, [] |
|
1031 | mf2, u = None, [] | |
1024 |
|
1032 | |||
1025 | def fcmp(fn, mf): |
|
1033 | def fcmp(fn, mf): | |
1026 |
t1 = self.w |
|
1034 | t1 = self.wread(fn) | |
1027 | t2 = self.file(fn).read(mf.get(fn, nullid)) |
|
1035 | t2 = self.file(fn).read(mf.get(fn, nullid)) | |
1028 | return cmp(t1, t2) |
|
1036 | return cmp(t1, t2) | |
1029 |
|
1037 | |||
@@ -1660,7 +1668,7 b' class localrepository:' | |||||
1660 |
|
1668 | |||
1661 | # is the wfile new since m1, and match m2? |
|
1669 | # is the wfile new since m1, and match m2? | |
1662 | if f not in m1: |
|
1670 | if f not in m1: | |
1663 |
t1 = self.w |
|
1671 | t1 = self.wread(f) | |
1664 | t2 = self.file(f).read(m2[f]) |
|
1672 | t2 = self.file(f).read(m2[f]) | |
1665 | if cmp(t1, t2) == 0: |
|
1673 | if cmp(t1, t2) == 0: | |
1666 | n = m2[f] |
|
1674 | n = m2[f] | |
@@ -1780,10 +1788,10 b' class localrepository:' | |||||
1780 | self.ui.note("getting %s\n" % f) |
|
1788 | self.ui.note("getting %s\n" % f) | |
1781 | t = self.file(f).read(get[f]) |
|
1789 | t = self.file(f).read(get[f]) | |
1782 | try: |
|
1790 | try: | |
1783 |
self.w |
|
1791 | self.wwrite(f, t) | |
1784 | except IOError: |
|
1792 | except IOError: | |
1785 | os.makedirs(os.path.dirname(self.wjoin(f))) |
|
1793 | os.makedirs(os.path.dirname(self.wjoin(f))) | |
1786 |
self.w |
|
1794 | self.wwrite(f, t) | |
1787 | util.set_exec(self.wjoin(f), mf2[f]) |
|
1795 | util.set_exec(self.wjoin(f), mf2[f]) | |
1788 | if moddirstate: |
|
1796 | if moddirstate: | |
1789 | if branch_merge: |
|
1797 | if branch_merge: | |
@@ -1836,7 +1844,7 b' class localrepository:' | |||||
1836 | pre = "%s~%s." % (os.path.basename(fn), prefix) |
|
1844 | pre = "%s~%s." % (os.path.basename(fn), prefix) | |
1837 | (fd, name) = tempfile.mkstemp("", pre) |
|
1845 | (fd, name) = tempfile.mkstemp("", pre) | |
1838 | f = os.fdopen(fd, "wb") |
|
1846 | f = os.fdopen(fd, "wb") | |
1839 | f.write(fl.read(node)) |
|
1847 | self.wwrite(fn, fl.read(node), f) | |
1840 | f.close() |
|
1848 | f.close() | |
1841 | return name |
|
1849 | return name | |
1842 |
|
1850 |
@@ -844,7 +844,7 b' class hgwebdir:' | |||||
844 | except: |
|
844 | except: | |
845 | virtual = "" |
|
845 | virtual = "" | |
846 |
|
846 | |||
847 | if virtual: |
|
847 | if virtual[1:]: | |
848 | real = self.cp.get("paths", virtual[1:]) |
|
848 | real = self.cp.get("paths", virtual[1:]) | |
849 | h = hgweb(real) |
|
849 | h = hgweb(real) | |
850 | h.run() |
|
850 | h.run() | |
@@ -875,9 +875,12 b' class hgwebdir:' | |||||
875 | except: |
|
875 | except: | |
876 | return default |
|
876 | return default | |
877 |
|
877 | |||
|
878 | url = os.environ["REQUEST_URI"] + "/" + v | |||
|
879 | url = url.replace("//", "/") | |||
|
880 | ||||
878 | yield dict(author = get("web", "author", "unknown"), |
|
881 | yield dict(author = get("web", "author", "unknown"), | |
879 | name = get("web", "name", v), |
|
882 | name = get("web", "name", v), | |
880 |
url = |
|
883 | url = url, | |
881 | parity = parity, |
|
884 | parity = parity, | |
882 | shortdesc = get("web", "description", "unknown"), |
|
885 | shortdesc = get("web", "description", "unknown"), | |
883 | lastupdate = os.stat(os.path.join(r, ".hg", |
|
886 | lastupdate = os.stat(os.path.join(r, ".hg", |
General Comments 0
You need to be logged in to leave comments.
Login now