Commit Graph

491 Commits

Author SHA1 Message Date
Frej Drejhammar
29a457eccf Merge branch 'PR/198'
Closes 198
2020-02-08 16:08:56 +01:00
Frej Drejhammar
4bc6dec5eb Merge branch 'PR/199'
Closes #199
2020-02-08 16:05:01 +01:00
Frej Drejhammar
fa8ebd994d Add link to what's expected for commit messages to the README 2020-02-08 15:50:17 +01:00
Frej Drejhammar
e83501d30d Make README issue tracker link a Markdown link 2020-02-08 15:43:10 +01:00
chrisjbillington
8efbb57822 Add additional options to branch_name_in_commit plugin
- Allow skipping writing the branch name if the branch is 'master'.

- Allow writing the branch name on the same line as the first line of
  the commit message separated by a colon, instead of it having its own
  line.
2020-02-07 20:48:49 -05:00
chrisjbillington
8d135fe700 Ignore files and directories called .git
Git cannot track these files. Print a warning if encountering one.

Fixes #166
2020-02-07 17:52:57 -05:00
Frej Drejhammar
ed36227c62 Merge branch 'PR/192'
Closes #192
2020-01-31 17:12:30 +01:00
Frej Drejhammar
507c17cc1b Revert "Handle --force option correctly in any position"
This reverts commit 0c5617bf8d.

The changes turned out to require bash. Traditionally we have tried to
stay compatible with plain old sh, so this is a revert.

Closes #195.
2020-01-31 17:01:04 +01:00
James Douglass
1841ba4be9 Add a plugin to prefix an issue number with a user-defined string. 2020-01-29 14:18:17 -08:00
Frej Drejhammar
30e54cb55c Merge branch 'PR/194'
Closes #194.
2020-01-29 19:20:48 +01:00
Frej Drejhammar
5f7bf7ee71 Merge branch 'PR/193'
Closes #193
2020-01-29 19:15:18 +01:00
Alexander Regueiro
0c5617bf8d Handle --force option correctly in any position 2020-01-29 18:13:54 +00:00
Frej Drejhammar
29ec91970e Merge branch 'PR/189-fixup-subrepo-list-refreshing-v2'
Fixes #187.
2020-01-28 19:43:49 +01:00
James Douglass
601daf60f7 Adding a new plugin to overwrite null messages. 2020-01-26 17:25:07 -08:00
MokhamedDakhraui
9c9669d361 Check .hgsub and .hgsubstate files to detect subrepo changes 2020-01-26 00:36:34 +03:00
Frej Drejhammar
2ba5d77435 Merge PR#183
Closes #183
2019-12-22 19:08:08 +01:00
Justin Murray
e8a681121b Document default branch behavior
Document the default behavior of renaming the `default` hg branch to `master`
on git, and how to override from the command line when this causes problems.

See also: #182
2019-12-21 15:34:30 -05:00
Frej Drejhammar
ffdd27c2da Merge branch 'mossop/PR/git-submodules-v3'
Closes #180
2019-12-07 19:36:31 +01:00
Dave Townsend
ab31fdcbaa Add support for git submodules
Mercurial supports not only submodules which are Mercurial
repositories, but also Git and Subversion repositories. This
patch adds support for submodules which are Git repositories to
hg-fast-export.

As submodules which are Git repositories won't need a mapping
file we trigger the submodule update only on the occurence of the
`.hgsubstate` file and push the check for a valid
`submodule_mappings` to `refresh_gitmodules(ctx)`
2019-12-07 10:22:23 -08:00
Dave Townsend
acf93a80a9 Only export submodules that exist in the submodule mapping. 2019-12-07 10:21:26 -08:00
Dave Townsend
0f49bfe0db Move hg sub-module updating to its own function, NFC
This refactoring is in preparation to supporting Mercurial
submodules which are git repositories.
2019-12-07 09:39:43 -08:00
Frej Drejhammar
3af916d664 Clarify requirements
Make it clear that python 2.7.x is a hard requirement and that
Mercurial >= 4.6 is required. Also clean up an old editing artefact.
2019-11-12 17:46:08 +01:00
Frej Drejhammar
02c54a5513 Merge branch 'Mossop-obsolete'
Closes #175
2019-10-20 19:54:08 +02:00
Dave Townsend
b54046d3aa Avoid showing a warning when the mercurial repository has obsolete markers. 2019-10-20 19:49:25 +02:00
Dave Townsend
ff1c885305 Ignore obsolete changesets in the source repository
Obsolete changesets are, for example, create by the Evolve
extension. This patch switches to an unfiltered repository (the
filtered one throws on an attempt to access obsolete revisions) and
then filters out the obsolete revisions when it comes across them.

Fixes #173
2019-10-20 19:45:42 +02:00
Frej Drejhammar
0096085b6f Tag maps should use the same syntax as branch and author maps
When version v171002 introduced a new mapping file format for branches
and authors, that change never made it to the remapping of tags
although the README documents it.

Fixes #172.
2019-10-12 21:09:14 +02:00
Frej Drejhammar
6f9bc6517a Merge branch 'pr/FAQ' 2019-09-24 22:56:42 +02:00
Frej Drejhammar
243100eea4 Add a section on frequent problems to the README
This tries to preemptively avoid recurrence of issues #148, #152,
 #155, #165 and #168.
2019-09-19 16:41:04 +02:00
Frej Drejhammar
1181a0af47 Allow name sanitizer to be disabled with --no-auto-sanitize
Make it possible to completely disable the name sanitizer by the
--no-auto-sanitize flag. Previously the sanitizer was run on user
remapped names. As the sanitizer rewrites perfectly legal git
names (such as __.*) this is probably not what the user wants.

Closes #155.
v190913
2019-09-13 14:56:32 +02:00
Frej Drejhammar
7ab47e002f Merge branch 'jpaugh-patch-1'
Closes #164
2019-09-12 20:14:42 +02:00
Jonathan Paugh
96762f5474 README: Fix broken links
Use "footnote" style links to prevent future issues whenever the text is formatted to a specific length.
2019-09-11 16:46:55 -05:00
Frej Drejhammar
fcdc91634a Merge branch 'be-non-pep349-tolerant'
Closes: #143
Closes: #160
2019-09-01 18:31:46 +02:00
Frej Drejhammar
f57fba000b Try to do the right thing on non PEP394 compliant systems
PEP 394 [1] tells us that on systems with both a python 2 and 3
installed, the python 2 interpreter should be installed as python2.

Unfortunately not all distributions adheres to PEP 394 (I'm looking at
you, Windows) so to handle that we first try to find a 'python2', then
fall back on plain 'python'. In order to not silently pick a python 3
by mistake, we check sys.version_info using the the interpreter we
found.

[1] https://www.python.org/dev/peps/pep-0394/
2019-09-01 18:31:18 +02:00
Frej Drejhammar
b25cbd6753 Merge branch 'pr/157-v3'
Closes #156
2019-08-18 11:57:53 +02:00
MokhamedDakhraui
581b1b3d17 Remove git submodules if .hgsubstate file was removed or emptied 2019-08-18 05:46:46 +03:00
MokhamedDakhraui
7df01ac323 Refactor refresh_gitmodules()
Use the change context substate field instead of manually parsing the `.hgsubstate` file.
2019-08-16 02:42:03 +03:00
MokhamedDakhraui
914f5a0dbe Replaced several lambdas by one loop 2019-08-16 02:41:54 +03:00
MokhamedDakhraui
8779cb5e95 Extract operations with submodules to separated methods 2019-08-16 02:40:44 +03:00
Johannes Carlsson
47d330de83 Add support for mercurial subrepos
This adds a new command line option (--subrepo-map) that will
map mercurial subrepos to git submodules.

The --subrepo-map takes a mapping file as an argument that will
be used to map a subrepo folder to a git submodule.

For more information see the README-SUBMODULES.md.

This commit is inspired by the changes made by daolis in PR#38
that was never merged.

Closes: #51
Closes: #147
v190107
2019-01-07 18:41:19 +01:00
Frej Drejhammar
b51c58d3e0 Merge branch 'thetradedesk-master'
Closes #144
2018-12-06 21:51:32 +01:00
Johan Henkens
cadcfcbe90 Move filter_contents to plugin system 2018-12-05 13:25:48 -08:00
Johan Henkens
5e7895ca6b Add branch_name_in_commit plugin 2018-12-05 13:25:48 -08:00
Johan Henkens
679103795b Add dos2unix plugin 2018-12-05 13:25:48 -08:00
Johan Henkens
e895ce087f Add plugin system 2018-12-05 13:25:47 -08:00
Johan Henkens
850094c498 Add gitattributes, additional ignores 2018-12-05 13:25:47 -08:00
Daniel Small
2bb173ef68 hg 4.7: Replace call to util.email with templatefilters.email
This change is required for Mercurial 4.7 support and fixes #137.
2018-08-11 15:49:08 +02:00
Frej Drejhammar
ac60034ba3 Adhere to PEP 394
From PEP 394 [1]:

* python2 will refer to some version of Python 2.x.

* end users should be aware that python refers to python3 on at least
  Arch Linux (that change is what prompted the creation of this PEP),
  so python should be used in the shebang line only for scripts that
  are source compatible with both Python 2 and 3.

So to make sure that we run correctly on a system where python refers
to python3 and avoid problems like issue #11 we change the shebangs.

[1] https://www.python.org/dev/peps/pep-0394/
2018-08-11 15:07:19 +02:00
Frej Drejhammar
eca99b61eb Merge branch 'atykhyy-as-binary'
This closes #95
2018-06-22 16:46:10 +02:00
Anton Tykhyy
89db1d93cf Add --filter-contents 2018-06-17 21:09:59 +03:00
Frej Drejhammar
e200cec39f Adapt to changes in Mercurial 4.6
Starting with Mercurial 4.6 repo.lookup() no longer accepts raw hashes
for lookups.
v180610
2018-06-10 15:51:09 +02:00