Merge with MPM.
--- a/MANIFEST.in Wed Aug 24 12:43:09 2005 -0700
+++ b/MANIFEST.in Wed Aug 24 12:50:11 2005 -0700
@@ -12,4 +12,5 @@
include README
include CONTRIBUTORS
include COPYING
+include Makefile
include MANIFEST.in
--- a/Makefile Wed Aug 24 12:43:09 2005 -0700
+++ b/Makefile Wed Aug 24 12:50:11 2005 -0700
@@ -2,6 +2,9 @@
PYTHON=python
all:
+ $(PYTHON) setup.py build_ext -i
+
+install:
@echo "Read the file README for install instructions."
clean:
--- a/contrib/bash_completion Wed Aug 24 12:43:09 2005 -0700
+++ b/contrib/bash_completion Wed Aug 24 12:50:11 2005 -0700
@@ -103,7 +103,7 @@
export|manifest|update|checkout|up|co)
_hg_tags
;;
- pull|push|outgoing|incoming)
+ pull|push|outgoing|incoming|out|in)
_hg_paths
COMPREPLY=(${COMPREPLY[@]:-} $( compgen -d -- "$cur" ))
;;
@@ -113,7 +113,7 @@
add)
_hg_status "u"
;;
- commit)
+ commit|ci)
_hg_status "mra"
;;
remove)
--- a/mercurial/hg.py Wed Aug 24 12:43:09 2005 -0700
+++ b/mercurial/hg.py Wed Aug 24 12:50:11 2005 -0700
@@ -773,6 +773,14 @@
def wfile(self, f, mode='r'):
return self.wopener(f, mode)
+ def wread(self, filename):
+ return self.wopener(filename, 'r').read()
+
+ def wwrite(self, filename, data, fd=None):
+ if fd:
+ return fd.write(data)
+ return self.wopener(filename, 'w').write(data)
+
def transaction(self):
# save dirstate for undo
try:
@@ -839,7 +847,7 @@
linkrev = self.changelog.count()
for f in files:
try:
- t = self.wfile(f).read()
+ t = self.wread(f)
tm = util.is_exec(self.wjoin(f), mfm.get(f, False))
r = self.file(f)
mfm[f] = tm
@@ -932,7 +940,7 @@
self.ui.note(f + "\n")
try:
mf1[f] = util.is_exec(self.wjoin(f), mf1.get(f, False))
- t = self.wfile(f).read()
+ t = self.wread(f)
except IOError:
self.ui.warn("trouble committing %s!\n" % f)
raise
@@ -1023,7 +1031,7 @@
mf2, u = None, []
def fcmp(fn, mf):
- t1 = self.wfile(fn).read()
+ t1 = self.wread(fn)
t2 = self.file(fn).read(mf.get(fn, nullid))
return cmp(t1, t2)
@@ -1660,7 +1668,7 @@
# is the wfile new since m1, and match m2?
if f not in m1:
- t1 = self.wfile(f).read()
+ t1 = self.wread(f)
t2 = self.file(f).read(m2[f])
if cmp(t1, t2) == 0:
n = m2[f]
@@ -1780,10 +1788,10 @@
self.ui.note("getting %s\n" % f)
t = self.file(f).read(get[f])
try:
- self.wfile(f, "w").write(t)
+ self.wwrite(f, t)
except IOError:
os.makedirs(os.path.dirname(self.wjoin(f)))
- self.wfile(f, "w").write(t)
+ self.wwrite(f, t)
util.set_exec(self.wjoin(f), mf2[f])
if moddirstate:
if branch_merge:
@@ -1836,7 +1844,7 @@
pre = "%s~%s." % (os.path.basename(fn), prefix)
(fd, name) = tempfile.mkstemp("", pre)
f = os.fdopen(fd, "wb")
- f.write(fl.read(node))
+ self.wwrite(fn, fl.read(node), f)
f.close()
return name
--- a/mercurial/hgweb.py Wed Aug 24 12:43:09 2005 -0700
+++ b/mercurial/hgweb.py Wed Aug 24 12:50:11 2005 -0700
@@ -844,7 +844,7 @@
except:
virtual = ""
- if virtual:
+ if virtual[1:]:
real = self.cp.get("paths", virtual[1:])
h = hgweb(real)
h.run()
@@ -875,9 +875,12 @@
except:
return default
+ url = os.environ["REQUEST_URI"] + "/" + v
+ url = url.replace("//", "/")
+
yield dict(author = get("web", "author", "unknown"),
name = get("web", "name", v),
- url = os.environ["REQUEST_URI"] + "/" + v,
+ url = url,
parity = parity,
shortdesc = get("web", "description", "unknown"),
lastupdate = os.stat(os.path.join(r, ".hg",
--- a/tests/test-help.out Wed Aug 24 12:43:09 2005 -0700
+++ b/tests/test-help.out Wed Aug 24 12:50:11 2005 -0700
@@ -142,6 +142,8 @@
-r --rev
revision
+ -a --text
+ treat all files as text
-I --include
include path in search
-X --exclude