Discussion:
two questions abut git import
(too old to reply)
Luca Ferrari
2014-12-29 08:45:15 UTC
Permalink
Hi all,
I'm new to fossil, therefore apologize for my trivial questions. I've
imported a quite big git repository (around 500 GB) to fossil without
any problem, but:
1) if I get it right the fossil repo file must be in the same
directory of the git tree, and therefore I cannot place it somewhere
else as for "native" fossil repos, is this correct?
2) is there a way to change the author name and email of all presents commits?

Thanks,
Luca
Baruch Burstein
2014-12-29 09:17:27 UTC
Permalink
Post by Luca Ferrari
Hi all,
I'm new to fossil, therefore apologize for my trivial questions. I've
imported a quite big git repository (around 500 GB) to fossil without
1) if I get it right the fossil repo file must be in the same
directory of the git tree, and therefore I cannot place it somewhere
else as for "native" fossil repos, is this correct?
No. The Fossil repo is completely self contained and does not depend in any
way on the git repo or even on the git-export file it was created from.
Post by Luca Ferrari
2) is there a way to change the author name and email of all presents commits?
Once the data is in the Fossil repo it cannot be changed. Any changes have
to be done either in the git repository before exporting, or on the
exported file before importing. I am not familiar enough with git to know
if such tools exist, or even if these things are possible.
--
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı
Gour
2014-12-29 10:28:20 UTC
Permalink
Post by Baruch Burstein
Once the data is in the Fossil repo it cannot be changed. Any changes
have to be done either in the git repository before exporting, or on
the exported file before importing. I am not familiar enough with git
to know if such tools exist, or even if these things are possible.
Try this: https://help.github.com/articles/changing-author-info/


Sincerely,
Gour

--
Richard Hipp
2014-12-29 11:30:58 UTC
Permalink
Post by Baruch Burstein
Post by Luca Ferrari
2) is there a way to change the author name and email of all presents commits?
Once the data is in the Fossil repo it cannot be changed. Any changes have
to be done either in the git repository before exporting, or on the
exported file before importing. I am not familiar enough with git to know
if such tools exist, or even if these things are possible.
There exists a special tag that will change the displayed user name for a
single check-in. The original username is preserved and is accessible, but
the modified user name is the one used on timeline displays and such. If
you click on the link to a particular check-in in the timeline, then click
on the "Edit" link for the check-in information page, it takes you to a
screen that lets you "modify" the check-in in various ways, such as
changing the user name. But Baruch is correct in saying that the check-in
is not really modified - what this does is create a special tag that says
"display this alternative username on the timeline".

Unfortunately, there is no way to do this for every check-in all at once.
You would have to go through and create separate tags for each check-in.
There is probably a way to script this. But it would be better to change
the names in git prior to import, probably. Or, run the git-fast-export
text through a sed script that makes the change prior to sending into
"fossil import".
--
D. Richard Hipp
***@sqlite.org
Stephan Beal
2014-12-29 11:41:56 UTC
Permalink
separate tags for each check-in. There is probably a way to script this.
fossil tag add user VERSION USERNAME

should do the trick. You'd just need to feed it the list of versions, which
you can fetch with something like:

echo "select b.uuid from blob b, event e where e.objid=b.rid and
e.type='ci';" | fossil sqlite

But...
But it would be better to change the names in git prior to import,
probably. Or, run the git-fast-export text through a sed script that makes
the change prior to sending into "fossil import".
+1
--
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
Roy Marples
2015-01-11 22:07:58 UTC
Permalink
Post by Richard Hipp
Unfortunately, there is no way to do this for every check-in all at once.
You would have to go through and create separate tags for each check-in.
There is probably a way to script this. But it would be better to change
the names in git prior to import, probably. Or, run the git-fast-export
text through a sed script that makes the change prior to sending into
"fossil import".
When I converted my repos from git to fossil I changed the names in the git-
fast-export text via sed (of course doing a diff to ensure nothing else was
changed).

Roy

Luca Ferrari
2015-01-07 07:52:56 UTC
Permalink
Ciao,
Post by Baruch Burstein
No. The Fossil repo is completely self contained and does not depend in any
way on the git repo or even on the git-export file it was created from.
I've moved the fossil repository file to a location where I'd like to
keep all of them. Then from the root of my project I issue a status
and got:

% fossil status
fossil: repository does not exist or is in an unreadable directory

Looks like fossil is searching for the repository into the same
directory the project was living.
I could be wrong, but I did not checkout the fossil repo, that is I
converted the existing git one and worked on the same directory tree.
Do I have to checkout it first?
Post by Baruch Burstein
Post by Luca Ferrari
2) is there a way to change the author name and email of all presents commits?
Once the data is in the Fossil repo it cannot be changed. Any changes have
to be done either in the git repository before exporting, or on the exported
file before importing. I am not familiar enough with git to know if such
tools exist, or even if these things are possible.
Ok, I got that even if something can be changed in fossil I have to
correct git before the export/import.

Thanks,
Luca
Stephan Beal
2015-01-07 08:03:46 UTC
Permalink
Post by Luca Ferrari
% fossil status
fossil: repository does not exist or is in an unreadable directory
When you move a repo you need to close/re-open it again because its
location is stored in the checkout db.
--
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
Luca Ferrari
2015-01-07 08:45:08 UTC
Permalink
Ciao,
When you move a repo you need to close/re-open it again because its location
is stored in the checkout db.
thanks! I didn't know that.

Luca
Loading...