import: fix parent selection when importing merges
With "wp1" and "wp2" the current working directory parents, "p1" and "p2" the
patch parents and "parents" the resulting commit parents, the current behaviour
is:
--bypass --exact p2 parents
0 0 0 [wp1, wp2]
0 0 1 [wp1, wp2]/buggy
0 1 0 [p1]
0 1 1 [p1, p2]
1 0 0 [wp1, wp2]
1 0 1 [p1, p2]
1 1 0 [p1]
1 1 1 [p1, p2]
The original behaviour before
f53dc0787424 was:
--bypass --exact p2 parents
0 0 0 [wp1, wp2]
0 0 1 if p1 == wp1 then [p1, p2] otherwise [wp1, wp2]
0 1 0 [p1]
0 1 1 [p1, p2]
This patch restores the previous behaviour when --bypass is not set, and align
--bypass behaviour when --exact is not set with merge diffs.
patch: simplify hunk extents parsing
Do not capture unwanted groups in regexps
diff: --ignore-blank-lines was too enthusiastic
It was ignoring changes from:
ab
to:
a
b
graft: disallow grafting grafted csets in specific situations (
issue3091)
In particular, we do not allow:
- grafting an already grafted cset onto its original branch
- grafting already grafted csets with the same origin onto each other
makedate: wrong timezone offset if DST rules changed this year (
issue2511)
Python's time module sets timezone and altzone based on UTC offsets of
two dates: first and middle day of the current year. This approach
doesn't work on a year when DST rules change.
For example Russia abandoned winter time this year, so the correct UTC
offset should be +4 now, but time.timezone returns 3 hours difference
because that's what it was on 01.01.2011.
Related python issue: http://bugs.python.org/
issue1647654
forget: use forward slashes for internal paths
forget into a subrepo failed on windows because pathes were joined with \.
check-code: add --nolineno option for hiding line numbers
This makes the output more stable when it is used as a whitelist.
merge: give a special message for internal:merge failure (
issue3105)
subrepo: use correct paths for subrepos with ..-relative paths on windows
posixpath normpath of c:\foo\bar/../baz is baz, so now we pconvert first.