Re: [Tailor] cvs to git: removed files still exist in git

2008-07-27 Thread Miklos Vajna
On Sun, Jul 27, 2008 at 11:33:45AM +1000, Pigeon [EMAIL PROTECTED] wrote:
 [cvs:test]
 subdir = test.cvs
 repository = /home/test/tmp/cvsroot
 module = test
 
 [git:test]
 subdir = test.git
 repository = /home/test/tmp/test.git

I *think* that the real git repo is now under
/home/test/tmp/test.git/.git. Does the file appear if you do a

git clone /home/test/tmp/test.git/.git test

?

 I have the two subdir's there for ages and I probably don't know why
 they're there anymore. :\

Uhm, the only configuration I even tried is setting a subdir in the
main section, like:

[DEFAULT]
verbose = True
patch-name-format =

[bitlbee]
target = git:target
start-revision = INITIAL
root-directory = /home/vmiklos/scm/tailor/bitlbee
state-file = bitlbee.state
source = bzr:source
subdir = bitlbee.git

[bzr:source]
repository = /home/vmiklos/scm/tailor/bitlbee/bitlbee.bzr

[git:target]
repository = /home/vmiklos/scm/tailor/bitlbee/bitlbee.git

  In other words, the .git directory does not contain the file, just the
  working directory outside .git, but that does not count, that working
  directory is just used for the conversion, you should use only the .git
  directory like:
  
  git clone /path/to/tailor/working/dir/.git myproject
  
  and you won't have the file under myproject.
 
 Quick question here. For a git target section, what is the use of the
 repository? It doesn't seem to be used or touched at all. I thought
 that is where the converted output git repo will be.

Exactly. But a git repo consists of a working directory and a git
directory. The previous is optional, for example when you store a repo
on the server, the working directory would just cause problems. This is
true here as well: the working directory is used by tailor, but you
should just use the .git directory of the target repo, you should not
care about outside .git, I think.


pgpNA5MIpPNKy.pgp
Description: PGP signature
___
Tailor mailing list
Tailor@lists.zooko.com
http://lists.zooko.com/mailman/listinfo/tailor


Re: [Tailor] cvs to git: removed files still exist in git

2008-07-27 Thread Miklos Vajna
On Sun, Jul 27, 2008 at 04:29:12PM +1000, Pigeon [EMAIL PROTECTED] wrote:
 I was probably doing the one repository per branch mentioned at:
 
 http://progetti.arstecnica.it/tailor/wiki/GitRepository
 
 which I have to specify subdir.
 
 But then later I've switched to the one single repository for all
 branches approach.

That's a good question, as you can read there The git target is serving
as testbed for proper branch support in tailor.; I never tried
converting more than one branches using tailor.

 In the one single repository approach example, it has:
 
 repository = ../bigdiesel.git
 
 Is bigdiesel.git created by tailor automatically?

I think so.


pgpnNDPxCoCXr.pgp
Description: PGP signature
___
Tailor mailing list
Tailor@lists.zooko.com
http://lists.zooko.com/mailman/listinfo/tailor


Re: [Tailor] cvs to git: removed files still exist in git

2008-07-26 Thread Miklos Vajna
On Sat, Jul 26, 2008 at 06:56:27PM +1000, Pigeon [EMAIL PROTECTED] wrote:
 - in the function _removePathnames in vcpx/repository/git/target.py,
   replace:
 
 self.repository.runCommand(['update-index', '--remove'] + notdirs)
 
 with
 
 self.repository.runCommand(['rm'] + notdirs)

That fix looks fine to me.

 Maybe the tailor maintainer or the tailor git maintainer might have
 a better idea how this should be fixed.

Not that I'm either of these, but I contributed some fixes to the git
part.


pgpMUi2RSKMit.pgp
Description: PGP signature
___
Tailor mailing list
Tailor@lists.zooko.com
http://lists.zooko.com/mailman/listinfo/tailor


Re: [Tailor] cvs to git: removed files still exist in git

2008-07-26 Thread Miklos Vajna
On Sat, Jul 26, 2008 at 03:51:56PM +0200, Lele Gaifax [EMAIL PROTECTED] wrote:
 It would be great if you could send a patch for this. I do not know
 git at all, so I would be blindly tweaking the code...
 
 Another thing that could help me would be a testcase that triggers the
 bad behaviour.

Yes, you are right. Pigeon, could we have a testcase for this?

Here is what I tried:

-- snip --
~/scm/darcs/tailor/test-scripts$ cat ./test-darcs2git-remove.sh
#!/bin/sh

# needs: test-darcs2git.include
#
# Test for converting from Darcs to Git.

. ./test-darcs2git.include
darcs_setup

echo foo  foo
darcs add foo
darcs record -v -a -A Nobody -m add foo

rm foo
darcs record -v -a -A Nobody -m remove foo

echo foo  foo
darcs add foo
darcs record -v -a -A Nobody -m add foo again

rm foo
darcs record -v -a -A Nobody -m remove foo again

testing_runs
-- snap --

But this does not trigger your problem.

In other words, the .git directory does not contain the file, just the
working directory outside .git, but that does not count, that working
directory is just used for the conversion, you should use only the .git
directory like:

git clone /path/to/tailor/working/dir/.git myproject

and you won't have the file under myproject.

So at the end I think this is just a user problem, it is not really a
bug in tailor.

^ Lele, that's why I'm not sending a patch. :-)


pgpL8lYtaWlFW.pgp
Description: PGP signature
___
Tailor mailing list
Tailor@lists.zooko.com
http://lists.zooko.com/mailman/listinfo/tailor


Re: [Tailor] cvs to git: removed files still exist in git

2008-07-26 Thread Pigeon

 So at the end I think this is just a user problem, it is not really a
 bug in tailor.

Thanks for the tips. Now I'm feeling partially stupid :)

I've run my test again and again and I've finally discovered the bug
only happens when I have different subdir set for the source and
target, for instance:

[test]
root-directory = tmp/test
source = cvs:test
target = git:test

[cvs:test]
subdir = test.cvs
repository = /home/test/tmp/cvsroot
module = test

[git:test]
subdir = test.git
repository = /home/test/tmp/test.git


I have the two subdir's there for ages and I probably don't know why
they're there anymore. :\


 In other words, the .git directory does not contain the file, just the
 working directory outside .git, but that does not count, that working
 directory is just used for the conversion, you should use only the .git
 directory like:
 
 git clone /path/to/tailor/working/dir/.git myproject
 
 and you won't have the file under myproject.

Quick question here. For a git target section, what is the use of the
repository? It doesn't seem to be used or touched at all. I thought
that is where the converted output git repo will be.


Thanks Miklos and Lele again, and sorry for the mis-report.


Pigeon.

___
Tailor mailing list
Tailor@lists.zooko.com
http://lists.zooko.com/mailman/listinfo/tailor