migration to git with docker container

84 views
Skip to first unread message

Ricardo Alexsander Santana

unread,
Jan 18, 2020, 1:27:48 PM1/18/20
to iDempiere
I've developed a docker container to help migrate to git:

Hiep Lq

unread,
Mar 3, 2020, 5:02:20 AM3/3/20
to iDempiere

thanks for share.

i just test to convert my hg repository name "idempiere.maven.tycho.build.extra.bundle" but not success with

docker run \
--volume [/your/hg/repositories/path/]:/hg-repositories \
--volume [/your/empty/output/folder/]:/git-repositories \
ralexsander/hg-git-migration [prepare,migrate,bash]

method 1: 
clone repository to /tmp/idempiere.maven.tycho.build.extra.bundle
create empty folder /tmp/idempiere.maven.tycho.build.extra.bundle.git
set [/your/hg/repositories/path/] = /tmp/idempiere.maven.tycho.build.extra.bundle
set [/your/empty/output/folder/] = /tmp/idempiere.maven.tycho.build.extra.bundle.git

this is log:

hieplq@hieplq-Inspiron-7460:/tmp$ ls /tmp/idempiere.maven.tycho.build.extra.bundle
org.idempiere.p2.build.extra.bundle.site  org.idempiere.p2.build.extra.bundle.targetplatform  pom-jetty.xml  pom.xml  README.md  update.version.sh
hieplq@hieplq-Inspiron-7460:/tmp$ ls -a /tmp/idempiere.maven.tycho.build.extra.bundle
.   .hg        org.idempiere.p2.build.extra.bundle.site            pom-jetty.xml  .project   .settings
..  .hgignore  org.idempiere.p2.build.extra.bundle.targetplatform  pom.xml        README.md  update.version.sh
hieplq@hieplq-Inspiron-7460:/tmp$ ls -a /tmp/idempiere.maven.tycho.build.extra.bundle.git/
.  ..
hieplq@hieplq-Inspiron-7460:/tmp$ docker run --volume /tmp/idempiere.maven.tycho.build.extra.bundle:/hg-repositories --volume /tmp/idempiere.maven.tycho.build.extra.bundle.git:/git-repositories ralexsander/hg-git-migration prepare,migrate,bash
hieplq@hieplq-Inspiron-7460:/tmp$ ls -a /tmp/idempiere.maven.tycho.build.extra.bundle.git/
.  ..
hieplq@hieplq-Inspiron-7460:/tmp$

method 2:
create empty folder: /tmp/hg/
clone repository to /tmp/hg/idempiere.maven.tycho.build.extra.bundle
create empty folder: /tmp/git/
set [/your/hg/repositories/path/] = /tmp/hg
set [/your/empty/output/folder/] = /tmp/git
bellow it log

hieplq@hieplq-Inspiron-7460:/tmp$ ls -a /tmp/hg/idempiere.maven.tycho.build.extra.bundle
.   .hg        org.idempiere.p2.build.extra.bundle.site            pom-jetty.xml  .project   .settings
..  .hgignore  org.idempiere.p2.build.extra.bundle.targetplatform  pom.xml        README.md  update.version.sh
hieplq@hieplq-Inspiron-7460:/tmp$ ls -a /tmp/git/
.  ..
hieplq@hieplq-Inspiron-7460:/tmp$ docker run --volume /tmp/hg:/hg-repositories --volume /tmp/git:/git-repositories ralexsander/hg-git-migration prepare,migrate,bash
hieplq@hieplq-Inspiron-7460:/tmp$ ls -a /tmp/git/
.  ..
hieplq@hieplq-Inspiron-7460:/tmp$

both return empty on git outout

Anozi Mada

unread,
Mar 3, 2020, 5:09:16 AM3/3/20
to iDempiere
Try run
git checkout HEAD
in your empty folder

Regards,
Anozi Mada

Ricardo Alexsander Santana

unread,
Mar 3, 2020, 9:18:48 AM3/3/20
to idem...@googlegroups.com
Hi Hiep,

You have to choose what you want to do: prepare or migrate or bash
prepare will create a list of authors, branches and tags. Useful if you want to clean or fix some wrong values
migrate will perform the migration
bash if you want to connect to container

So in your case the follow command should work:
docker run --volume /tmp/hg:/hg-repositories --volume /tmp/git:/git-repositories ralexsander/hg-git-migration migrate

Regards,
--
Ricardo Alexsander Santana
ralex...@gmail.com


--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/225d1fe8-67bd-4550-9d77-1274d5c258bb%40googlegroups.com.

Hiep Lq

unread,
Mar 3, 2020, 11:24:22 AM3/3/20
to Mohemmed Bilal Ilyas

@Anozi Mada folder ".git" don't exist. mean convert failed

@Ricardo Alexsander Santana it's worked now.

so i misunderstood your note ralexsander/hg-git-migration [prepare,migrate,bash]

it's separate action. and next action include prev action.

thanks it's helpful.



--
Lê Quý Hiệp
Email: hie...@hasuvimex.vn
Skype: admin.hasuvimex

Company: Thanh Hoa Fishery Import - Export J.s.c  (HasuvimexDL 47
Add: Lot E, Le Mon Industrial Zone, Thanh Hoa, Vietnam
Reply all
Reply to author
Forward
0 new messages