Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hg-git
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
heptapod
hg-git
Commits
f16eaf60
Commit
f16eaf60
authored
10 years ago
by
Siddharth Agarwal
Browse files
Options
Downloads
Patches
Plain Diff
gimport: support git.mindate
parent
c29eaba6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hggit/git_handler.py
+2
-1
2 additions, 1 deletion
hggit/git_handler.py
tests/test-git-workflow.t
+57
-0
57 additions, 0 deletions
tests/test-git-workflow.t
with
59 additions
and
1 deletion
hggit/git_handler.py
+
2
−
1
View file @
f16eaf60
...
...
@@ -220,7 +220,8 @@
def
import_commits
(
self
,
remote_name
):
refs
=
self
.
git
.
refs
.
as_dict
()
self
.
import_git_objects
(
remote_name
,
refs
)
filteredrefs
=
self
.
filter_min_date
(
refs
)
self
.
import_git_objects
(
remote_name
,
filteredrefs
)
self
.
update_hg_bookmarks
(
refs
)
self
.
save_map
()
...
...
This diff is collapsed.
Click to expand it.
tests/test-git-workflow.t
+
57
−
0
View file @
f16eaf60
...
...
@@ -75,3 +75,60 @@
gimport
should
have
updated
the
bookmarks
as
well
$
hg
bookmarks
master
1
:
7108
ae7bd184
gimport
support
for
git
.
mindate
$
cat
>>
.
hg
/
hgrc
<<
EOF
>
[
git
]
>
mindate
=
2014
-
01
-
02
00
:
00
:
00
+
0000
>
EOF
$
echo
oldcommit
>
oldcommit
$
git
add
oldcommit
$
GIT_AUTHOR_DATE
=
"
2014-03-01 00:00:00 +0000
"
\
>
GIT_COMMITTER_DATE
=
"
2009-01-01 00:00:00 +0000
"
\
>
git
commit
-
m oldcommi
t
>
/dev/null
||
echo
"
git commit error
"
$
hg
gimport
no
changes
found
$
hg
log
--
graph
o
changeset:
1
:
7108
ae7bd184
|
bookmark:
master
|
tag:
tip
|
user:
test
<
test@example
.
org
>
|
date:
Mon
Jan
01
00
:
00
:
11
2007
+
0000
|
summary:
add
beta
|
o
changeset:
0
:
0221
c246a567
user:
test
date:
Mon
Jan
01
00
:
00
:
10
2007
+
0000
summary:
add
alpha
$
echo
newcommit
>
newcommit
$
git
add
newcommit
$
GIT_AUTHOR_DATE
=
"
2014-01-01 00:00:00 +0000
"
\
>
GIT_COMMITTER_DATE
=
"
2014-01-02 00:00:00 +0000
"
\
>
git
commit
-
m newcommit > /dev/null
||
echo
"
git commit error
"
$
hg
gimport
importing
git
objects
into
hg
$
hg
log
--
graph
o
changeset:
3
:
865
f98279824
|
bookmark:
master
|
tag:
tip
|
user:
test
<
test@example
.
org
>
|
date:
Wed
Jan
01
00
:
00
:
00
2014
+
0000
|
summary:
newcommit
|
o
changeset:
2
:
b6cde64c110c
|
user:
test
<
test@example
.
org
>
|
date:
Sat
Mar
01
00
:
00
:
00
2014
+
0000
|
summary:
oldcommit
|
o
changeset:
1
:
7108
ae7bd184
|
user:
test
<
test@example
.
org
>
|
date:
Mon
Jan
01
00
:
00
:
11
2007
+
0000
|
summary:
add
beta
|
o
changeset:
0
:
0221
c246a567
user:
test
date:
Mon
Jan
01
00
:
00
:
10
2007
+
0000
summary:
add
alpha
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment