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