--- a/contrib/zsh_completion Mon Nov 13 13:26:57 2006 -0600
+++ b/contrib/zsh_completion Mon Nov 13 21:50:09 2006 +0100
@@ -377,7 +377,7 @@
_hg_cmd_commit() {
_arguments -s -w : $_hg_global_opts $_hg_pat_opts \
- '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]'
+ '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \
'(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
'(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_file -g \*.txt' \
'(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \
--- a/mercurial/dirstate.py Mon Nov 13 13:26:57 2006 -0600
+++ b/mercurial/dirstate.py Mon Nov 13 21:50:09 2006 +0100
@@ -32,7 +32,11 @@
def getcwd(self):
cwd = os.getcwd()
if cwd == self.root: return ''
- return cwd[len(self.root) + 1:]
+ # self.root ends with a path separator if self.root is '/' or 'C:\'
+ common_prefix_len = len(self.root)
+ if not self.root.endswith(os.sep):
+ common_prefix_len += 1
+ return cwd[common_prefix_len:]
def hgignore(self):
'''return the contents of .hgignore files as a list of patterns.
--- a/mercurial/localrepo.py Mon Nov 13 13:26:57 2006 -0600
+++ b/mercurial/localrepo.py Mon Nov 13 21:50:09 2006 +0100
@@ -581,12 +581,13 @@
def commit(self, files=None, text="", user=None, date=None,
match=util.always, force=False, lock=None, wlock=None,
- force_editor=False, p1=None, p2=None):
+ force_editor=False, p1=None, p2=None, extra={}):
commit = []
remove = []
changed = []
use_dirstate = (p1 is None) # not rawcommit
+ extra = extra.copy()
if use_dirstate:
if files:
@@ -693,7 +694,6 @@
if not lines:
return None
text = '\n'.join(lines)
- extra = {}
if branchname:
extra["branch"] = branchname
n = self.changelog.add(mn, changed + remove, text, tr, p1, p2,