Mercurial > hg
changeset 6292:dc2f360444a0
Merge
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon, 17 Mar 2008 08:04:09 -0700 |
parents | 509bb4af1502 (diff) c92cf92c55a6 (current diff) |
children | 9cd6292abfdf |
files | |
diffstat | 7 files changed, 117 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/inotify/linux/watcher.py Mon Mar 17 07:59:23 2008 -0700 +++ b/hgext/inotify/linux/watcher.py Mon Mar 17 08:04:09 2008 -0700 @@ -69,7 +69,7 @@ self.mask = raw.mask self.cookie = raw.cookie self.name = raw.name - + def __repr__(self): r = repr(self.raw) return 'Event(path=' + repr(self.path) + ', ' + r[r.find('(')+1:] @@ -155,7 +155,7 @@ def path(self, path): '''Return a (watch descriptor, event mask) pair for the given path. - + If the path is not being watched, return None.''' return self._paths.get(path) @@ -167,7 +167,7 @@ this watcher, return None.''' return self._wds.get(wd) - + def read(self, bufsize=None): '''Read a list of queued inotify events.
--- a/hgext/inotify/server.py Mon Mar 17 07:59:23 2008 -0700 +++ b/hgext/inotify/server.py Mon Mar 17 08:04:09 2008 -0700 @@ -316,7 +316,7 @@ root, fn = self.split(wfn) del self.dir(self.statustrees[key], root)[fn] del self.dir(self.tree, root)[fn] - + def scan(self, topdir=''): self.handle_timeout() ds = self.repo.dirstate._map.copy() @@ -359,7 +359,7 @@ def walk(self, states, tree, prefix=''): # This is the "inner loop" when talking to the client. - + for name, val in tree.iteritems(): path = join(prefix, name) try: @@ -384,7 +384,7 @@ self.repo.dirstate.ignorefunc = None self.ui.note('rescanning due to .hgignore change\n') self.scan() - + def getstat(self, wpath): try: return self.statcache[wpath] @@ -394,7 +394,7 @@ except OSError, err: if err.errno != errno.ENOENT: raise - + def stat(self, wpath): try: st = os.lstat(join(self.wprefix, wpath)) @@ -404,7 +404,7 @@ except OSError, err: self.statcache.pop(wpath, None) raise - + def created(self, wpath): if wpath == '.hgignore': self.update_hgignore() @@ -435,7 +435,7 @@ return self.updatestatus(wpath, None) - + def schedule_work(self, wpath, evt): self.eventq.setdefault(wpath, []) prev = self.eventq[wpath] @@ -454,7 +454,7 @@ self.modified(wpath) elif evt == 'd': self.deleted(wpath) - + def process_create(self, wpath, evt): if self.ui.debugflag: self.ui.note(_('%s event: created %s\n') % @@ -583,7 +583,7 @@ return names = cs.read().split('\0') - + states = names.pop() self.ui.note(_('answering query for %r\n') % states)
--- a/mercurial/context.py Mon Mar 17 07:59:23 2008 -0700 +++ b/mercurial/context.py Mon Mar 17 08:04:09 2008 -0700 @@ -190,6 +190,9 @@ elif name == '_filerev': self._filerev = self._filelog.rev(self._filenode) return self._filerev + elif name == '_repopath': + self._repopath = self._path + return self._repopath else: raise AttributeError, name @@ -404,7 +407,7 @@ pl = [(n.path(), n.filenode()) for n in c.parents()] acache[(c._path, None)] = pl - flcache = {self._path:self._filelog, fc2._path:fc2._filelog} + flcache = {self._repopath:self._filelog, fc2._repopath:fc2._filelog} def parents(vertex): if vertex in acache: return acache[vertex]
--- a/mercurial/hgweb/hgwebdir_mod.py Mon Mar 17 07:59:23 2008 -0700 +++ b/mercurial/hgweb/hgwebdir_mod.py Mon Mar 17 08:04:09 2008 -0700 @@ -55,7 +55,7 @@ self.repos.extend(cleannames(cp.items('paths'))) if cp.has_section('collections'): for prefix, root in cp.items('collections'): - for path in util.walkrepos(root, followsym = True): + for path in util.walkrepos(root, followsym=True): repo = os.path.normpath(path) name = repo if name.startswith(prefix):
--- a/mercurial/version.py Mon Mar 17 07:59:23 2008 -0700 +++ b/mercurial/version.py Mon Mar 17 08:04:09 2008 -0700 @@ -10,7 +10,6 @@ """ import os -import os.path import sys import re import time
--- a/tests/test-mv-cp-st-diff Mon Mar 17 07:59:23 2008 -0700 +++ b/tests/test-mv-cp-st-diff Mon Mar 17 08:04:09 2008 -0700 @@ -65,3 +65,4 @@ tb "hg cp a b" "add b b1" "add a w" "single copy" tb "hg mv a b" "hg mv b c" "hg mv c d" "rename chain" tb "hg cp a b" "hg cp b c" "hg cp c d" "copy chain" +tb "add a a1" "hg mv a b" "hg mv b a" "circular rename"
--- a/tests/test-mv-cp-st-diff.out Mon Mar 17 07:59:23 2008 -0700 +++ b/tests/test-mv-cp-st-diff.out Mon Mar 17 08:04:09 2008 -0700 @@ -793,3 +793,103 @@ -5 +** circular rename ** +** add a a1 / hg mv a b / hg mv b a +- working to parent: +A a + b +R b + +diff --git a/b b/a +rename from b +rename to a + +- working to root: --rev 0 +M a + +diff --git a/a b/a +--- a/a ++++ b/a +@@ -1,1 +1,3 @@ + a ++6 ++a1 + +- working to branch: --rev 2 +M a + +diff --git a/a b/a +--- a/a ++++ b/a +@@ -1,3 +1,3 @@ + a +-m1 +-m2 ++6 ++a1 + +- root to parent: --rev 0 --rev . +A b + a +R a + +diff --git a/a b/b +rename from a +rename to b +--- a/a ++++ b/b +@@ -1,1 +1,3 @@ + a ++6 ++a1 + +- parent to root: --rev . --rev 0 +A a + b +R b + +diff --git a/b b/a +rename from b +rename to a +--- a/b ++++ b/a +@@ -1,3 +1,1 @@ + a +-6 +-a1 + +- branch to parent: --rev 2 --rev . +A b + a +R a + +diff --git a/a b/b +rename from a +rename to b +--- a/a ++++ b/b +@@ -1,3 +1,3 @@ + a +-m1 +-m2 ++6 ++a1 + +- parent to branch: --rev . --rev 2 +A a + b +R b + +diff --git a/b b/a +rename from b +rename to a +--- a/b ++++ b/a +@@ -1,3 +1,3 @@ + a +-6 +-a1 ++m1 ++m2 + +