Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
hg-git
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Show more breadcrumbs
mercurial
hg-git
Commits
c29eaba6
Commit
c29eaba6
authored
10 years ago
by
Siddharth Agarwal
Browse files
Options
Downloads
Patches
Plain Diff
pull: support git.mindate
parent
53e7e8f3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hggit/git_handler.py
+1
-1
1 addition, 1 deletion
hggit/git_handler.py
tests/test-pull.t
+48
-0
48 additions, 0 deletions
tests/test-pull.t
with
49 additions
and
1 deletion
hggit/git_handler.py
+
1
−
1
View file @
c29eaba6
...
...
@@ -233,7 +233,7 @@
oldheads
=
self
.
repo
.
changelog
.
heads
()
imported
=
0
if
refs
:
filteredrefs
=
self
.
filter_refs
(
refs
,
heads
)
filteredrefs
=
self
.
filter_min_date
(
self
.
filter_refs
(
refs
,
heads
)
)
imported
=
self
.
import_git_objects
(
remote_name
,
filteredrefs
)
self
.
import_tags
(
refs
)
self
.
update_hg_bookmarks
(
refs
)
...
...
This diff is collapsed.
Click to expand it.
tests/test-pull.t
+
48
−
0
View file @
c29eaba6
...
...
@@ -256,3 +256,51 @@
date:
Mon
Jan
01
00
:
00
:
10
2007
+
0000
summary:
add
alpha
add
old
and
new
commits
to
the
git
repo
--
make
sure
we
'
re using the commit date
and not the author date
$ cat >> $HGRCPATH <<EOF
> [git]
> mindate = 2014-01-02 00:00:00 +0000
> EOF
$ cd gitrepo
$ git checkout -q master
$ 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 oldcommit > /dev/null || echo "git commit error"
$ cd ..
$ hg -R hgrepo pull
pulling from $TESTTMP/gitrepo
no changes found
$ hg -R hgrepo log -r master
changeset: 4:892d20308ddf
bookmark: master
parent: 3:56cabe48c4b0
parent: 1:7bcd915dc873
user: test <test@example.org>
date: Mon Jan 01 00:00:13 2007 +0000
summary: Merge branch
'
beta
'
$ cd gitrepo
$ 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"
$ cd ..
$ hg -R hgrepo pull
pulling from $TESTTMP/gitrepo
importing git objects into hg
(run
'
hg
heads
.
'
to see heads,
'
hg
merge
'
to merge)
$ hg -R hgrepo log -r master
changeset: 8:c7d0cf1a7601
bookmark: master
tag: default/master
tag: tip
user: test <test@example.org>
date: Wed Jan 01 00:00:00 2014 +0000
summary: newcommit
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