git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: cvs2git and file permissions

From
SVSven Verdoolaege <sven.verdoolaege@cs.kuleuven.ac.be>
Date
Jun 18, 2005, 22:31 UTC
Message-ID
<20050618223115.GA5505@billie.cs.kuleuven.ac.be>
In-Reply-To
<Pine.LNX.4.58.0506181421070.2268@ppc970.osdl.org>
On Sat, Jun 18, 2005 at 02:23:48PM -0700, Linus Torvalds wrote:
Show 6 quoted lines
> On Sat, 18 Jun 2005, Sven Verdoolaege wrote:
> > 
> > Let cvs checkout in a temporary directory rather than
> > using the pipe option to avoid loss of mode information.
> 
> Hmm.. Why do you use the "-N" flag?
I didn't quite know how to interpret the "as short as possible" in
              Use the -d dir option to create a directory  called
              dir  for  the  working  files, instead of using the
              module name.  Unless you also  use  -N,  the  paths
              created under dir will be as short as possible.
It would appear you do.
Show 7 quoted lines
> Wouldn't it be much cleaner to _not_ create all those sub-directories 
> under ".git-tmp", and instead do something like
> 
> 	"cvs -q -d %s checkout -d .git-tmp -r%s '%s/%s'" ...
> 	"mv -f .git-tmp/%s %s\n", dir ? dir+1 : name, name
> 
> With that changed (and tested ;), I'll happily take it.
Seems to work.
The rm is still needed though.  Without it, cvs can get confused.

skimo -- git-cvs2git: propagate mode information

Let cvs checkout in a temporary directory rather than using the pipe option to avoid loss of mode information.

Signed-off-by: Sven Verdoolaege <skimo@liacs.nl>

--- commit 188ea2ee70413147fc1b80fedc3fbee02843e590 tree f122fcf591013aff299a4d072eed47255892d3a1 parent fdf95bf8d4d1182db579bd25fe5e25811084eaa6 author Sven Verdoolaege <skimo@kotnet.org> Sat, 18 Jun 2005 23:55:49 +0200 committer Sven Verdoolaege <skimo@kotnet.org> Sat, 18 Jun 2005 23:55:49 +0200

 cvs2git.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/cvs2git.c b/cvs2git.c
--- a/cvs2git.c
+++ b/cvs2git.c
@@ -199,7 +199,10 @@ static void update_file(char *line)
 	if (dir)
 		printf("mkdir -p %.*s\n", (int)(dir - name), name);
 
-	printf("cvs -q -d %s checkout -r%s -p '%s/%s' > '%s'\n", cvsroot, version, cvsmodule, name, name);
+	printf("cvs -q -d %s checkout -d .git-tmp -r%s '%s/%s'\n", 
+		cvsroot, version, cvsmodule, name);
+	printf("mv -f .git-tmp/%s %s\n", dir ? dir+1 : name, name);
+	printf("rm -rf .git-tmp\n");
 	printf("git-update-cache --add -- '%s'\n", name);
 }
 
Previous: Linus Torvalds
Message 3 of 3 in “cvs2git and file permissions”
  1. Sven VerdoolaegeJun 18, 2005
  2. Linus TorvaldsJun 18, 2005
  3. Sven VerdoolaegeJun 18, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.