aboutsummaryrefslogtreecommitdiffstats
path: root/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments
diff options
context:
space:
mode:
Diffstat (limited to '.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments')
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/16ba77d3-dfc9-4732-8d08-0e471f400d85/body34
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/16ba77d3-dfc9-4732-8d08-0e471f400d85/values8
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/17a2217e-fc1d-4d7a-a569-4fd2a4a2261e/body29
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/17a2217e-fc1d-4d7a-a569-4fd2a4a2261e/values8
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/202e0dc6-61bf-4b17-a8bd-f8a27482cb68/body10
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/202e0dc6-61bf-4b17-a8bd-f8a27482cb68/values8
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/6a0080c4-d684-4c2c-afaa-c15cc43d68ad/body1
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/6a0080c4-d684-4c2c-afaa-c15cc43d68ad/values8
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/7e733393-8ba0-4345-a0e3-4140101d32f0/body23
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/7e733393-8ba0-4345-a0e3-4140101d32f0/values8
10 files changed, 137 insertions, 0 deletions
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/16ba77d3-dfc9-4732-8d08-0e471f400d85/body b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/16ba77d3-dfc9-4732-8d08-0e471f400d85/body
new file mode 100644
index 0000000..595381c
--- /dev/null
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/16ba77d3-dfc9-4732-8d08-0e471f400d85/body
@@ -0,0 +1,34 @@
+When I try to do set-root on a git repository, I get:
+# be set-root .
+Traceback (most recent call last):
+ File "/usr/local/bin/be", line 55, in <module>
+ sys.exit(execute(sys.argv[1], sys.argv[2:]))
+ File "/usr/lib/python2.5/site-packages/libbe/cmdutil.py", line 105, in execute
+ File "/usr/lib/python2.5/site-packages/becommands/set_root.py", line 57, in execute
+ File "/usr/lib/python2.5/site-packages/libbe/bugdir.py", line 110, in create_bug_dir
+ File "/usr/lib/python2.5/site-packages/libbe/bugdir.py", line 70, in set_version
+ File "/usr/lib/python2.5/site-packages/libbe/git.py", line 51, in set_file_contents
+ File "/usr/lib/python2.5/site-packages/libbe/git.py", line 38, in add_id
+ File "/usr/lib/python2.5/site-packages/libbe/git.py", line 33, in invoke_client
+ File "/usr/lib/python2.5/site-packages/libbe/rcs.py", line 63, in invoke
+ File "/usr/lib/python2.5/subprocess.py", line 594, in __init__
+ errread, errwrite)
+ File "/usr/lib/python2.5/subprocess.py", line 1147, in _execute_child
+ raise child_exception
+OSError: [Errno 2] No such file or directory: ''
+
+because the cwd argument for Popen is set to '' (the empty string).
+
+The following patch fixes the issue:
+--- libbe/git.py 2008-06-22 19:52:14.000000000 -0400
++++ libbe/git.py 2008-06-23 00:53:39.000000000 -0400
+@@ -26,7 +26,7 @@
+ return filename
+
+ def invoke_client(*args, **kwargs):
+- directory = kwargs['directory']
++ directory = kwargs['directory'] or None
+ expect = kwargs.get('expect', (0, 1))
+ cl_args = ["git"]
+ cl_args.extend(args)
+
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/16ba77d3-dfc9-4732-8d08-0e471f400d85/values b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/16ba77d3-dfc9-4732-8d08-0e471f400d85/values
new file mode 100644
index 0000000..8dc0882
--- /dev/null
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/16ba77d3-dfc9-4732-8d08-0e471f400d85/values
@@ -0,0 +1,8 @@
+Author: hubert
+
+
+Content-type: text/plain
+
+
+Date: Mon, 23 Jun 2008 05:02:22 +0000
+
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/17a2217e-fc1d-4d7a-a569-4fd2a4a2261e/body b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/17a2217e-fc1d-4d7a-a569-4fd2a4a2261e/body
new file mode 100644
index 0000000..49fe1fb
--- /dev/null
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/17a2217e-fc1d-4d7a-a569-4fd2a4a2261e/body
@@ -0,0 +1,29 @@
+It looks like the problems with the git backend are more than just in the
+site-init command. It looks like several places expect that git_dir_for_path
+and git_repo_for_path return absolute paths, while in the current
+implementation, it may not be the case. Here is an updated patch to fix this.
+This replaces the previous patch that I gave in this bug. It seems to work for
+me, but I haven't heavily tested it.
+
+--- libbe/git.py 2008-06-22 19:52:14.000000000 -0400
++++ /libbe/git.py 2008-06-23 22:39:17.000000000 -0400
+@@ -102,11 +102,16 @@
+ """Find the root of the deepest repository containing path."""
+ # Assume that nothing funny is going on; in particular, that we aren't
+ # dealing with a bare repo.
+- return os.path.dirname(git_dir_for_path(path))
++ # "git rev-parse --show-cdup" gives the relative path to the top-level
++ # directory of the repository. We then join that to the requested path,
++ # and then use realpath to turn it into an absolute path and to get rid of
++ # ".." components.
++ return os.path.realpath(os.path.join(path,invoke_client("rev-parse", "--show-cdup", directory=path)[1].rstrip()))
+
+ def git_dir_for_path(path):
+ """Find the git-dir of the deepest repo containing path."""
+- return invoke_client("rev-parse", "--git-dir", directory=path)[1].rstrip()
++ repo = git_repo_for_path(path)
++ return os.path.join(repo,invoke_client("rev-parse", "--git-dir", directory=repo)[1].rstrip())
+
+ def export(spec, bug_dir, revision_dir):
+ """Check out commit 'spec' from the git repo containing bug_dir into
+
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/17a2217e-fc1d-4d7a-a569-4fd2a4a2261e/values b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/17a2217e-fc1d-4d7a-a569-4fd2a4a2261e/values
new file mode 100644
index 0000000..176ae7f
--- /dev/null
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/17a2217e-fc1d-4d7a-a569-4fd2a4a2261e/values
@@ -0,0 +1,8 @@
+Author: hubert
+
+
+Content-type: text/plain
+
+
+Date: Tue, 24 Jun 2008 02:45:18 +0000
+
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/202e0dc6-61bf-4b17-a8bd-f8a27482cb68/body b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/202e0dc6-61bf-4b17-a8bd-f8a27482cb68/body
new file mode 100644
index 0000000..ccc18ea
--- /dev/null
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/202e0dc6-61bf-4b17-a8bd-f8a27482cb68/body
@@ -0,0 +1,10 @@
+Fixed another bug in git.strip_git(). lstrip() wasn't what I had thought.
+
+>>> "/a.b/.be/x/y".lstrip("/a.b/")
+'e/x/y'
+
+So I went back to just droping the first N chars
+
+>>> "/a.b/.be/x/y"[len("/a.b/"):]
+'.be/x/y'
+
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/202e0dc6-61bf-4b17-a8bd-f8a27482cb68/values b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/202e0dc6-61bf-4b17-a8bd-f8a27482cb68/values
new file mode 100644
index 0000000..9cfd081
--- /dev/null
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/202e0dc6-61bf-4b17-a8bd-f8a27482cb68/values
@@ -0,0 +1,8 @@
+Author: W. Trevor King <wking@drexel.edu>
+
+
+Content-type: text/plain
+
+
+Date: Sun, 16 Nov 2008 20:36:20 +0000
+
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/6a0080c4-d684-4c2c-afaa-c15cc43d68ad/body b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/6a0080c4-d684-4c2c-afaa-c15cc43d68ad/body
new file mode 100644
index 0000000..c889a38
--- /dev/null
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/6a0080c4-d684-4c2c-afaa-c15cc43d68ad/body
@@ -0,0 +1 @@
+Fixed with a simpler patch.
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/6a0080c4-d684-4c2c-afaa-c15cc43d68ad/values b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/6a0080c4-d684-4c2c-afaa-c15cc43d68ad/values
new file mode 100644
index 0000000..9e40714
--- /dev/null
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/6a0080c4-d684-4c2c-afaa-c15cc43d68ad/values
@@ -0,0 +1,8 @@
+Author: W. Trevor King <wking@drexel.edu>
+
+
+Content-type: text/plain
+
+
+Date: Thu, 13 Nov 2008 19:31:04 +0000
+
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/7e733393-8ba0-4345-a0e3-4140101d32f0/body b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/7e733393-8ba0-4345-a0e3-4140101d32f0/body
new file mode 100644
index 0000000..7c07a0f
--- /dev/null
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/7e733393-8ba0-4345-a0e3-4140101d32f0/body
@@ -0,0 +1,23 @@
+Oops, missed a case. I now see what Hubert was saying about absolute
+paths :p. In git.strip_git(), the output of git_repo_for_path('.')
+was being subtracted from an absolute path. Obviously, if the path
+was returning '.', you'd get things like
+
+filename=
+/home/wking/src/fun/testbe/.be/bugs/c3bf839b-88f9-4609-89a2-6a5b75c415b8/values
+
+stripping 2 chars ('.' and '/')], returns
+ome/wking/src/fun/testbe/.be/bugs/c3bf839b-88f9-4609-89a2-6a5b75c415b8/values
+
+
+Now we convert the git_repo_for_path output to an absolute path and get
+
+filename=
+/home/wking/src/fun/testbe/.be/bugs/c3bf839b-88f9-4609-89a2-6a5b75c415b8/values
+absRepoPath=
+/home/wking/src/fun/testbe
+absRepoSlashedDir=
+/home/wking/src/fun/testbe/
+returns
+.be/bugs/c3bf839b-88f9-4609-89a2-6a5b75c415b8/values
+
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/7e733393-8ba0-4345-a0e3-4140101d32f0/values b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/7e733393-8ba0-4345-a0e3-4140101d32f0/values
new file mode 100644
index 0000000..ce0ab73
--- /dev/null
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/0cad2ac6-76ef-4a88-abdf-b2e02de76f5c/comments/7e733393-8ba0-4345-a0e3-4140101d32f0/values
@@ -0,0 +1,8 @@
+Author: W. Trevor King <wking@drexel.edu>
+
+
+Content-type: text/plain
+
+
+Date: Thu, 13 Nov 2008 20:18:02 +0000
+